7 // expresslrs packet header types
8 // 00 -> standard channel data packet
9 // 01 -> MSP data packet
12 #define RC_DATA_PACKET 0b00
13 #define MSP_DATA_PACKET 0b01
14 #define TLM_PACKET 0b11
15 #define SYNC_PACKET 0b10
17 // Mask used to XOR the ModelId into the SYNC packet for ModelMatch
18 #define MODELMATCH_MASK 0x3f
20 enum OtaSwitchMode_e
{ sm1Bit
, smHybrid
, smHybridWide
};
21 void OtaSetSwitchMode(OtaSwitchMode_e mode
);
22 extern OtaSwitchMode_e OtaSwitchModeCurrent
;
24 #if defined(TARGET_TX) || defined(UNIT_TEST)
25 typedef std::function
<void (volatile uint8_t* Buffer
, CRSF
*crsf
, bool TelemetryStatus
, uint8_t nonce
, uint8_t tlmDenom
)> PackChannelData_t
;
26 extern PackChannelData_t PackChannelData
;
27 #if defined(UNIT_TEST)
28 void OtaSetHybrid8NextSwitchIndex(uint8_t idx
);
32 #if defined(TARGET_RX) || defined(UNIT_TEST)
33 typedef std::function
<bool (volatile uint8_t* Buffer
, CRSF
*crsf
, uint8_t nonce
, uint8_t tlmDenom
)> UnpackChannelData_t
;
34 extern UnpackChannelData_t UnpackChannelData
;