example/hfp_hf_demo: fix build without HAVE_BTSTACK_STDIN

This commit is contained in:
Matthias Ringwald 2023-02-22 17:35:42 +01:00
parent 7621b6a9be
commit 712e3b1145

View File

@ -66,6 +66,8 @@ uint8_t hfp_service_buffer[150];
const uint8_t rfcomm_channel_nr = 1;
const char hfp_hf_service_name[] = "HFP HF Demo";
#undef HAVE_BTSTACK_STDIN
#ifdef HAVE_BTSTACK_STDIN
// static const char * device_addr_string = "6C:72:E7:10:22:EE";
static const char * device_addr_string = "00:02:72:DC:31:C1";
@ -117,6 +119,14 @@ static void dump_supported_codecs(void){
}
}
static void report_status(uint8_t status, const char * message){
if (status != ERROR_CODE_SUCCESS){
printf("%s command failed, status 0x%02x\n", message, status);
} else {
printf("%s command successful\n", message);
}
}
#ifdef HAVE_BTSTACK_STDIN
// Testig User Interface
@ -160,14 +170,6 @@ static void show_usage(void){
printf("\n");
}
static void report_status(uint8_t status, const char * message){
if (status != ERROR_CODE_SUCCESS){
printf("%s command failed, status 0x%02x\n", message, status);
} else {
printf("%s command successful\n", message);
}
}
static void stdin_process(char c){
uint8_t status = ERROR_CODE_SUCCESS;