1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

Rebased onto super-abstracted msp

This commit is contained in:
jflyper 2016-10-20 23:21:32 +09:00
parent 01eab00fd7
commit 0249443862
8 changed files with 71 additions and 49 deletions

View file

@ -98,8 +98,9 @@ void osdResetAlarms(void);
// specific functions; max7456XXX(), canvasXXX(), oledXXX(), ...
//
#include "io/serial_msp.h"
#include "fc/fc_msp.h"
#include "msp/msp_protocol.h"
#include "msp/msp_serial.h"
void canvasBegin(void)
{
@ -146,6 +147,12 @@ void canvasWrite(int col, int row, char *string)
mspSerialPush(MSP_CANVAS, (uint8_t *)buf, len + 4);
}
// Called once at startup to initialize push function in msp
void canvasInit(void)
{
mspSerialPushInit(mspFcPushInit());
}
#endif
// Force draw all elements if true
@ -226,6 +233,13 @@ void cmsScreenResync(void)
#endif
}
void cmsScreenInit(void)
{
#ifdef CANVAS
canvasInit();
#endif
}
//
// Lots of things not separated yet.
//
@ -1348,6 +1362,11 @@ void cmsHandler(uint32_t currentTime)
}
void cmsInit(void)
{
cmsScreenInit();
}
// Does this belong here?
#ifdef USE_FLASHFS