4 #include "crsf_protocol.h"
5 #include "telemetry_protocol.h"
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)
28 static void updateUplinkPower(uint8_t uplinkPower
);
29 static bool clearUpdatedUplinkPower();
32 static bool HasUpdatedUplinkPower
;
36 static uint8_t MspData
[ELRS_MSP_BUFFER
];
37 static uint8_t MspDataLength
;
40 extern GENERIC_CRC8 crsf_crc
;