27 lines
577 B
C++
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;
|
|
} |