Skip to content

Commit d1b89fc

Browse files
committed
Reset camera when interpreter is reset
1 parent f54c7ad commit d1b89fc

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

ports/espressif/Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,12 +292,6 @@ CFLAGS += -isystem esp32-camera/driver/include
292292
CFLAGS += -isystem esp32-camera/conversions/include
293293
endif
294294

295-
ifneq ($(CIRCUITPY_IMAGECAPTURE),0)
296-
$(error IMAGECAPTURE)
297-
SRC_C += cam.c
298-
endif
299-
300-
301295
SRC_COMMON_HAL_EXPANDED = \
302296
$(addprefix shared-bindings/, $(SRC_COMMON_HAL)) \
303297
$(addprefix shared-bindings/, $(SRC_BINDINGS_ENUMS)) \

ports/espressif/supervisor/port.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
#include "shared-bindings/_bleio/__init__.h"
7777
#endif
7878

79-
#if CIRCUITPY_IMAGECAPTURE
80-
#include "cam.h"
79+
#if CIRCUITPY_ESP32_CAMERA
80+
#include "esp_camera.h"
8181
#endif
8282

8383
#ifndef CONFIG_IDF_TARGET_ESP32
@@ -335,8 +335,8 @@ safe_mode_t port_init(void) {
335335

336336
void reset_port(void) {
337337
// TODO deinit for esp32-camera
338-
#if CIRCUITPY_IMAGECAPTURE
339-
cam_deinit();
338+
#if CIRCUITPY_ESP32_CAMERA
339+
esp_camera_deinit();
340340
#endif
341341

342342
reset_all_pins();

0 commit comments

Comments
 (0)