From 328708eb2504eae2ca8132c948bc3b1fc1c95243 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 13 Jan 2014 00:20:06 +0000 Subject: 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. --- stm/printf.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'stm/printf.c') diff --git a/stm/printf.c b/stm/printf.c index fa9426925..c644cd94f 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; -- cgit v1.2.3