drivers/cyw43: Use a different baudrate for BT firmware download.

Allow boards to define a specific firmware for Bluetooth firmware download,
or none at all.
This commit is contained in:
iabdalkader 2023-02-24 13:44:50 +01:00 committed by Damien George
parent 4937174b43
commit fb65ef48b4
1 changed files with 4 additions and 2 deletions

View File

@ -190,9 +190,11 @@ int mp_bluetooth_hci_controller_init(void) {
// Reset
cywbt_hci_cmd(0x03, 0x0003, 0, NULL);
#ifdef MICROPY_HW_BLE_UART_BAUDRATE_DOWNLOAD_FIRMWARE
// Change baudrate
cywbt_set_baudrate(MICROPY_HW_BLE_UART_BAUDRATE_SECONDARY);
mp_bluetooth_hci_uart_set_baudrate(MICROPY_HW_BLE_UART_BAUDRATE_SECONDARY);
cywbt_set_baudrate(MICROPY_HW_BLE_UART_BAUDRATE_DOWNLOAD_FIRMWARE);
mp_bluetooth_hci_uart_set_baudrate(MICROPY_HW_BLE_UART_BAUDRATE_DOWNLOAD_FIRMWARE);
#endif
cywbt_download_firmware((const uint8_t*)&cyw43_btfw_4343A1[0]);