diff options
author | Andrew Leech <andrew@alelec.net> | 2021-02-17 13:45:14 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-02-17 14:50:38 +1100 |
commit | 629fdc366adacf345bbacd83145be2f78823ee57 (patch) | |
tree | fd4d080894835bbf56d5f60510caeec109d16dc7 | |
parent | 5c92ff53fed97ca1f5f5b8cd427b49ee79037298 (diff) |
stm32/mpbthciport: Fix initial baudrate to use provided value.
Fixes bug introduced in the recent bffb71f523e4bcc21b913af291deeb67091bed88
-rw-r--r-- | ports/stm32/mpbthciport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/stm32/mpbthciport.c b/ports/stm32/mpbthciport.c index 5e51892e6..2d34e5e2b 100644 --- a/ports/stm32/mpbthciport.c +++ b/ports/stm32/mpbthciport.c @@ -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; // 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); // Add IRQ handler for IDLE (i.e. packet finished). |