32 #ifndef PIOS_CROSSFIRE_H
33 #define PIOS_CROSSFIRE_H
40 #define PIOS_CROSSFIRE_CHANNELS 16
43 #define CRSF_ADDRESS_LEN 1
44 #define CRSF_LENGTH_LEN 1
45 #define CRSF_CRC_LEN 1
46 #define CRSF_TYPE_LEN 1
50 #define CRSF_MAX_PAYLOAD 32
53 #define CRSF_FRAME_GPS 0x02
54 #define CRSF_FRAME_BATTERY 0x08
55 #define CRSF_FRAME_RCCHANNELS 0x16
56 #define CRSF_FRAME_ATTITUDE 0x1e
59 #define CRSF_PAYLOAD_GPS 15
60 #define CRSF_PAYLOAD_BATTERY 8
61 #define CRSF_PAYLOAD_RCCHANNELS 22
62 #define CRSF_PAYLOAD_ATTITUDE 6
65 #define CRSF_MAX_PAYLOAD 32
68 #define CRSF_TIMING_MAXFRAME 1000
69 #define CRSF_TIMING_FRAMEDISTANCE 4000
123 #define CRSF_MAX_FRAMELEN sizeof(struct crsf_frame_t)
126 #define CRSF_PAYLOAD_LEN(x) (CRSF_TYPE_LEN+(x)+CRSF_CRC_LEN)
146 #endif // PIOS_CROSSFIRE_H
int PIOS_Crossfire_SendTelemetry(uintptr_t crsf_id, uint8_t *buf, uint8_t bytes)
Main PiOS header to include all the compiled in PiOS options.
uint8_t payload[CRSF_MAX_PAYLOAD+CRSF_CRC_LEN]
uint8_t payload[CRSF_MAX_PAYLOAD+CRSF_CRC_LEN]
int PIOS_Crossfire_InitTelemetry(uintptr_t crsf_id)
RCVR layer functions header.
int PIOS_Crossfire_Init(uintptr_t *crsf_id, const struct pios_com_driver *driver, uintptr_t uart_id)
Initialises the TBS Crossfire Rx driver with a serial port.
const struct pios_rcvr_driver pios_crossfire_rcvr_driver
struct crsf_payload_attitude attitude
struct crsf_payload_gps gps
union crsf_combo_payload __attribute__
bool PIOS_Crossfire_IsFailsafed()
struct crsf_payload_battery battery