34 #define HOTT_START_BYTE 0xa8
36 #define HOTT_STATUS_UNINIT 0
37 #define HOTT_STATUS_GOT_START 1
38 #define HOTT_STATUS_GOT_HEADER1 2
39 #define HOTT_STATUS_DATA 3
51 #define HOTT_CRC_POLYNOME 0x1021
78 for(i=0;i<channels;i++) {
85 #if PERIODIC_TELEMETRY
91 *available = (sumd_crc == sumd_crc_rx);
115 if (rbyte ==0x01 || rbyte ==0x81) {
#define USEC_OF_RC_PPM_TICKS(_v)
#define HOTT_CRC_POLYNOME
#define HOTT_STATUS_GOT_HEADER1
static uint16_t hott_CRC16(uint16_t crc, uint8_t value)
void hott_common_init(struct SHott *hott_p, struct uart_periph *dev)
Init function.
static void decode_hott_buffer(const uint8_t *src, uint16_t *dst, uint8_t channels, bool *available, uint16_t *dstppm)
Decode the raw buffer.
#define HOTT_STATUS_UNINIT
#define HOTT_STATUS_GOT_START
void hott_common_decode_event(struct SHott *hott_p, struct uart_periph *dev)
Decoding event function.
bool frame_available
new frame available
uint8_t buffer[HOTT_BUF_LENGTH]
input buffer
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
int uart_char_available(struct uart_periph *p)
Check UART for available chars in receive buffer.
void uart_periph_set_bits_stop_parity(struct uart_periph *periph, uint8_t bits, uint8_t stop, uint8_t parity)
uint8_t uart_getch(struct uart_periph *p)
void uart_periph_set_baudrate(struct uart_periph *periph, uint32_t baud)
Generic interface for radio control modules.
static const struct usb_device_descriptor dev
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.