diff --git a/example/hfp_ag_demo.c b/example/hfp_ag_demo.c index 2bfc167f3..6ce600177 100644 --- a/example/hfp_ag_demo.c +++ b/example/hfp_ag_demo.c @@ -56,8 +56,10 @@ #include #include "btstack.h" +#ifdef HAVE_STDIO #include "stdin_support.h" - +#endif + uint8_t hfp_service_buffer[150]; const uint8_t rfcomm_channel_nr = 1; @@ -325,7 +327,7 @@ static void show_usage(void){ printf("---\n"); } -static int stdin_process(struct data_source *ds){ +static void stdin_process(btstack_data_source_t *ds, btstack_data_source_callback_type_t callback_type){ read(ds->fd, &cmd, 1); switch (cmd){ case 'a': @@ -542,8 +544,6 @@ static int stdin_process(struct data_source *ds){ show_usage(); break; } - - return 0; } #endif diff --git a/example/hfp_hf_demo.c b/example/hfp_hf_demo.c index e07477614..901eeab99 100644 --- a/example/hfp_hf_demo.c +++ b/example/hfp_hf_demo.c @@ -56,9 +56,12 @@ #include #include #include +#include #include "btstack.h" +#ifdef HAVE_STDIO #include "stdin_support.h" +#endif uint8_t hfp_service_buffer[150]; const uint8_t rfcomm_channel_nr = 1; @@ -161,13 +164,13 @@ static void show_usage(void){ printf("---\n"); } -static int stdin_process(struct data_source *ds){ +static void stdin_process(btstack_data_source_t *ds, btstack_data_source_callback_type_t callback_type){ read(ds->fd, &cmd, 1); if (cmd >= '0' && cmd <= '9'){ printf("DTMF Code: %c\n", cmd); hfp_hf_send_dtmf_code(device_addr, cmd); - return 0; + return; } switch (cmd){ @@ -438,8 +441,6 @@ static int stdin_process(struct data_source *ds){ show_usage(); break; } - - return 0; } #endif diff --git a/example/hsp_ag_demo.c b/example/hsp_ag_demo.c index bb2be61be..4bc4c7438 100644 --- a/example/hsp_ag_demo.c +++ b/example/hsp_ag_demo.c @@ -59,6 +59,9 @@ #include #include "btstack.h" +#ifdef HAVE_STDIO +#include "stdin_support.h" +#endif #define SCO_REPORT_PERIOD 255 @@ -130,7 +133,7 @@ static void show_usage(void){ } #ifdef HAVE_STDIO -static int stdin_process(struct data_source *ds){ +static void stdin_process(btstack_data_source_t *ds, btstack_data_source_callback_type_t callback_type){ char buffer; read(ds->fd, &buffer, 1); @@ -184,7 +187,6 @@ static int stdin_process(struct data_source *ds){ break; } - return 0; } #endif diff --git a/example/hsp_hs_demo.c b/example/hsp_hs_demo.c index d48d19cf6..53f0c369a 100644 --- a/example/hsp_hs_demo.c +++ b/example/hsp_hs_demo.c @@ -59,6 +59,9 @@ #include #include "btstack.h" +#ifdef HAVE_STDIO +#include "stdin_support.h" +#endif #define SCO_REPORT_PERIOD 255 @@ -130,7 +133,7 @@ static void show_usage(void){ } #ifdef HAVE_STDIO -static int stdin_process(struct data_source *ds){ +static void stdin_process(btstack_data_source_t *ds, btstack_data_source_callback_type_t callback_type){ char buffer; read(ds->fd, &buffer, 1); @@ -184,7 +187,6 @@ static int stdin_process(struct data_source *ds){ show_usage(); break; } - return 0; } #endif