diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-09 22:04:45 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-09 22:04:45 +0000 |
commit | 2d45429122e61c7292349986e6bc77f4b74d80a0 (patch) | |
tree | a5b4f9eff51fa6a42c2bccbff8c15d60de70d4d6 /stm/printf.c | |
parent | 0d4cab13dd5a26a4f635996a74c2dd914a7dc344 (diff) | |
download | micropython-2d45429122e61c7292349986e6bc77f4b74d80a0.tar.gz micropython-2d45429122e61c7292349986e6bc77f4b74d80a0.zip |
Use memcpy instead of strncpy; add usart.status to stm.
Diffstat (limited to 'stm/printf.c')
-rw-r--r-- | stm/printf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/stm/printf.c b/stm/printf.c index bd8bb2d256..8a40a61a5f 100644 --- a/stm/printf.c +++ b/stm/printf.c @@ -219,10 +219,13 @@ int pfenv_printf(const pfenv_t *pfenv, const char *fmt, va_list args) { void stdout_print_strn(void *data, const char *str, unsigned int len) { // send stdout to USART, USB CDC VCP, and LCD if nothing else bool any = false; + + // TODO should have a setting for which USART port to send to if (usart_is_enabled()) { usart_tx_strn_cooked(str, len); any = true; } + if (usb_vcp_is_enabled()) { usb_vcp_send_strn_cooked(str, len); any = true; |