29 #include "generated/airframe.h"
33 #if SERVOS_SPEKTRUM_NB > ACTUATORS_SPEKTRUM_MAX_NB
34 #error Spektrum actuators only support less then 7 servos
38 #if PERIODIC_FREQUENCY < 90
39 #error Spektrum actuators need at leest a frequency of Hz
41 static uint8_t freq_trig = PERIODIC_FREQUENCY / 90.0 + 0.5;
55 #ifdef ACTUATORS_SPEKTRUM_DEV2
69 if (cnt == freq_trig) {
72 #ifdef ACTUATORS_SPEKTRUM_DEV2
86 dev->put_byte(dev->periph, 0, 0x00);
87 dev->put_byte(dev->periph, 0, 0
x12);
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
void actuators_spektrum_init(void)
int32_t cmds[ACTUATORS_SPEKTRUM_MAX_NB]
void actuators_spektrum_set(void)
struct link_device * device
Hardware independent API for actuators (servos, motor controllers).
struct link_device * device2
static const struct usb_device_descriptor dev
Spektrum actuator driver, which can output as 7 spektrum channels at ~11ms.
#define ACTUATORS_SPEKTRUM_MAX_NB
static void actuators_spektrum_send(struct link_device *dev)
struct ActuatorsSpektrum actuators_spektrum