usart: usart_config should be called by application.
This commit is contained in:
@@ -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 = ((1 << 18) | (1 << 17));
|
||||||
RCC->APB1RSTR = 0;
|
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);
|
chopstx_create (prio, stack_addr, stack_size, usart_main, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -238,6 +238,9 @@ main (int argc, const char *argv[])
|
|||||||
|
|
||||||
usart_init (PRIO_USART, STACK_ADDR_USART, STACK_SIZE_USART, ss_notify);
|
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.cdc = cdc_open (0);
|
||||||
cdc_usart0.dev_no = 2;
|
cdc_usart0.dev_no = 2;
|
||||||
cdc_usart1.cdc = cdc_open (1);
|
cdc_usart1.cdc = cdc_open (1);
|
||||||
|
|||||||
Reference in New Issue
Block a user