aboutsummaryrefslogtreecommitdiff
path: root/platforms/chibios/drivers/uart.h
diff options
context:
space:
mode:
authorRyan <[email protected]>2021-11-14 05:23:14 +1100
committerGitHub <[email protected]>2021-11-13 18:23:14 +0000
commit04b51e381e2ff3f4c7aba662e1c817ce5daa931d (patch)
tree3b5c4415b94184f182d11e2629b405af9b3f0c57 /platforms/chibios/drivers/uart.h
parent7e86c37962935e2f791864201b684345995f0b82 (diff)
downloadqmk_firmware-04b51e381e2ff3f4c7aba662e1c817ce5daa931d.tar.gz
qmk_firmware-04b51e381e2ff3f4c7aba662e1c817ce5daa931d.zip
Update UART driver API (#14839)
* Add uart_puts() and uart_gets() * Add some docs * Rework API * Formatting * Update docs/uart_driver.md Co-authored-by: Sergey Vlasov <[email protected]> * Simplify a uart_write() loop * Update platforms/avr/drivers/uart.c Co-authored-by: Joel Challis <[email protected]> Co-authored-by: Sergey Vlasov <[email protected]> Co-authored-by: Joel Challis <[email protected]>
Diffstat (limited to 'platforms/chibios/drivers/uart.h')
-rw-r--r--platforms/chibios/drivers/uart.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/platforms/chibios/drivers/uart.h b/platforms/chibios/drivers/uart.h
index b4e20e9fd3..5bc4875901 100644
--- a/platforms/chibios/drivers/uart.h
+++ b/platforms/chibios/drivers/uart.h
@@ -70,8 +70,12 @@
void uart_init(uint32_t baud);
-void uart_putchar(uint8_t c);
+void uart_write(uint8_t data);
-uint8_t uart_getchar(void);
+uint8_t uart_read(void);
+
+void uart_transmit(const uint8_t *data, uint16_t length);
+
+void uart_receive(uint8_t *data, uint16_t length);
bool uart_available(void);