diff options
Diffstat (limited to 'controller/fw/src/serial.c')
-rw-r--r-- | controller/fw/src/serial.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/controller/fw/src/serial.c b/controller/fw/src/serial.c index 2d09f80..12df28a 100644 --- a/controller/fw/src/serial.c +++ b/controller/fw/src/serial.c @@ -165,18 +165,22 @@ int usart_flush(volatile struct usart_desc *us) { return 0; } -int usart_printf(volatile struct usart_desc *us, char *fmt, ...) { +int usart_printf(volatile struct usart_desc *us, const char *fmt, ...) { va_list va; va_start(va, fmt); tfp_format((void *)us, usart_putc_nonblocking_tpf, fmt, va); return usart_flush(us); } -int usart_printf_blocking(volatile struct usart_desc *us, char *fmt, ...) { - va_list va; - va_start(va, fmt); +int usart_printf_blocking_va(volatile struct usart_desc *us, const char *fmt, va_list va) { tfp_format((void *)us, usart_putc_blocking_tpf, fmt, va); usart_wait_chunk_free(us); return usart_flush(us); } +int usart_printf_blocking(volatile struct usart_desc *us, const char *fmt, ...) { + va_list va; + va_start(va, fmt); + return usart_printf_blocking_va(us, fmt, va); +} + |