mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 12:35:25 +00:00
hfp: fix compile
This commit is contained in:
parent
b1d931f9ca
commit
7a5779a838
@ -349,7 +349,7 @@ hfp_connection_t * hfp_handle_hci_event(uint8_t packet_type, uint8_t *packet, ui
|
||||
} else {
|
||||
context->con_handle = READ_BT_16(packet, 9);
|
||||
context->rfcomm_cid = READ_BT_16(packet, 12);
|
||||
uint16_t mtu = READ_BT_16(packet, 14);
|
||||
// uint16_t mtu = READ_BT_16(packet, 14);
|
||||
context->state = HFP_EXCHANGE_SUPPORTED_FEATURES;
|
||||
}
|
||||
break;
|
||||
|
@ -174,6 +174,7 @@ static void hfp_run(hfp_connection_t * connection){
|
||||
int err = 0;
|
||||
switch (connection->state){
|
||||
case HFP_EXCHANGE_SUPPORTED_FEATURES:
|
||||
log_info("HFP_EXCHANGE_SUPPORTED_FEATURES 0x%02x", connection->rfcomm_cid);
|
||||
err = hfp_hs_exchange_supported_features_cmd(connection->rfcomm_cid);
|
||||
break;
|
||||
case HFP_NOTIFY_ON_CODECS:
|
||||
@ -217,6 +218,7 @@ hfp_connection_t * hfp_handle_rfcomm_event(uint8_t packet_type, uint16_t channel
|
||||
size--;
|
||||
packet++;
|
||||
}
|
||||
printf("packet_handler packet size %u\n", size);
|
||||
|
||||
if (context->wait_ok){
|
||||
if (strncmp((char *)packet, HFP_OK, strlen(HFP_OK)) == 0){
|
||||
|
@ -206,7 +206,7 @@ void hsp_ag_create_service(uint8_t * service, int rfcomm_channel_nr, const char
|
||||
}
|
||||
}
|
||||
|
||||
static int send_str_over_rfcomm(uint16_t cid, char * command){
|
||||
int send_str_over_rfcomm(uint16_t cid, char * command){
|
||||
if (!rfcomm_can_send_packet_now(rfcomm_cid)) return 1;
|
||||
int err = rfcomm_send_internal(cid, (uint8_t*) command, strlen(command));
|
||||
if (err){
|
||||
|
Loading…
x
Reference in New Issue
Block a user