3 #include "common/streambuf.h"
4 #include "telemetry/crsf.h"
5 #include "telemetry/smartport.h"
7 typedef void (*mspResponseFnPtr
)(uint8_t *payload
);
10 typedef struct mspPackage_s
{
12 uint8_t *requestBuffer
;
13 uint8_t *responseBuffer
;
14 struct mspPacket_s
*requestPacket
;
15 struct mspPacket_s
*responsePacket
;
18 typedef union mspRxBuffer_u
{
19 uint8_t smartPortMspRxBuffer
[SMARTPORT_MSP_RX_BUF_SIZE
];
20 uint8_t crsfMspRxBuffer
[CRSF_MSP_RX_BUF_SIZE
];
23 typedef union mspTxBuffer_u
{
24 uint8_t smartPortMspTxBuffer
[SMARTPORT_MSP_TX_BUF_SIZE
];
25 uint8_t crsfMspTxBuffer
[CRSF_MSP_TX_BUF_SIZE
];
28 void initSharedMsp(void);
29 bool handleMspFrame(uint8_t *frameStart
, int frameLength
);
30 bool sendMspReply(uint8_t payloadSize
, mspResponseFnPtr responseFn
);