From 304441d393087cd5d4baaa91bc5c29a2cf3a99ff Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Fri, 1 Mar 2019 20:02:15 +0900 Subject: [PATCH] usart: usart_config should be called by application. --- contrib/usart-stm32f103.c | 2 -- example-usb-serial/sample.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/usart-stm32f103.c b/contrib/usart-stm32f103.c index 82e8438..e3f29ee 100644 --- a/contrib/usart-stm32f103.c +++ b/contrib/usart-stm32f103.c @@ -213,8 +213,6 @@ usart_init (uint16_t prio, uintptr_t stack_addr, size_t stack_size, RCC->APB1RSTR = ((1 << 18) | (1 << 17)); RCC->APB1RSTR = 0; - usart_config (2, B115200 | CS8 | STOP1B); - usart_config (3, B115200 | CS8 | STOP1B); chopstx_create (prio, stack_addr, stack_size, usart_main, NULL); } diff --git a/example-usb-serial/sample.c b/example-usb-serial/sample.c index f87b6b6..07f6d31 100644 --- a/example-usb-serial/sample.c +++ b/example-usb-serial/sample.c @@ -238,6 +238,9 @@ main (int argc, const char *argv[]) usart_init (PRIO_USART, STACK_ADDR_USART, STACK_SIZE_USART, ss_notify); + usart_config (2, B115200 | CS8 | STOP1B); + usart_config (3, B115200 | CS8 | STOP1B); + cdc_usart0.cdc = cdc_open (0); cdc_usart0.dev_no = 2; cdc_usart1.cdc = cdc_open (1);