hfp: fix compile

This commit is contained in:
Milanka Ringwald 2015-07-16 10:57:00 +02:00
parent b1d931f9ca
commit 7a5779a838
3 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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){

View File

@ -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){