8000 extmod/btstack: Use MICROPY_HW_BLE_UART_BAUDRATE for first UART init. · larsks/micropython@cf6a015 · GitHub
[go: up one dir, main page]

Skip to content

Commit cf6a015

Browse files
committed
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>
1 parent 301fe80 commit cf6a015

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

extmod/btstack/btstack_hci_uart.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ STATIC int btstack_uart_init(const btstack_uart_config_t *uart_config) {
6767
send_handler = NULL;
6868

6969
// Set up the UART peripheral, attach IRQ and power up the HCI controller.
70-
// We haven't been told the baud rate yet, so defer that until btstack_uart_set_baudrate.
71-
if (mp_bluetooth_hci_uart_init(MICROPY_HW_BLE_UART_ID, 0)) {
70+
if (mp_bluetooth_hci_uart_init(MICROPY_HW_BLE_UART_ID, MICROPY_HW_BLE_UART_BAUDRATE)) {
7271
init_success = false;
7372
return -1;
7473
}

0 commit comments

Comments
 (0)
0