summaryrefslogtreecommitdiffstatshomepage
path: root/stm/printf.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-13 00:20:06 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-13 00:20:06 +0000
commit328708eb2504eae2ca8132c948bc3b1fc1c95243 (patch)
treeea721d8d4185cdc8650d6c128b3f7dba7fddd77d /stm/printf.c
parentfd17921b75817a07d688ccaa9130f65c1181f910 (diff)
downloadmicropython-328708eb2504eae2ca8132c948bc3b1fc1c95243.tar.gz
micropython-328708eb2504eae2ca8132c948bc3b1fc1c95243.zip
stm: Re-instate C debugging USART port (disabled by default).
See pyb_usart_global_debug variable. Also did some work on USB OTG, but nothing working yet.
Diffstat (limited to 'stm/printf.c')
-rw-r--r--stm/printf.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/stm/printf.c b/stm/printf.c
index fa94269257..c644cd94ff 100644
--- a/stm/printf.c
+++ b/stm/printf.c
@@ -220,14 +220,10 @@ 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 0 // if 0'd out so that we're not calling functions with the wrong arguments
- if (usart_is_enabled()) {
- usart_tx_strn_cooked(str, len);
+ if (pyb_usart_global_debug != PYB_USART_NONE) {
+ usart_tx_strn_cooked(pyb_usart_global_debug, str, len);
any = true;
}
-#endif
-
if (usb_vcp_is_enabled()) {
usb_vcp_send_strn_cooked(str, len);
any = true;