34 #ifndef RC_POLARITY_GPIO_PORT
35 #define RC_POLARITY_GPIO_PORT 0
37 #ifndef RC_POLARITY_GPIO_PIN
38 #define RC_POLARITY_GPIO_PIN 0
41 #ifndef RC2_POLARITY_GPIO_PORT
42 #define RC2_POLARITY_GPIO_PORT RC_POLARITY_GPIO_PORT
44 #ifndef RC2_POLARITY_GPIO_PIN
45 #define RC2_POLARITY_GPIO_PIN RC_POLARITY_GPIO_PIN
52 #if PERIODIC_TELEMETRY
55 static void send_sbus(
struct transport_tx *trans,
struct link_device *
dev)
58 pprz_msg_send_PPM(trans,
dev, AC_ID,
71 #if PERIODIC_TELEMETRY
97 if (sbus1.frame_available) {
107 sbus1.frame_available =
false;
Main include for ABI (AirBorneInterface).
#define RADIO_CONTROL_SBUS_DUAL_ID
struct RadioControl radio_control
Generic interface for radio control modules.
uint8_t time_since_last_frame
void sbus_common_init(struct Sbus *sbus_p, struct uart_periph *dev, gpio_port_t gpio_polarity_port, uint16_t gpio_polarity_pin)
Init function.
void sbus_common_decode_event(struct Sbus *sbus_p, struct uart_periph *dev)
Decoding event function.
uint16_t pulses[SBUS_NB_CHANNEL]
Decoded values.
bool frame_available
A data frame is available.
#define RC_POLARITY_GPIO_PORT
static void send_sbus(struct transport_tx *trans, struct link_device *dev)
struct Sbus sbus1 sbus2
SBUS struct.
void sbus_dual_event(void)
RC event function.
#define RC_POLARITY_GPIO_PIN
#define RC2_POLARITY_GPIO_PIN
static void sbus_dual_decode_event(void)
#define RC2_POLARITY_GPIO_PORT
void sbus_dual_init(void)
RC init function.
Radio control via two SBUS receivers.
static const struct usb_device_descriptor dev
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
Periodic telemetry system header (includes downlink utility and generated code).
#define DefaultPeriodic
Set default periodic telemetry.
arch independent UART (Universal Asynchronous Receiver/Transmitter) API