From f41911ede3e60cbb330bca41e478c066545e76a4 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Tue, 16 Jan 2018 18:03:19 +0100 Subject: [PATCH] hci: use btstack_chipset_result_t enum --- src/hci.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/hci.c b/src/hci.c index 367206b1e..5e39860ad 100644 --- a/src/hci.c +++ b/src/hci.c @@ -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;