mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-09 21:45:54 +00:00
hfp_ag: emit HFP_SUBEVENT_RING
This commit is contained in:
parent
822d4db7fd
commit
0d38e7e193
@ -551,10 +551,13 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * even
|
||||
sco_demo_close();
|
||||
break;
|
||||
case HFP_SUBEVENT_START_RINGINIG:
|
||||
printf("Start Ringing\n");
|
||||
break;
|
||||
printf("** START Ringing **\n");
|
||||
break;
|
||||
case HFP_SUBEVENT_RING:
|
||||
printf("** Ring **\n");
|
||||
break;
|
||||
case HFP_SUBEVENT_STOP_RINGINIG:
|
||||
printf("Stop Ringing\n");
|
||||
printf("** STOP Ringing **\n");
|
||||
break;
|
||||
case HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER:
|
||||
printf("Outgoing call '%s'\n", hfp_subevent_place_call_with_number_get_number(event));
|
||||
|
@ -1083,10 +1083,10 @@ static void hfp_timeout_handler(btstack_timer_source_t * timer){
|
||||
}
|
||||
|
||||
static void hfp_timeout_start(hfp_connection_t * hfp_connection){
|
||||
btstack_run_loop_remove_timer(& hfp_connection->hfp_timeout);
|
||||
btstack_run_loop_set_timer_handler(& hfp_connection->hfp_timeout, hfp_timeout_handler);
|
||||
btstack_run_loop_set_timer(& hfp_connection->hfp_timeout, 2000); // 2 seconds timeout
|
||||
btstack_run_loop_add_timer(& hfp_connection->hfp_timeout);
|
||||
btstack_run_loop_remove_timer(&hfp_connection->hfp_timeout);
|
||||
btstack_run_loop_set_timer_handler(&hfp_connection->hfp_timeout, hfp_timeout_handler);
|
||||
btstack_run_loop_set_timer(&hfp_connection->hfp_timeout, 2000); // 2 seconds timeout
|
||||
btstack_run_loop_add_timer(&hfp_connection->hfp_timeout);
|
||||
}
|
||||
|
||||
static void hfp_timeout_stop(hfp_connection_t * hfp_connection){
|
||||
@ -1990,6 +1990,7 @@ static int hfp_ag_send_commands(hfp_connection_t *hfp_connection){
|
||||
if (hfp_connection->ag_ring){
|
||||
hfp_connection->ag_ring = 0;
|
||||
hfp_connection->command = HFP_CMD_NONE;
|
||||
hfp_emit_simple_event(hfp_connection, HFP_SUBEVENT_RING);
|
||||
hfp_ag_send_ring(hfp_connection->rfcomm_cid);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user