|
32 | 32 | #endif // ESP_IDF_VERSION_MAJOR
|
33 | 33 | #define ESP_CAMERA_ETS_PRINTF ets_printf
|
34 | 34 |
|
| 35 | +#if CONFIG_CAM_TASK_STACK_SIZE |
| 36 | +#define CAM_TASK_STACK CONFIG_CAM_TASK_STACK_SIZE |
| 37 | +#else |
| 38 | +#define CAM_TASK_STACK (2*1024) |
| 39 | +#endif |
| 40 | + |
35 | 41 | static const char *TAG = "cam_hal";
|
36 | 42 | static cam_obj_t *cam_obj = NULL;
|
37 | 43 |
|
@@ -392,11 +398,11 @@ esp_err_t cam_config(const camera_config_t *config, framesize_t frame_size, uint
|
392 | 398 |
|
393 | 399 |
|
394 | 400 | #if CONFIG_CAMERA_CORE0
|
395 |
| - xTaskCreatePinnedToCore(cam_task, "cam_task", 2048, NULL, configMAX_PRIORITIES - 2, &cam_obj->task_handle, 0); |
| 401 | + xTaskCreatePinnedToCore(cam_task, "cam_task", CAM_TASK_STACK, NULL, configMAX_PRIORITIES - 2, &cam_obj->task_handle, 0); |
396 | 402 | #elif CONFIG_CAMERA_CORE1
|
397 |
| - xTaskCreatePinnedToCore(cam_task, "cam_task", 2048, NULL, configMAX_PRIORITIES - 2, &cam_obj->task_handle, 1); |
| 403 | + xTaskCreatePinnedToCore(cam_task, "cam_task", CAM_TASK_STACK, NULL, configMAX_PRIORITIES - 2, &cam_obj->task_handle, 1); |
398 | 404 | #else
|
399 |
| - xTaskCreate(cam_task, "cam_task", 2048, NULL, configMAX_PRIORITIES - 2, &cam_obj->task_handle); |
| 405 | + xTaskCreate(cam_task, "cam_task", CAM_TASK_STACK, NULL, configMAX_PRIORITIES - 2, &cam_obj->task_handle); |
400 | 406 | #endif
|
401 | 407 |
|
402 | 408 | ESP_LOGI(TAG, "cam config ok");
|
|
0 commit comments