mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-16 08:42:28 +00:00
h4: fix warning about set but not read ehcill vars if ehcill is not used
This commit is contained in:
parent
065e52f383
commit
2e25934bb0
@ -129,8 +129,10 @@ static btstack_uart_config_t uart_config;
|
|||||||
|
|
||||||
// write state
|
// write state
|
||||||
static TX_STATE tx_state;
|
static TX_STATE tx_state;
|
||||||
static uint8_t * tx_data;
|
#ifdef ENABLE_EHCILL
|
||||||
static uint16_t tx_len; // 0 == no outgoing packet
|
static uint8_t * ehcill_tx_data;
|
||||||
|
static uint16_t ehcill_tx_len; // 0 == no outgoing packet
|
||||||
|
#endif
|
||||||
|
|
||||||
static uint8_t packet_sent_event[] = { HCI_EVENT_TRANSPORT_PACKET_SENT, 0};
|
static uint8_t packet_sent_event[] = { HCI_EVENT_TRANSPORT_PACKET_SENT, 0};
|
||||||
|
|
||||||
@ -266,7 +268,9 @@ static void hci_transport_h4_block_sent(void){
|
|||||||
switch (tx_state){
|
switch (tx_state){
|
||||||
case TX_W4_PACKET_SENT:
|
case TX_W4_PACKET_SENT:
|
||||||
// packet fully sent, reset state
|
// packet fully sent, reset state
|
||||||
tx_len = 0;
|
#ifdef ENABLE_EHCILL
|
||||||
|
ehcill_tx_len = 0;
|
||||||
|
#endif
|
||||||
tx_state = TX_IDLE;
|
tx_state = TX_IDLE;
|
||||||
|
|
||||||
#ifdef ENABLE_EHCILL
|
#ifdef ENABLE_EHCILL
|
||||||
@ -308,11 +312,10 @@ static int hci_transport_h4_send_packet(uint8_t packet_type, uint8_t * packet, i
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// store request
|
|
||||||
tx_len = size;
|
|
||||||
tx_data = packet;
|
|
||||||
|
|
||||||
#ifdef ENABLE_EHCILL
|
#ifdef ENABLE_EHCILL
|
||||||
|
// store request for later
|
||||||
|
ehcill_tx_len = size;
|
||||||
|
ehcill_tx_data = packet;
|
||||||
switch (ehcill_state){
|
switch (ehcill_state){
|
||||||
case EHCILL_STATE_SLEEP:
|
case EHCILL_STATE_SLEEP:
|
||||||
hci_transport_h4_ehcill_trigger_wakeup();
|
hci_transport_h4_ehcill_trigger_wakeup();
|
||||||
@ -442,7 +445,7 @@ static void hci_transport_h4_echill_send_wakeup_ind(void){
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int hci_transport_h4_ehcill_outgoing_packet_ready(void){
|
static int hci_transport_h4_ehcill_outgoing_packet_ready(void){
|
||||||
return tx_len != 0;
|
return ehcill_tx_len != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hci_transport_h4_ehcill_reset_statemachine(void){
|
static void hci_transport_h4_ehcill_reset_statemachine(void){
|
||||||
@ -588,7 +591,7 @@ static void hci_transport_h4_ehcill_handle_command(uint8_t action){
|
|||||||
#endif
|
#endif
|
||||||
tx_state = TX_W4_PACKET_SENT;
|
tx_state = TX_W4_PACKET_SENT;
|
||||||
ehcill_state = EHCILL_STATE_AWAKE;
|
ehcill_state = EHCILL_STATE_AWAKE;
|
||||||
btstack_uart->send_block(tx_data, tx_len);
|
btstack_uart->send_block(ehcill_tx_data, ehcill_tx_len);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user