stm32/mpbthciport: Fix initial baudrate to use provided value.

Fixes bug introduced in the recent bffb71f523
This commit is contained in:
Andrew Leech 2021-02-17 13:45:14 +11:00 committed by Damien George
parent 5c92ff53fe
commit 629fdc366a
1 changed files with 1 additions and 1 deletions

View File

@ -196,7 +196,7 @@ int mp_bluetooth_hci_uart_init(uint32_t port, uint32_t baudrate) {
MP_STATE_PORT(pyb_uart_obj_all)[mp_bluetooth_hci_uart_obj.uart_id - 1] = &mp_bluetooth_hci_uart_obj; MP_STATE_PORT(pyb_uart_obj_all)[mp_bluetooth_hci_uart_obj.uart_id - 1] = &mp_bluetooth_hci_uart_obj;
// Initialise the UART. // Initialise the UART.
uart_init(&mp_bluetooth_hci_uart_obj, 115200, UART_WORDLENGTH_8B, UART_PARITY_NONE, UART_STOPBITS_1, UART_HWCONTROL_RTS | UART_HWCONTROL_CTS); uart_init(&mp_bluetooth_hci_uart_obj, baudrate, UART_WORDLENGTH_8B, UART_PARITY_NONE, UART_STOPBITS_1, UART_HWCONTROL_RTS | UART_HWCONTROL_CTS);
uart_set_rxbuf(&mp_bluetooth_hci_uart_obj, sizeof(hci_uart_rxbuf), hci_uart_rxbuf); uart_set_rxbuf(&mp_bluetooth_hci_uart_obj, sizeof(hci_uart_rxbuf), hci_uart_rxbuf);
// Add IRQ handler for IDLE (i.e. packet finished). // Add IRQ handler for IDLE (i.e. packet finished).