mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-26 02:37:41 +00:00
example/hsp+hfp: prettify SCO packet count, show remote addr in menu
This commit is contained in:
parent
13839019fa
commit
bdb44bd96a
@ -280,7 +280,7 @@ static void show_usage(void){
|
|||||||
printf("\n--- Bluetooth HFP Audiogateway (AG) unit Test Console %s ---\n", bd_addr_to_str(iut_address));
|
printf("\n--- Bluetooth HFP Audiogateway (AG) unit Test Console %s ---\n", bd_addr_to_str(iut_address));
|
||||||
printf("---\n");
|
printf("---\n");
|
||||||
|
|
||||||
printf("a - establish HFP connection to PTS module\n");
|
printf("a - establish HFP connection to PTS module %s\n", bd_addr_to_str(device_addr));
|
||||||
// printf("A - release HFP connection to PTS module\n");
|
// printf("A - release HFP connection to PTS module\n");
|
||||||
|
|
||||||
printf("b - establish AUDIO connection\n");
|
printf("b - establish AUDIO connection\n");
|
||||||
@ -592,7 +592,7 @@ static void send_sco_data(void){
|
|||||||
|
|
||||||
static int count = 0;
|
static int count = 0;
|
||||||
count++;
|
count++;
|
||||||
if ((count & SCO_REPORT_PERIOD) == 0) printf("Sent %u\n", count);
|
if ((count % SCO_REPORT_PERIOD) == 0) printf("Sent %u\n", count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
|
static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
|
||||||
|
@ -85,7 +85,7 @@ static void show_usage(void){
|
|||||||
printf("\n--- Bluetooth HFP Hands-Free (HF) unit Test Console ---\n");
|
printf("\n--- Bluetooth HFP Hands-Free (HF) unit Test Console ---\n");
|
||||||
printf("---\n");
|
printf("---\n");
|
||||||
|
|
||||||
printf("a - establish SLC connection to device\n");
|
printf("a - establish SLC connection to device %s\n", bd_addr_to_str(device_addr));
|
||||||
printf("A - release SLC connection to device\n");
|
printf("A - release SLC connection to device\n");
|
||||||
|
|
||||||
printf("b - establish Audio connection\n");
|
printf("b - establish Audio connection\n");
|
||||||
|
@ -215,8 +215,7 @@ static void send_sco_data(void){
|
|||||||
hci_request_sco_can_send_now_event();
|
hci_request_sco_can_send_now_event();
|
||||||
|
|
||||||
static int count = 0;
|
static int count = 0;
|
||||||
if ((count & SCO_REPORT_PERIOD)) return;
|
if ((count % SCO_REPORT_PERIOD) == 0) printf("Sent %u\n", count);
|
||||||
printf("SCO packets sent: %u\n", count);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
|
static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
|
||||||
|
@ -216,8 +216,7 @@ static void send_sco_data(void){
|
|||||||
|
|
||||||
static int count = 0;
|
static int count = 0;
|
||||||
count++;
|
count++;
|
||||||
if ((count & SCO_REPORT_PERIOD)) return;
|
if ((count % SCO_REPORT_PERIOD) == 0) printf("Sent %u\n", count);
|
||||||
printf("SCO packets sent: %u\n", count);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
|
static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * event, uint16_t event_size){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user