mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Tidy up msp related #includes
This commit is contained in:
parent
4baa995ebc
commit
ea6b459ead
7 changed files with 20 additions and 31 deletions
|
@ -898,8 +898,14 @@ void taskUpdateAttitude(uint32_t currentTime)
|
|||
void taskHandleSerial(uint32_t currentTime)
|
||||
{
|
||||
UNUSED(currentTime);
|
||||
|
||||
handleSerial();
|
||||
#ifdef USE_CLI
|
||||
// in cli mode, all serial stuff goes to here. enter cli mode by sending #
|
||||
if (cliMode) {
|
||||
cliProcess();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
mspSerialProcess();
|
||||
}
|
||||
|
||||
void taskUpdateBeeper(uint32_t currentTime)
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#endif
|
||||
|
||||
#include "io/serial.h"
|
||||
#include "serial_cli.h"
|
||||
#include "serial_msp.h"
|
||||
|
||||
|
||||
|
@ -423,19 +422,6 @@ bool serialIsPortAvailable(serialPortIdentifier_e identifier)
|
|||
return false;
|
||||
}
|
||||
|
||||
void handleSerial(void)
|
||||
{
|
||||
#ifdef USE_CLI
|
||||
// in cli mode, all serial stuff goes to here. enter cli mode by sending #
|
||||
if (cliMode) {
|
||||
cliProcess();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
mspSerialProcess();
|
||||
}
|
||||
|
||||
void waitForSerialPortToFinishTransmitting(serialPort_t *serialPort)
|
||||
{
|
||||
while (!isSerialTransmitBufferEmpty(serialPort)) {
|
||||
|
|
|
@ -140,8 +140,4 @@ baudRate_e lookupBaudRateIndex(uint32_t baudRate);
|
|||
// msp/cli/bootloader
|
||||
//
|
||||
void evaluateOtherData(serialPort_t *serialPort, uint8_t receivedChar);
|
||||
void handleSerial(void);
|
||||
|
||||
void evaluateOtherData(serialPort_t *serialPort, uint8_t receivedChar);
|
||||
void handleSerial(void);
|
||||
void serialPassthrough(serialPort_t *left, serialPort_t *right, serialConsumer *leftC, serialConsumer *rightC);
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
|
@ -38,7 +36,6 @@
|
|||
#include "flight/mixer.h"
|
||||
|
||||
#include "io/beeper.h"
|
||||
#include "io/serial_msp.h"
|
||||
#include "io/serial_4way.h"
|
||||
|
||||
#ifdef USE_SERIAL_4WAY_BLHELI_BOOTLOADER
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
#ifdef USE_SERIAL_4WAY_BLHELI_INTERFACE
|
||||
|
@ -31,13 +31,13 @@
|
|||
#include "drivers/serial.h"
|
||||
#include "drivers/timer.h"
|
||||
#include "drivers/pwm_mapping.h"
|
||||
|
||||
#include "io/serial.h"
|
||||
#include "io/serial_msp.h"
|
||||
#include "io/serial_4way.h"
|
||||
#include "io/serial_4way_impl.h"
|
||||
#include "io/serial_4way_avrootloader.h"
|
||||
#if defined(USE_SERIAL_4WAY_BLHELI_BOOTLOADER) && !defined(USE_FAKE_ESC)
|
||||
|
||||
#if defined(USE_SERIAL_4WAY_BLHELI_BOOTLOADER) && !defined(USE_FAKE_ESC)
|
||||
|
||||
// Bootloader commands
|
||||
// RunCmd
|
||||
|
|
|
@ -17,10 +17,9 @@
|
|||
* have a look at https://github.com/sim-/tgy/blob/master/boot.inc
|
||||
* for info about the stk500v2 implementation
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
|
@ -28,13 +27,13 @@
|
|||
|
||||
#include "drivers/io.h"
|
||||
#include "drivers/serial.h"
|
||||
#include "config/config.h"
|
||||
#include "drivers/system.h"
|
||||
|
||||
#include "io/serial.h"
|
||||
#include "io/serial_msp.h"
|
||||
#include "io/serial_4way.h"
|
||||
#include "io/serial_4way_impl.h"
|
||||
#include "io/serial_4way_stk500v2.h"
|
||||
#include "drivers/system.h"
|
||||
|
||||
#ifdef USE_SERIAL_4WAY_SK_BOOTLOADER
|
||||
|
||||
#define BIT_LO_US (32) //32uS
|
||||
|
|
|
@ -100,6 +100,11 @@ static void setCurrentPort(mspPort_t *port)
|
|||
mspSerialPort = currentPort->port;
|
||||
}
|
||||
|
||||
/*
|
||||
* Process MSP commands from serial ports configured as MSP ports.
|
||||
*
|
||||
* Called periodically by the scheduler.
|
||||
*/
|
||||
void mspSerialProcess(void)
|
||||
{
|
||||
uint8_t portIndex;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue