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>
This commit is contained in:
parent
301fe805ca
commit
cf6a015880
|
@ -67,8 +67,7 @@ STATIC int btstack_uart_init(const btstack_uart_config_t *uart_config) {
|
||||||
send_handler = NULL;
|
send_handler = NULL;
|
||||||
|
|
||||||
// Set up the UART peripheral, attach IRQ and power up the HCI controller.
|
// 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, MICROPY_HW_BLE_UART_BAUDRATE)) {
|
||||||
if (mp_bluetooth_hci_uart_init(MICROPY_HW_BLE_UART_ID, 0)) {
|
|
||||||
init_success = false;
|
init_success = false;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue