Update serial.h

This commit is contained in:
Ferdia McKeogh 2016-02-16 17:33:30 +00:00
parent 7b7ee481db
commit c31fd202c5
1 changed files with 7 additions and 1 deletions

View File

@ -33,6 +33,7 @@ typedef enum {
FUNCTION_TELEMETRY_SMARTPORT = (1 << 5), // 32
FUNCTION_RX_SERIAL = (1 << 6), // 64
FUNCTION_BLACKBOX = (1 << 7), // 128
FUNCTION_PASSTHROUGH = (1 << 8), // 256
} serialPortFunction_e;
typedef enum {
@ -92,6 +93,7 @@ typedef struct serialConfig_s {
serialPortConfig_t portConfigs[SERIAL_PORT_COUNT];
} serialConfig_t;
+typedef void serialConsumer(uint8_t);
//
// configuration
@ -108,7 +110,7 @@ serialPortConfig_t *findNextSerialPortConfig(serialPortFunction_e function);
portSharing_e determinePortSharing(serialPortConfig_t *portConfig, serialPortFunction_e function);
bool isSerialPortShared(serialPortConfig_t *portConfig, uint16_t functionMask, serialPortFunction_e sharedWithFunction);
serialPortUsage_t *findSerialPortUsageByIdentifier(serialPortIdentifier_e identifier);
//
// runtime
@ -133,3 +135,7 @@ baudRate_e lookupBaudRateIndex(uint32_t baudRate);
//
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);