mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-01 04:20:33 +00:00
hci_init: use log_debug for init script output
This commit is contained in:
parent
0e5ac34f5e
commit
148ca237ee
11
src/hci.c
11
src/hci.c
@ -913,7 +913,7 @@ static void hci_initializing_next_state(void){
|
|||||||
|
|
||||||
// assumption: hci_can_send_command_packet_now() == true
|
// assumption: hci_can_send_command_packet_now() == true
|
||||||
static void hci_initializing_run(void){
|
static void hci_initializing_run(void){
|
||||||
log_info("hci_initializing_run: substate %u, can send %u", hci_stack->substate, hci_can_send_command_packet_now());
|
log_debug("hci_initializing_run: substate %u, can send %u", hci_stack->substate, hci_can_send_command_packet_now());
|
||||||
switch (hci_stack->substate){
|
switch (hci_stack->substate){
|
||||||
case HCI_INIT_SEND_RESET:
|
case HCI_INIT_SEND_RESET:
|
||||||
hci_state_reset();
|
hci_state_reset();
|
||||||
@ -970,7 +970,6 @@ static void hci_initializing_run(void){
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case HCI_INIT_CUSTOM_INIT:
|
case HCI_INIT_CUSTOM_INIT:
|
||||||
log_info("Custom init");
|
|
||||||
// Custom initialization
|
// Custom initialization
|
||||||
if (hci_stack->chipset && hci_stack->chipset->next_command){
|
if (hci_stack->chipset && hci_stack->chipset->next_command){
|
||||||
int valid_cmd = (*hci_stack->chipset->next_command)(hci_stack->hci_packet_buffer);
|
int valid_cmd = (*hci_stack->chipset->next_command)(hci_stack->hci_packet_buffer);
|
||||||
@ -1003,7 +1002,7 @@ static void hci_initializing_run(void){
|
|||||||
hci_stack->hci_transport->send_packet(HCI_COMMAND_DATA_PACKET, hci_stack->hci_packet_buffer, size);
|
hci_stack->hci_transport->send_packet(HCI_COMMAND_DATA_PACKET, hci_stack->hci_packet_buffer, size);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
log_info("hci_run: init script done");
|
log_info("Init script done");
|
||||||
|
|
||||||
// Init script download causes baud rate to reset on Broadcom chipsets, restore UART baud rate if needed
|
// Init script download causes baud rate to reset on Broadcom chipsets, restore UART baud rate if needed
|
||||||
if (hci_stack->manufacturer == COMPANY_ID_BROADCOM_CORPORATION){
|
if (hci_stack->manufacturer == COMPANY_ID_BROADCOM_CORPORATION){
|
||||||
@ -1144,7 +1143,7 @@ static void hci_initializing_event_handler(uint8_t * packet, uint16_t size){
|
|||||||
uint16_t opcode = little_endian_read_16(packet,3);
|
uint16_t opcode = little_endian_read_16(packet,3);
|
||||||
if (opcode == hci_stack->last_cmd_opcode){
|
if (opcode == hci_stack->last_cmd_opcode){
|
||||||
command_completed = 1;
|
command_completed = 1;
|
||||||
log_info("Command complete for expected opcode %04x at substate %u", opcode, hci_stack->substate);
|
log_debug("Command complete for expected opcode %04x at substate %u", opcode, hci_stack->substate);
|
||||||
} else {
|
} else {
|
||||||
log_info("Command complete for different opcode %04x, expected %04x, at substate %u", opcode, hci_stack->last_cmd_opcode, hci_stack->substate);
|
log_info("Command complete for different opcode %04x, expected %04x, at substate %u", opcode, hci_stack->last_cmd_opcode, hci_stack->substate);
|
||||||
}
|
}
|
||||||
@ -1156,12 +1155,12 @@ static void hci_initializing_event_handler(uint8_t * packet, uint16_t size){
|
|||||||
if (opcode == hci_stack->last_cmd_opcode){
|
if (opcode == hci_stack->last_cmd_opcode){
|
||||||
if (status){
|
if (status){
|
||||||
command_completed = 1;
|
command_completed = 1;
|
||||||
log_error("Command status error 0x%02x for expected opcode %04x at substate %u", status, opcode, hci_stack->substate);
|
log_debug("Command status error 0x%02x for expected opcode %04x at substate %u", status, opcode, hci_stack->substate);
|
||||||
} else {
|
} else {
|
||||||
log_info("Command status OK for expected opcode %04x, waiting for command complete", opcode);
|
log_info("Command status OK for expected opcode %04x, waiting for command complete", opcode);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log_info("Command status for opcode %04x, expected %04x", opcode, hci_stack->last_cmd_opcode);
|
log_debug("Command status for opcode %04x, expected %04x", opcode, hci_stack->last_cmd_opcode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user