From 09fdcfada413a60075084cdb545f3ee981a1d825 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 20 Apr 2022 18:00:11 +0200 Subject: [PATCH] spp_streamer: call vTaskList very 3 seconds --- example/spp_streamer.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/example/spp_streamer.c b/example/spp_streamer.c index 361a5742d..e14d445ca 100644 --- a/example/spp_streamer.c +++ b/example/spp_streamer.c @@ -61,6 +61,12 @@ #include "btstack.h" +#ifdef ESP_PLATFORM +// For vTaskList test +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#endif + int btstack_main(int argc, const char * argv[]); #define RFCOMM_SERVER_CHANNEL 1 @@ -136,6 +142,17 @@ static void test_track_transferred(int bytes_sent){ uint32_t now = btstack_run_loop_get_time_ms(); uint32_t time_passed = now - test_data_start; if (time_passed < REPORT_INTERVAL_MS) return; + +#ifdef ESP_PLATFORM + static int counter = 0; + counter++; + if (counter == 3){ + vTaskList((char *) test_data); + puts((const char*) test_data); + counter = 0; + } +#endif + // print speed int bytes_per_second = test_data_transferred * 1000 / time_passed; printf("%u bytes -> %u.%03u kB/s\n", (int) test_data_transferred, (int) bytes_per_second / 1000, bytes_per_second % 1000);