diff --git a/components/modules/CMakeLists.txt b/components/modules/CMakeLists.txt index b06f3ea..eb75a3b 100644 --- a/components/modules/CMakeLists.txt +++ b/components/modules/CMakeLists.txt @@ -8,14 +8,16 @@ set(src_dirs camera lcd led - web) + web + trace) set(include_dirs ai camera lcd led - web) + web + trace) set(requires esp32-camera esp-dl diff --git a/components/modules/ai/who_human_face_detection.cpp b/components/modules/ai/who_human_face_detection.cpp index 419a1ee..e65fdb4 100644 --- a/components/modules/ai/who_human_face_detection.cpp +++ b/components/modules/ai/who_human_face_detection.cpp @@ -93,7 +93,7 @@ void register_human_face_detection(const QueueHandle_t frame_i, xQueueResult = result; gReturnFB = camera_fb_return; - xTaskCreatePinnedToCore(task_process_handler, TAG, 4 * 1024, NULL, 5, NULL, 1); + xTaskCreatePinnedToCore(task_process_handler, TAG, 4 * 1024, NULL, 5, NULL, 0); if (xQueueEvent) xTaskCreatePinnedToCore(task_event_handler, TAG, 4 * 1024, NULL, 5, NULL, 1); } diff --git a/components/modules/camera/who_camera.c b/components/modules/camera/who_camera.c index c6d8a8d..cb4d0a6 100644 --- a/components/modules/camera/who_camera.c +++ b/components/modules/camera/who_camera.c @@ -83,5 +83,5 @@ void register_camera(const pixformat_t pixel_fromat, } xQueueFrameO = frame_o; - xTaskCreatePinnedToCore(task_process_handler, TAG, 2 * 1024, NULL, 5, NULL, 1); + xTaskCreatePinnedToCore(task_process_handler, TAG, 1 * 1024, NULL, 5, NULL, 1); } diff --git a/components/modules/lcd/who_lcd.c b/components/modules/lcd/who_lcd.c index fa4d3ff..f18b0e9 100644 --- a/components/modules/lcd/who_lcd.c +++ b/components/modules/lcd/who_lcd.c @@ -95,7 +95,7 @@ esp_err_t register_lcd(const QueueHandle_t frame_i, const QueueHandle_t frame_o, xQueueFrameI = frame_i; xQueueFrameO = frame_o; gReturnFB = return_fb; - xTaskCreatePinnedToCore(task_process_handler, TAG, 4 * 1024, NULL, 5, NULL, 1); + xTaskCreatePinnedToCore(task_process_handler, TAG, 2 * 1024, NULL, 5, NULL, 1); return ESP_OK; } diff --git a/components/modules/trace/who_trace.c b/components/modules/trace/who_trace.c new file mode 100644 index 0000000..3eb55b0 --- /dev/null +++ b/components/modules/trace/who_trace.c @@ -0,0 +1,29 @@ +#include "who_trace.h" +#include +#include + +#include "freertos/FreeRTOS.h" +#include "freertos/queue.h" +#include "freertos/task.h" +#include "freertos/semphr.h" +#include "esp_system.h" + +static void task_trace(void *arg) +{ + char *pbuffer = (char *)malloc(2048); + + while (true) + { + printf("\n-------------------------------------------------------------------------\n"); + vTaskList(pbuffer); + printf("%s", pbuffer); + printf("-------------------------------------------------------------------------\n\n"); + vTaskDelay(3000 / portTICK_RATE_MS); + } + free(pbuffer); +} + +void register_trace() +{ + xTaskCreate(task_trace, "trace", 2*1024, NULL, 5, NULL); +} \ No newline at end of file diff --git a/components/modules/trace/who_trace.h b/components/modules/trace/who_trace.h new file mode 100644 index 0000000..41a1935 --- /dev/null +++ b/components/modules/trace/who_trace.h @@ -0,0 +1,12 @@ +#pragma once + +#ifdef __cplusplus +extern "C" +{ +#endif + + void register_trace(); + +#ifdef __cplusplus +} +#endif