mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
format code properly
match the comment from pullrequest about spacing remains : some hand alignment for comment and wrong /** */ usage. Conflicts: src/board.h src/buzzer.c src/config.c src/drivers/serial_common.h src/drivers/system_common.c src/drv_gpio.h src/drv_pwm.c src/drv_timer.c src/drv_uart.c src/flight_imu.c src/mw.c src/serial_cli.c
This commit is contained in:
parent
ab2273f93e
commit
cabc57774c
27 changed files with 141 additions and 135 deletions
|
@ -7,17 +7,18 @@ typedef enum {
|
|||
} serialInversion_e;
|
||||
|
||||
typedef enum portMode_t {
|
||||
MODE_RX = 1 << 0,
|
||||
MODE_RX = 1 << 0,
|
||||
MODE_TX = 1 << 1,
|
||||
MODE_RXTX = MODE_RX | MODE_TX,
|
||||
MODE_SBUS = 1 << 2,
|
||||
} portMode_t;
|
||||
|
||||
typedef void (* serialReceiveCallbackPtr)(uint16_t data); // used by serial drivers to return frames to app
|
||||
typedef void (*serialReceiveCallbackPtr)(uint16_t data); // used by serial drivers to return frames to app
|
||||
|
||||
typedef struct serialPort {
|
||||
|
||||
|
||||
const struct serialPortVTable *vTable;
|
||||
|
||||
uint8_t identifier;
|
||||
portMode_t mode;
|
||||
serialInversion_e inversion;
|
||||
|
@ -38,14 +39,14 @@ typedef struct serialPort {
|
|||
|
||||
struct serialPortVTable {
|
||||
void (*serialWrite)(serialPort_t *instance, uint8_t ch);
|
||||
|
||||
|
||||
uint8_t (*serialTotalBytesWaiting)(serialPort_t *instance);
|
||||
|
||||
|
||||
uint8_t (*serialRead)(serialPort_t *instance);
|
||||
|
||||
|
||||
// Specified baud rate may not be allowed by an implementation, use serialGetBaudRate to determine actual baud rate in use.
|
||||
void (*serialSetBaudRate)(serialPort_t *instance, uint32_t baudRate);
|
||||
|
||||
|
||||
bool (*isSerialTransmitBufferEmpty)(serialPort_t *instance);
|
||||
|
||||
void (*setMode)(serialPort_t *instance, portMode_t mode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue