mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-21 04:21:03 +00:00
example: add 'delete link key(s)' to a2dp_source, hfp_ag, hsp_ag
This commit is contained in:
parent
9e39e819d3
commit
584803f165
@ -879,6 +879,7 @@ static void show_usage(void){
|
||||
printf("B - A2DP Source disconnect\n");
|
||||
printf("c - AVRCP create connection to addr %s\n", device_addr_string);
|
||||
printf("C - AVRCP disconnect\n");
|
||||
printf("D - delete all link keys\n");
|
||||
|
||||
printf("x - start streaming sine\n");
|
||||
if (hxcmod_initialized){
|
||||
@ -891,7 +892,7 @@ static void show_usage(void){
|
||||
printf("T - volume down\n");
|
||||
printf("v - volume up (via set absolute volume)\n");
|
||||
printf("V - volume down (via set absolute volume)\n");
|
||||
|
||||
|
||||
printf("---\n");
|
||||
}
|
||||
|
||||
@ -914,7 +915,10 @@ static void stdin_process(char cmd){
|
||||
printf("%c - AVRCP disconnect\n", cmd);
|
||||
status = avrcp_disconnect(media_tracker.avrcp_cid);
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
printf("Deleting all link keys\n");
|
||||
gap_delete_all_link_keys();
|
||||
break;
|
||||
case '\n':
|
||||
case '\r':
|
||||
break;
|
||||
|
@ -153,6 +153,7 @@ static void show_usage(void){
|
||||
printf("b - establish AUDIO connection | B - release AUDIO connection\n");
|
||||
printf("c - simulate incoming call from 1234567 | C - simulate call from 1234567 dropped\n");
|
||||
printf("d - report AG failure\n");
|
||||
printf("D - delete all link keys\n");
|
||||
printf("e - answer call on AG | E - reject call on AG\n");
|
||||
printf("r - disable in-band ring tone | R - enable in-band ring tone\n");
|
||||
printf("f - Disable cellular network | F - Enable cellular network\n");
|
||||
@ -211,6 +212,10 @@ static void stdin_process(char cmd){
|
||||
hfp_ag_set_clip(129, "1234567");
|
||||
hfp_ag_incoming_call();
|
||||
break;
|
||||
case 'D':
|
||||
printf("Deleting all link keys\n");
|
||||
gap_delete_all_link_keys();
|
||||
break;
|
||||
case 'm':
|
||||
log_info("USER:\'%c\'", cmd);
|
||||
printf("Simulate incoming call from 7654321\n");
|
||||
|
@ -112,6 +112,7 @@ static void show_usage(void){
|
||||
printf("C - Disconnect\n");
|
||||
printf("a - establish audio connection\n");
|
||||
printf("A - release audio connection\n");
|
||||
printf("D - delete all link keys\n");
|
||||
printf("m - set microphone gain 8\n");
|
||||
printf("M - set microphone gain 15\n");
|
||||
printf("o - set speaker gain 0\n");
|
||||
@ -124,6 +125,14 @@ static void show_usage(void){
|
||||
|
||||
static void stdin_process(char c){
|
||||
switch (c){
|
||||
case 'a':
|
||||
printf("Establish audio connection\n");
|
||||
hsp_ag_establish_audio_connection();
|
||||
break;
|
||||
case 'A':
|
||||
printf("Release audio connection\n");
|
||||
hsp_ag_release_audio_connection();
|
||||
break;
|
||||
case 'c':
|
||||
printf("Connect to %s\n", device_addr_string);
|
||||
hsp_ag_connect(device_addr);
|
||||
@ -132,13 +141,9 @@ static void stdin_process(char c){
|
||||
printf("Disconnect.\n");
|
||||
hsp_ag_disconnect();
|
||||
break;
|
||||
case 'a':
|
||||
printf("Establish audio connection\n");
|
||||
hsp_ag_establish_audio_connection();
|
||||
break;
|
||||
case 'A':
|
||||
printf("Release audio connection\n");
|
||||
hsp_ag_release_audio_connection();
|
||||
case 'D':
|
||||
printf("Deleting all link keys\n");
|
||||
gap_delete_all_link_keys();
|
||||
break;
|
||||
case 'm':
|
||||
printf("Setting microphone gain 8\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user