mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Update serial port code so that it's possible to open more than one port
per function. Note: a future commit will enable MSP to work on additional ports in order to support simultaneous combinations of Serial/Bluetooth configuration, OSD, RX_MSP on otherwise unused ports.
This commit is contained in:
parent
4f88ff1054
commit
51d28e19aa
5 changed files with 107 additions and 4957 deletions
|
@ -78,6 +78,11 @@ typedef struct serialPortFunction_s {
|
|||
serialPortFunction_e currentFunction;
|
||||
} serialPortFunction_t;
|
||||
|
||||
typedef struct serialPortFunctionList_s {
|
||||
uint8_t serialPortCount;
|
||||
serialPortFunction_t *functions;
|
||||
} serialPortFunctionList_t;
|
||||
|
||||
typedef struct serialConfig_s {
|
||||
uint8_t serial_port_1_scenario;
|
||||
uint8_t serial_port_2_scenario;
|
||||
|
@ -109,5 +114,7 @@ bool isSerialConfigValid(serialConfig_t *serialConfig);
|
|||
bool doesConfigurationUsePort(serialConfig_t *serialConfig, serialPortIdentifier_e portIdentifier);
|
||||
bool isSerialPortFunctionShared(serialPortFunction_e functionToUse, uint16_t functionMask);
|
||||
|
||||
serialPortFunctionList_t *getSerialPortFunctionList(void);
|
||||
|
||||
void evaluateOtherData(uint8_t sr);
|
||||
void handleSerial(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue