1
0
Fork 0
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:
Dominic Clifton 2014-05-22 12:41:07 +01:00
parent 4f88ff1054
commit 51d28e19aa
5 changed files with 107 additions and 4957 deletions

View file

@ -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);