usart: usart_config should be called by application.

This commit is contained in:
NIIBE Yutaka
2019-03-01 20:02:15 +09:00
parent 4780da5b5b
commit 304441d393
2 changed files with 3 additions and 2 deletions

View File

@@ -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);
}

View File

@@ -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);