mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Update serial.h
This commit is contained in:
parent
7b7ee481db
commit
c31fd202c5
1 changed files with 7 additions and 1 deletions
|
@ -33,6 +33,7 @@ typedef enum {
|
||||||
FUNCTION_TELEMETRY_SMARTPORT = (1 << 5), // 32
|
FUNCTION_TELEMETRY_SMARTPORT = (1 << 5), // 32
|
||||||
FUNCTION_RX_SERIAL = (1 << 6), // 64
|
FUNCTION_RX_SERIAL = (1 << 6), // 64
|
||||||
FUNCTION_BLACKBOX = (1 << 7), // 128
|
FUNCTION_BLACKBOX = (1 << 7), // 128
|
||||||
|
FUNCTION_PASSTHROUGH = (1 << 8), // 256
|
||||||
} serialPortFunction_e;
|
} serialPortFunction_e;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -92,6 +93,7 @@ typedef struct serialConfig_s {
|
||||||
serialPortConfig_t portConfigs[SERIAL_PORT_COUNT];
|
serialPortConfig_t portConfigs[SERIAL_PORT_COUNT];
|
||||||
} serialConfig_t;
|
} serialConfig_t;
|
||||||
|
|
||||||
|
+typedef void serialConsumer(uint8_t);
|
||||||
|
|
||||||
//
|
//
|
||||||
// configuration
|
// configuration
|
||||||
|
@ -108,7 +110,7 @@ serialPortConfig_t *findNextSerialPortConfig(serialPortFunction_e function);
|
||||||
portSharing_e determinePortSharing(serialPortConfig_t *portConfig, serialPortFunction_e function);
|
portSharing_e determinePortSharing(serialPortConfig_t *portConfig, serialPortFunction_e function);
|
||||||
bool isSerialPortShared(serialPortConfig_t *portConfig, uint16_t functionMask, serialPortFunction_e sharedWithFunction);
|
bool isSerialPortShared(serialPortConfig_t *portConfig, uint16_t functionMask, serialPortFunction_e sharedWithFunction);
|
||||||
|
|
||||||
|
serialPortUsage_t *findSerialPortUsageByIdentifier(serialPortIdentifier_e identifier);
|
||||||
|
|
||||||
//
|
//
|
||||||
// runtime
|
// runtime
|
||||||
|
@ -133,3 +135,7 @@ baudRate_e lookupBaudRateIndex(uint32_t baudRate);
|
||||||
//
|
//
|
||||||
void evaluateOtherData(serialPort_t *serialPort, uint8_t receivedChar);
|
void evaluateOtherData(serialPort_t *serialPort, uint8_t receivedChar);
|
||||||
void handleSerial(void);
|
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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue