hci: use btstack_chipset_result_t enum

This commit is contained in:
Matthias Ringwald 2018-01-16 18:03:19 +01:00
parent 7c5b4db433
commit f41911ede3

View File

@ -1144,11 +1144,11 @@ static void hci_initializing_run(void){
hci_stack->last_cmd_opcode = little_endian_read_16(hci_stack->hci_packet_buffer, 0);
hci_dump_packet(HCI_COMMAND_DATA_PACKET, 0, hci_stack->hci_packet_buffer, size);
switch (valid_cmd) {
case 1:
default:
case BTSTACK_CHIPSET_VALID_COMMAND:
hci_stack->substate = HCI_INIT_W4_CUSTOM_INIT;
break;
case 2: // CSR Warm Boot: Wait a bit, then send HCI Reset until HCI Command Complete
case BTSTACK_CHIPSET_WARMSTART_REQUIRED:
// CSR Warm Boot: Wait a bit, then send HCI Reset until HCI Command Complete
log_info("CSR Warm Boot");
btstack_run_loop_set_timer(&hci_stack->timeout, HCI_RESET_RESEND_TIMEOUT_MS);
btstack_run_loop_set_timer_handler(&hci_stack->timeout, hci_initialization_timeout_handler);
@ -1164,6 +1164,9 @@ static void hci_initializing_run(void){
hci_stack->substate = HCI_INIT_W4_CUSTOM_INIT_CSR_WARM_BOOT_LINK_RESET;
}
break;
default:
// should not get here
break;
}
hci_stack->hci_transport->send_packet(HCI_COMMAND_DATA_PACKET, hci_stack->hci_packet_buffer, size);
break;