diff --git a/src/command.c b/src/command.c index 1537a9de..369357d9 100644 --- a/src/command.c +++ b/src/command.c @@ -316,14 +316,9 @@ static bool cmd_convert_tdio(target *t, int argc, const char **argv) { (void)t; (void) argc; + (void) argv; - uint32_t res = 0; - - if (argc > 1) - res = usbuart_convert_tdio(atoi(argv[1])); - else - res = usbuart_convert_tdio(0); - gdb_outf("BAUD: %d\n", res); + usbuart_convert_tdio(0); return true; } diff --git a/src/platforms/samd/usbuart.c b/src/platforms/samd/usbuart.c index 609be40c..0d9c992e 100644 --- a/src/platforms/samd/usbuart.c +++ b/src/platforms/samd/usbuart.c @@ -88,7 +88,7 @@ void usbuart_init(void) //usart_enable(USART_NUM, current_baud); usart_setup(USART_NUM, current_baud); #ifndef DEBUG_ME - usart_set_pads(USART_NUM, 3, 0); /* uses different pads than the default */ + usart_set_pads(USART_NUM, 3, 0); /* bm-sam uses different pads */ #endif usart_enable(USART_NUM, 0); /* baud==0 so setup is skipped */ @@ -98,7 +98,6 @@ void usbuart_init(void) int usbuart_convert_tdio(uint32_t arg) { -#if 1 (void) arg; @@ -130,18 +129,6 @@ int usbuart_convert_tdio(uint32_t arg) return current_baud; - /* FOR TESTING PURPOSES ONLY */ -#else - if (arg){ - usart_disable(USART_NUM); - usart_set_baudrate(USART_NUM, arg); - usart_enable(USART_NUM, 0); - current_baud = arg; - } else - usart_send(0, 65); - - return current_baud; -#endif } void usbuart_set_line_coding(struct usb_cdc_line_coding *coding)