mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
31 lines
533 B
C
31 lines
533 B
C
#include "board.h"
|
|
#include "mw.h"
|
|
|
|
static bool rxMspFrameDone = false;
|
|
|
|
static uint16_t mspReadRawRC(uint8_t chan);
|
|
static uint16_t mspReadRawRC(uint8_t chan)
|
|
{
|
|
return rcData[chan];
|
|
}
|
|
|
|
void mspFrameRecieve(void)
|
|
{
|
|
rxMspFrameDone = true;
|
|
}
|
|
|
|
bool mspFrameComplete(void)
|
|
{
|
|
if (rxMspFrameDone) {
|
|
failsafeCnt = 0; // clear FailSafe counter
|
|
rxMspFrameDone = false;
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
void mspInit(rcReadRawDataPtr *callback)
|
|
{
|
|
if (callback)
|
|
*callback = mspReadRawRC;
|
|
}
|