27 #ifndef RC_HOTT_COMMON_H
28 #define RC_HOTT_COMMON_H
35 #include "generated/airframe.h"
43 #define RC_PPM_TICKS_OF_USEC(_v) ((_v) * 8 )
44 #define RC_PPM_SIGNED_TICKS_OF_USEC(_v) ((_v) * 8 )
45 #define USEC_OF_RC_PPM_TICKS(_v) ((_v) / 8)
51 #include "generated/radio.h"
60 #define HOTT_NB_CHANNEL 32
61 #define HOTT_BUF_LENGTH (HOTT_NB_CHANNEL*2+3+2)
63 #if RADIO_CONTROL_NB_CHANNEL > HOTT_NB_CHANNEL
64 #error "RADIO_CONTROL_NB_CHANNEL mustn't be higher than 32."
Some architecture independent helper functions for GPIOs.
bool frame_available
new frame available
uint8_t buffer[HOTT_BUF_LENGTH]
input buffer
void hott_common_decode_event(struct SHott *hott, struct uart_periph *dev)
Decoding event function.
void hott_common_init(struct SHott *hott, struct uart_periph *dev)
Init function.
uint16_t ppm[HOTT_NB_CHANNEL]
decoded and converted values
uint16_t pulses[HOTT_NB_CHANNEL]
decoded values
uint8_t status
decoder state machine status
#define HOTT_NB_CHANNEL
Generated code holding the description of a given transmitter.
uint8_t expected_channels
expected number of channels send in header
struct SHott hott
HOTT struct.
static const struct usb_device_descriptor dev
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.