Skip to content

Commit 0d1c542

Browse files
committed
Silence HAL logs if logs are disabled
1 parent b5fd891 commit 0d1c542

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

driver/cam_hal.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@
4040
#include "esp32s3/rom/ets_sys.h"
4141
#endif
4242
#endif // ESP_IDF_VERSION_MAJOR
43-
#define ESP_CAMERA_ETS_PRINTF ets_printf
43+
44+
#if CONFIG_LOG_DEFAULT_LEVEL_NONE
45+
#define ESP_CAMERA_ETS_PRINTF(f, ...)
46+
#else
47+
#define ESP_CAMERA_ETS_PRINTF(f, ...) ets_printf(f, ##__VA_ARGS__)
48+
#endif
4449

4550
#if CONFIG_CAMERA_TASK_STACK_SIZE
4651
#define CAM_TASK_STACK CONFIG_CAMERA_TASK_STACK_SIZE

0 commit comments

Comments
 (0)