aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/microblaze/lib/hal_uart.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/microblaze/lib/hal_uart.h')
-rw-r--r--firmware/microblaze/lib/hal_uart.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/microblaze/lib/hal_uart.h b/firmware/microblaze/lib/hal_uart.h
index 051dffe92..b9b0a5e14 100644
--- a/firmware/microblaze/lib/hal_uart.h
+++ b/firmware/microblaze/lib/hal_uart.h
@@ -27,6 +27,8 @@
#define DEFAULT_UART UART_DEBUG //which UART printf, gets, etc. use
+#define HAL_UART_TIMEOUT_MS 100
+
typedef enum {
US_9600 = 0,
US_19200 = 1,
@@ -82,6 +84,11 @@ void hal_uart_putc_nowait(hal_uart_name_t u, int ch);
*/
int hal_uart_getc(hal_uart_name_t u);
+/*
+ * \brief Blocking read of next char from serial port with timeout
+ */
+int hal_uart_getc_timeout(hal_uart_name_t u);
+
int hal_uart_rx_flush(hal_uart_name_t u);
#endif /* INCLUDED_HAL_UART_H */