fix bumblebee irq entry aligment, fix eclic

This commit is contained in:
acevest
2020-01-09 20:18:18 +08:00
parent 5920066f21
commit bce32faac2
12 changed files with 113 additions and 41 deletions

View File

@@ -19,15 +19,23 @@ __API__ int tos_hal_uart_init(hal_uart_t *uart, hal_uart_port_t port)
}
if (port == HAL_UART_PORT_0) {
uart->private_uart = &huart0;
usart0_init(115200);
} else if (port == HAL_UART_PORT_1) {
uart->private_uart = &huart1;
usart1_init(115200);
} else if (port == HAL_UART_PORT_2) {
uart->private_uart = &huart2;
usart2_init(115200);
} else {
return -1;
}
uart->port = ((UART_HandleTypeDef*)(uart->private_uart))->port;
return 0;
}