mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +03:00
Fixing FY90Q build. Cleanup of printf support and initialisation.
Remove duplicate inclusion of math.h in board.h.
This commit is contained in:
parent
89612bd881
commit
7e45a0c7e6
9 changed files with 61 additions and 41 deletions
23
src/main.c
23
src/main.c
|
@ -4,6 +4,8 @@
|
|||
#include "rx.h"
|
||||
#include "telemetry_common.h"
|
||||
|
||||
#include "build_config.h"
|
||||
|
||||
core_t core;
|
||||
|
||||
extern rcReadRawDataPtr rcReadRawFunc;
|
||||
|
@ -11,23 +13,6 @@ extern rcReadRawDataPtr rcReadRawFunc;
|
|||
// receiver read function
|
||||
extern uint16_t pwmReadRawRC(uint8_t chan);
|
||||
|
||||
#ifdef USE_LAME_PRINTF
|
||||
// gcc/GNU version
|
||||
static void _putc(void *p, char c)
|
||||
{
|
||||
serialWrite(core.mainport, c);
|
||||
}
|
||||
#else
|
||||
// keil/armcc version
|
||||
int fputc(int c, FILE *f)
|
||||
{
|
||||
// let DMA catch up a bit when using set or dump, we're too fast.
|
||||
while (!isSerialTransmitBufferEmpty(core.mainport));
|
||||
serialWrite(core.mainport, c);
|
||||
return c;
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(void)
|
||||
{
|
||||
uint8_t i;
|
||||
|
@ -38,9 +23,7 @@ int main(void)
|
|||
serialPort_t* loopbackPort2 = NULL;
|
||||
#endif
|
||||
systemInit();
|
||||
#ifdef USE_LAME_PRINTF
|
||||
init_printf(NULL, _putc);
|
||||
#endif
|
||||
initPrintfSupport();
|
||||
|
||||
checkFirstTime(false);
|
||||
readEEPROM();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue