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, 0x12);
void actuators_spektrum_set(void)
static void actuators_spektrum_send(struct link_device *dev)
struct ActuatorsSpektrum actuators_spektrum
void actuators_spektrum_init(void)
Spektrum actuator driver, which can output as 7 spektrum channels at ~11ms.
struct link_device * device2
#define ACTUATORS_SPEKTRUM_MAX_NB
int32_t cmds[ACTUATORS_SPEKTRUM_MAX_NB]
struct link_device * device
Hardware independent API for actuators (servos, motor controllers).
static const struct usb_device_descriptor dev
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.