diff options
author | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-03-21 14:19:01 +0100 |
---|---|---|
committer | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-03-21 14:19:01 +0100 |
commit | 3beecbc4fa60773ffbdf04ce1908a86be5908551 (patch) | |
tree | 3a470e3e86662804a090141d8843c46ce8620191 /controller/fw/src/serial.c | |
parent | 37338e2ad8ca226119121432b65f6c61134e60ac (diff) | |
download | master-thesis-3beecbc4fa60773ffbdf04ce1908a86be5908551.tar.gz master-thesis-3beecbc4fa60773ffbdf04ce1908a86be5908551.tar.bz2 master-thesis-3beecbc4fa60773ffbdf04ce1908a86be5908551.zip |
Basic JTAG working
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); +} + |