Silence unused-variable warning (#2872)
[ExpressLRS.git] / src / lib / Handset / CRSF.h
blob4bf3a2f3f1a6efc49d7463b229672159dbb6b021
1 #ifndef H_CRSF
2 #define H_CRSF
4 #include "crsf_protocol.h"
5 #include "telemetry_protocol.h"
6 #include "msp.h"
7 #include "msptypes.h"
9 class CRSF
11 public:
12 static elrsLinkStatistics_t LinkStatistics; // Link Statistics Stored as Struct
14 static void GetMspMessage(uint8_t **data, uint8_t *len);
15 static void UnlockMspMessage();
16 static void AddMspMessage(uint8_t length, uint8_t *data);
17 static void AddMspMessage(mspPacket_t *packet, uint8_t destination);
18 static void ResetMspQueue();
20 static void GetDeviceInformation(uint8_t *frame, uint8_t fieldCount);
21 static void SetMspV2Request(uint8_t *frame, uint16_t function, uint8_t *payload, uint8_t payloadLength);
22 static void SetHeaderAndCrc(uint8_t *frame, crsf_frame_type_e frameType, uint8_t frameSize, crsf_addr_e destAddr);
23 static void SetExtendedHeaderAndCrc(uint8_t *frame, crsf_frame_type_e frameType, uint8_t frameSize, crsf_addr_e senderAddr, crsf_addr_e destAddr);
24 static uint32_t VersionStrToU32(const char *verStr);
26 #if defined(CRSF_RX_MODULE)
27 public:
28 static void updateUplinkPower(uint8_t uplinkPower);
29 static bool clearUpdatedUplinkPower();
31 private:
32 static bool HasUpdatedUplinkPower;
33 #endif
35 private:
36 static uint8_t MspData[ELRS_MSP_BUFFER];
37 static uint8_t MspDataLength;
40 extern GENERIC_CRC8 crsf_crc;
42 #endif