mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 22:20:37 +00:00
unify setting main baud rate
This commit is contained in:
parent
fab26ab36e
commit
7dd9d0ecf8
14
src/hci.c
14
src/hci.c
@ -854,10 +854,16 @@ static void hci_initialization_timeout_handler(timer_source_t * ds){
|
||||
hci_stack->num_cmd_packets = 1;
|
||||
hci_run();
|
||||
break;
|
||||
case HCI_INIT_W4_SEND_BAUD_CHANGE:
|
||||
log_info("Local baud rate change to %"PRIu32, ((hci_uart_config_t *)hci_stack->config)->baudrate_main);
|
||||
hci_stack->hci_transport->set_baudrate(((hci_uart_config_t *)hci_stack->config)->baudrate_main);
|
||||
break;
|
||||
case HCI_INIT_W4_SEND_BAUD_CHANGE: {
|
||||
uint32_t baud_rate = ((hci_uart_config_t *)hci_stack->config)->baudrate_main;
|
||||
// Limit baud rate for Broadcom chipsets to 3 mbps
|
||||
if (hci_stack->manufacturer == 0x000f && baud_rate > 3000000){
|
||||
baud_rate = 3000000;
|
||||
}
|
||||
log_info("Local baud rate change to %"PRIu32, baud_rate);
|
||||
hci_stack->hci_transport->set_baudrate(baud_rate);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user