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
79 for(i=0;i<channels;i++) {
86 #if PERIODIC_TELEMETRY
92 *available = (sumd_crc == sumd_crc_rx);
116 if (rbyte ==0x01 || rbyte ==0x81) {
uint16_t ppm[HOTT_NB_CHANNEL]
decoded and converted values
void uart_periph_set_baudrate(struct uart_periph *p, uint32_t baud)
Set baudrate.
#define HOTT_STATUS_GOT_START
uint8_t buffer[HOTT_BUF_LENGTH]
input buffer
uint8_t uart_getch(struct uart_periph *p)
uint16_t uart_char_available(struct uart_periph *p)
Check UART for available chars in receive buffer.
bool frame_available
new frame available
#define HOTT_CRC_POLYNOME
#define HOTT_NB_CHANNEL
Generated code holding the description of a given transmitter.
uint8_t status
decoder state machine status
#define USEC_OF_RC_PPM_TICKS(_v)
uint8_t expected_channels
expected number of channels send in header
static void decode_hott_buffer(const uint8_t *src, uint16_t *dst, uint8_t channels, bool *available, uint16_t *dstppm)
Decode the raw buffer.
uint16_t pulses[HOTT_NB_CHANNEL]
decoded values
static const struct usb_device_descriptor dev
#define HOTT_STATUS_UNINIT
Common hott structs and defines.
void uart_periph_set_bits_stop_parity(struct uart_periph *p, uint8_t bits, uint8_t stop, uint8_t parity)
Set parity and stop bits.
void hott_common_decode_event(struct SHott *hott_p, struct uart_periph *dev)
Decoding event function.
void hott_common_init(struct SHott *hott_p, struct uart_periph *dev)
Init function.
#define HOTT_STATUS_GOT_HEADER1
static uint16_t hott_CRC16(uint16_t crc, uint8_t value)