1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 01:05:27 +03:00

Use SERIAL_PORT_NONE identifier to mark ports which are unavailable

This commit is contained in:
Nicholas Sherlock 2015-04-02 01:55:13 +13:00
parent 86ddf27515
commit dce873434b
2 changed files with 11 additions and 12 deletions

View file

@ -50,6 +50,7 @@ extern uint32_t baudRates[];
// serial port identifiers are now fixed, these values are used by MSP commands.
typedef enum {
SERIAL_PORT_NONE = -1,
SERIAL_PORT_USART1 = 0,
SERIAL_PORT_USART2,
SERIAL_PORT_USART3,
@ -69,7 +70,6 @@ typedef struct serialPortUsage_s {
serialPortIdentifier_e identifier;
serialPort_t *serialPort;
serialPortFunction_e function;
bool enabled;
} serialPortUsage_t;
serialPort_t *findSharedSerialPort(uint16_t functionMask, serialPortFunction_e sharedWithFunction);