mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Merge remote-tracking branch 'origin/bfdev-osd-cms-separation-poc' into bfdev-osd-cms-separation-poc
This commit is contained in:
commit
b2a682b2ea
6 changed files with 254 additions and 0 deletions
|
@ -102,6 +102,15 @@
|
|||
#include "config/config_master.h"
|
||||
#include "config/feature.h"
|
||||
|
||||
#ifdef USE_DPRINTF
|
||||
#include "common/printf.h"
|
||||
#define DPRINTF_SERIAL_PORT SERIAL_PORT_USART3
|
||||
extern serialPort_t *debugSerialPort;
|
||||
#define dprintf(x) if (debugSerialPort) printf x
|
||||
#else
|
||||
#define dprintf(x)
|
||||
#endif
|
||||
|
||||
#ifdef USE_HARDWARE_REVISION_DETECTION
|
||||
#include "hardware_revision.h"
|
||||
#endif
|
||||
|
@ -1964,3 +1973,17 @@ mspPushCommandFnPtr mspFcPushInit(void)
|
|||
{
|
||||
return mspServerPush;
|
||||
}
|
||||
|
||||
void mspServerPush(mspPort_t *mspPort, int cmd, uint8_t *data, int len)
|
||||
{
|
||||
currentPort = mspPort;
|
||||
mspPort->cmdMSP = cmd;
|
||||
|
||||
headSerialReply(len);
|
||||
|
||||
while (len--) {
|
||||
serialize8(*data++);
|
||||
}
|
||||
|
||||
tailSerialReply();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue