mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-20 18:40:31 +00:00
test/hfp: reduce warnings and output
This commit is contained in:
parent
0c3047fbd8
commit
9022b6898e
@ -111,11 +111,11 @@ static hfp_generic_status_indicator_t hf_indicators[] = {
|
||||
static hci_con_handle_t acl_handle = -1;
|
||||
static int memory_1_enabled = 1;
|
||||
|
||||
int has_more_hfp_ag_commands(void){
|
||||
static int has_more_hfp_ag_commands(void){
|
||||
return has_more_hfp_commands(2,2);
|
||||
}
|
||||
|
||||
char * get_next_hfp_ag_command(void){
|
||||
static char * get_next_hfp_ag_command(void){
|
||||
return get_next_hfp_command(2,2);
|
||||
}
|
||||
|
||||
@ -322,12 +322,12 @@ static void simulate_test_sequence(hfp_test_item_t * test_item){
|
||||
i++;
|
||||
|
||||
} else {
|
||||
printf("\n---> NEXT STEP expect from AG: %s\n", expected_cmd);
|
||||
|
||||
while (has_more_hfp_ag_commands()){
|
||||
printf("\n---> NEXT STEP expect from AG: %s\n", expected_cmd);
|
||||
char * ag_cmd = get_next_hfp_ag_command();
|
||||
|
||||
int equal_cmds = strncmp(ag_cmd, expected_cmd, expected_cmd_len) == 0;
|
||||
// printf("CHECK: %s == %s -> %u", ag_cmd, expected_cmd, equal_cmds);
|
||||
if (!equal_cmds){
|
||||
printf("\nError: Expected:'%s', but got:'%s'\n", expected_cmd, ag_cmd);
|
||||
CHECK_EQUAL(equal_cmds,1);
|
||||
@ -347,7 +347,7 @@ static void simulate_test_sequence(hfp_test_item_t * test_item){
|
||||
}
|
||||
}
|
||||
|
||||
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){
|
||||
|
||||
if (event[0] != HCI_EVENT_HFP_META) return;
|
||||
|
||||
|
@ -83,11 +83,11 @@ static int supported_features_with_codec_negotiation = 438;
|
||||
|
||||
static uint16_t acl_handle = -1;
|
||||
|
||||
char * get_next_hfp_hf_command(void){
|
||||
static char * get_next_hfp_hf_command(void){
|
||||
return get_next_hfp_command(0,2);
|
||||
}
|
||||
|
||||
int has_more_hfp_hf_commands(void){
|
||||
static int has_more_hfp_hf_commands(void){
|
||||
return has_more_hfp_commands(0,2);
|
||||
}
|
||||
|
||||
@ -309,7 +309,7 @@ static void user_command(char cmd){
|
||||
}
|
||||
}
|
||||
|
||||
void simulate_test_sequence(hfp_test_item_t * test_item){
|
||||
static void simulate_test_sequence(hfp_test_item_t * test_item){
|
||||
char ** test_steps = test_item->test;
|
||||
printf("\nSimulate test sequence: \"%s\" [%d steps]\n", test_item->name, test_item->len);
|
||||
|
||||
@ -391,7 +391,7 @@ void simulate_test_sequence(hfp_test_item_t * test_item){
|
||||
}
|
||||
}
|
||||
|
||||
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){
|
||||
if (event[0] != HCI_EVENT_HFP_META) return;
|
||||
|
||||
switch (event[2]) {
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include "classic/sdp_client_rfcomm.h"
|
||||
#include "classic/rfcomm.h"
|
||||
#include "classic/hfp_hf.h"
|
||||
#include "classic/sdp_client_rfcomm.h"
|
||||
|
||||
#include "mock.h"
|
||||
|
||||
@ -136,7 +137,7 @@ extern "C" void hci_add_event_handler(btstack_packet_callback_registration_t * c
|
||||
int rfcomm_send(uint16_t rfcomm_cid, uint8_t *data, uint16_t len){
|
||||
|
||||
// printf("mock: rfcomm send: ");
|
||||
print_without_newlines(data, len);
|
||||
// print_without_newlines(data, len);
|
||||
|
||||
int start_command_offset = 2;
|
||||
int end_command_offset = 2;
|
||||
@ -296,8 +297,9 @@ uint8_t rfcomm_register_service(btstack_packet_handler_t handler, uint8_t channe
|
||||
}
|
||||
|
||||
|
||||
void sdp_client_query_rfcomm_channel_and_name_for_search_pattern(bd_addr_t remote, uint8_t * des_serviceSearchPattern){
|
||||
uint8_t sdp_client_query_rfcomm_channel_and_name_for_search_pattern(btstack_packet_handler_t callback, bd_addr_t remote, const uint8_t * des_serviceSearchPattern){
|
||||
// printf("sdp_client_query_rfcomm_channel_and_name_for_search_pattern\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -322,7 +324,7 @@ void btstack_run_loop_set_timer(btstack_timer_source_t *a, uint32_t timeout_in_m
|
||||
}
|
||||
|
||||
|
||||
void hci_emit_disconnection_complete(uint16_t handle, uint8_t reason){
|
||||
static void hci_emit_disconnection_complete(uint16_t handle, uint8_t reason){
|
||||
uint8_t event[6];
|
||||
event[0] = HCI_EVENT_DISCONNECTION_COMPLETE;
|
||||
event[1] = sizeof(event) - 2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user