diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-21 12:03:09 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-21 12:03:09 +0100 |
commit | 7533700393b4b5d4858e1f5745be4544b2a970cc (patch) | |
tree | d76bd5859079d5494840670c49fe2886d1fb77e2 /stmhal/pybstdio.c | |
parent | 806f4aef9acd9d8990681b9ba73362d995b59417 (diff) |
stmhal: Rename USART to UART.
It's really a UART because there is no external clock line (and hence no
synchronous ability, at least in the implementation of this module).
USART should be reserved for a module that has "S"ynchronous capabilities.
Also, UART is shorter and easier to type :)
Diffstat (limited to 'stmhal/pybstdio.c')
-rw-r--r-- | stmhal/pybstdio.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/stmhal/pybstdio.c b/stmhal/pybstdio.c index baabfd120..7026698a0 100644 --- a/stmhal/pybstdio.c +++ b/stmhal/pybstdio.c @@ -10,11 +10,11 @@ #include "stream.h" #include "pybstdio.h" #include "usb.h" -#include "usart.h" +#include "uart.h" void stdout_tx_str(const char *str) { - if (pyb_usart_global_debug != PYB_USART_NONE) { - usart_tx_str(pyb_usart_global_debug, str); + if (pyb_uart_global_debug != PYB_UART_NONE) { + uart_tx_str(pyb_uart_global_debug, str); } #if defined(USE_HOST_MODE) && MICROPY_HW_HAS_LCD lcd_print_str(str); @@ -23,8 +23,8 @@ void stdout_tx_str(const char *str) { } void stdout_tx_strn(const char *str, uint len) { - if (pyb_usart_global_debug != PYB_USART_NONE) { - usart_tx_strn(pyb_usart_global_debug, str, len); + if (pyb_uart_global_debug != PYB_UART_NONE) { + uart_tx_strn(pyb_uart_global_debug, str, len); } #if defined(USE_HOST_MODE) && MICROPY_HW_HAS_LCD lcd_print_strn(str, len); @@ -45,8 +45,8 @@ int stdin_rx_chr(void) { #endif if (usb_vcp_rx_num() != 0) { return usb_vcp_rx_get(); - } else if (pyb_usart_global_debug != PYB_USART_NONE && usart_rx_any(pyb_usart_global_debug)) { - return usart_rx_char(pyb_usart_global_debug); + } else if (pyb_uart_global_debug != PYB_UART_NONE && uart_rx_any(pyb_uart_global_debug)) { + return uart_rx_char(pyb_uart_global_debug); } __WFI(); } |