diff options
| author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-02-15 06:55:43 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-15 06:55:43 +1100 |
| commit | c27a778281824423a324d04276d291f06b49b1ae (patch) | |
| tree | cd5a76f152596d05e45f2aa24f7dd4c661ced3ec /drivers | |
| parent | 4ddb5abea51251c6f76c272724984f77f0596f90 (diff) | |
| download | qmk_firmware-c27a778281824423a324d04276d291f06b49b1ae.tar.gz qmk_firmware-c27a778281824423a324d04276d291f06b49b1ae.zip | |
Format code according to conventions (#11905)
Co-authored-by: QMK Bot <hello@qmk.fm>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/chibios/uart.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/chibios/uart.c b/drivers/chibios/uart.c index 6e94899b9..030335b34 100644 --- a/drivers/chibios/uart.c +++ b/drivers/chibios/uart.c | |||
| @@ -18,12 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | #include "quantum.h" | 19 | #include "quantum.h" |
| 20 | 20 | ||
| 21 | static SerialConfig serialConfig = { | 21 | static SerialConfig serialConfig = {SERIAL_DEFAULT_BITRATE, SD1_CR1, SD1_CR2, SD1_CR3}; |
| 22 | SERIAL_DEFAULT_BITRATE, | ||
| 23 | SD1_CR1, | ||
| 24 | SD1_CR2, | ||
| 25 | SD1_CR3 | ||
| 26 | }; | ||
| 27 | 22 | ||
| 28 | void uart_init(uint32_t baud) { | 23 | void uart_init(uint32_t baud) { |
| 29 | static bool is_initialised = false; | 24 | static bool is_initialised = false; |
| @@ -44,9 +39,7 @@ void uart_init(uint32_t baud) { | |||
| 44 | } | 39 | } |
| 45 | } | 40 | } |
| 46 | 41 | ||
| 47 | void uart_putchar(uint8_t c) { | 42 | void uart_putchar(uint8_t c) { sdPut(&SERIAL_DRIVER, c); } |
| 48 | sdPut(&SERIAL_DRIVER, c); | ||
| 49 | } | ||
| 50 | 43 | ||
| 51 | uint8_t uart_getchar(void) { | 44 | uint8_t uart_getchar(void) { |
| 52 | msg_t res = sdGet(&SERIAL_DRIVER); | 45 | msg_t res = sdGet(&SERIAL_DRIVER); |
| @@ -54,6 +47,4 @@ uint8_t uart_getchar(void) { | |||
| 54 | return (uint8_t)res; | 47 | return (uint8_t)res; |
| 55 | } | 48 | } |
| 56 | 49 | ||
| 57 | bool uart_available(void) { | 50 | bool uart_available(void) { return !sdGetWouldBlock(&SERIAL_DRIVER); } |
| 58 | return !sdGetWouldBlock(&SERIAL_DRIVER); | ||
| 59 | } | ||
