Files
microros_turntable_controller/src/devices.cpp
2025-08-23 20:30:17 +02:00

27 lines
577 B
C++

#include "devices.hpp"
bool verify_are_devices_available(void) {
bool devices_ready = true;
if (!device_is_ready(led0.port)) {
printk("LED0 not ready\n");
devices_ready = false;
}
if (!device_is_ready(led1.port)) {
printk("LED1 not ready\n");
devices_ready = false;
}
if (!device_is_ready(led2.port)) {
printk("LED2 not ready\n");
devices_ready = false;
}
if (!pwm_is_ready_dt(&servo0)) {
printk("Servo0 not ready\n");
devices_ready = false;
}
return devices_ready;
}