diff options
author | Damien George <damien@micropython.org> | 2021-02-17 16:06:56 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-02-17 16:06:56 +1100 |
commit | cf6a0158806b11c521b9c9f8a1104f577a78fe1e (patch) | |
tree | 969be27fa911324612be6b2cb3c60855bc5a5abc | |
parent | 301fe805caaa4ff6a566fb4ef494ef18553dfbfe (diff) |
extmod/btstack: Use MICROPY_HW_BLE_UART_BAUDRATE for first UART init.
Otherwise the UART may be left in a state at baudrate=0.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r-- | extmod/btstack/btstack_hci_uart.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/extmod/btstack/btstack_hci_uart.c b/extmod/btstack/btstack_hci_uart.c index 0a137bbae..7205dba06 100644 --- a/extmod/btstack/btstack_hci_uart.c +++ b/extmod/btstack/btstack_hci_uart.c @@ -67,8 +67,7 @@ STATIC int btstack_uart_init(const btstack_uart_config_t *uart_config) { send_handler = NULL; // Set up the UART peripheral, attach IRQ and power up the HCI controller. - // We haven't been told the baud rate yet, so defer that until btstack_uart_set_baudrate. - if (mp_bluetooth_hci_uart_init(MICROPY_HW_BLE_UART_ID, 0)) { + if (mp_bluetooth_hci_uart_init(MICROPY_HW_BLE_UART_ID, MICROPY_HW_BLE_UART_BAUDRATE)) { init_success = false; return -1; } |