move `esp32_camera` to `espcamera` · csamuelson/circuitpython@cda5689 · GitHub
Skip to content

Commit cda5689

Browse files
committed
move esp32_camera to espcamera
1 parent d9589da commit cda5689

51 files changed

Lines changed: 1181 additions & 1181 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

locale/circuitpython.pot

Lines changed: 5 additions & 4 deletions

ports/espressif/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set(ENV{IDF_PATH} ${CMAKE_SOURCE_DIR}/esp-idf)
88
# can build.
99
set(COMPONENTS esptool_py soc driver log main esp-tls mbedtls mdns esp_event esp_adc_cal esp_netif esp_wifi lwip ulp wpa_supplicant freertos bt usb)
1010

11-
if("${CIRCUITPY_ESP32_CAMERA}")
11+
if("${CIRCUITPY_ESPCAMERA}")
1212
message("Including esp32-camera")
1313
set(EXTRA_COMPONENT_DIRS "esp32-camera")
1414
list(APPEND COMPONENTS "esp32-camera")

ports/espressif/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,10 @@ endif
250250

251251
SRC_C += $(wildcard common-hal/espidf/*.c)
252252

253-
ifneq ($(CIRCUITPY_ESP32_CAMERA),0)
253+
ifneq ($(CIRCUITPY_ESPCAMERA),0)
254254
SRC_CAMERA := \
255-
$(wildcard common-hal/esp32_camera/*.c) \
256-
$(wildcard bindings/esp32_camera/*.c)
255+
$(wildcard common-hal/espcamera/*.c) \
256+
$(wildcard bindings/espcamera/*.c)
257257
SRC_C += $(SRC_CAMERA)
258258
CFLAGS += -isystem esp32-camera/driver/include
259259
CFLAGS += -isystem esp32-camera/conversions/include
@@ -333,7 +333,7 @@ endif
333333
.PHONY: do-sdkconfig
334334
do-sdkconfig: $(BUILD)/esp-idf/config/sdkconfig.h
335335
$(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig CMakeLists.txt | $(BUILD)/esp-idf
336-
IDF_PATH=$(IDF_PATH) cmake -S . -B $(BUILD)/esp-idf -DSDKCONFIG=$(BUILD)/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="$(SDKCONFIGS)" -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH)/tools/cmake/toolchain-$(IDF_TARGET).cmake -DIDF_TARGET=$(IDF_TARGET) -GNinja -DCIRCUITPY_ESP32_CAMERA=$(CIRCUITPY_ESP32_CAMERA)
336+
IDF_PATH=$(IDF_PATH) cmake -S . -B $(BUILD)/esp-idf -DSDKCONFIG=$(BUILD)/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="$(SDKCONFIGS)" -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH)/tools/cmake/toolchain-$(IDF_TARGET).cmake -DIDF_TARGET=$(IDF_TARGET) -GNinja -DCIRCUITPY_ESPCAMERA=$(CIRCUITPY_ESPCAMERA)
337337

338338
# build a lib
339339
# Adding -d explain -j 1 -v to the ninja line will output debug info
@@ -385,7 +385,7 @@ BINARY_BLOBS += esp-idf/components/xtensa/$(IDF_TARGET)/libxt_hal.a
385385
ESP_IDF_COMPONENTS_EXPANDED += esp-idf/components/xtensa/$(IDF_TARGET)/libxt_hal.a
386386
endif
387387

388-
ifneq ($(CIRCUITPY_ESP32_CAMERA),0)
388+
ifneq ($(CIRCUITPY_ESPCAMERA),0)
389389
ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/esp32-camera/libesp32-camera.a
390390
#$(error $(ESP_IDF_COMPONENTS_EXPANDED))
391391
endif

ports/espressif/bindings/esp32_camera/Camera.c

Lines changed: 0 additions & 1001 deletions
This file was deleted.

ports/espressif/bindings/espcamera/Camera.c

Lines changed: 1001 additions & 0 deletions
Large diffs are not rendered by default.

ports/espressif/bindings/esp32_camera/Camera.h renamed to ports/espressif/bindings/espcamera/Camera.h

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333

3434
#include "shared-bindings/busio/I2C.h"
3535

36-
extern const mp_obj_type_t esp32_camera_camera_type;
37-
typedef struct esp32_camera_camera_obj esp32_camera_camera_obj_t;
36+
extern const mp_obj_type_t espcamera_camera_type;
37+
typedef struct espcamera_camera_obj espcamera_camera_obj_t;
3838

39-
extern void common_hal_esp32_camera_camera_construct(
40-
esp32_camera_camera_obj_t *self,
39+
extern void common_hal_espcamera_camera_construct(
40+
espcamera_camera_obj_t *self,
4141
uint8_t data_pins[8],
4242
const mcu_pin_obj_t *external_clock_pin,
4343
const mcu_pin_obj_t *pixel_clock_pin,
@@ -53,11 +53,11 @@ extern void common_hal_esp32_camera_camera_construct(
5353
mp_int_t framebuffer_count,
5454
camera_grab_mode_t grab_mode);
5555

56-
extern void common_hal_esp32_camera_camera_deinit(esp32_camera_camera_obj_t *self);
57-
extern bool common_hal_esp32_camera_camera_deinited(esp32_camera_camera_obj_t *self);
58-
extern bool common_hal_esp32_camera_camera_available(esp32_camera_camera_obj_t *self);
59-
extern camera_fb_t *common_hal_esp32_camera_camera_take(esp32_camera_camera_obj_t *self, int timeout_ms);
60-
extern void common_hal_esp32_camera_camera_reconfigure(esp32_camera_camera_obj_t *self, framesize_t frame_size, pixformat_t pixel_format, camera_grab_mode_t grab_mode, mp_int_t framebuffer_count);
56+
extern void common_hal_espcamera_camera_deinit(espcamera_camera_obj_t *self);
57+
extern bool common_hal_espcamera_camera_deinited(espcamera_camera_obj_t *self);
58+
extern bool common_hal_espcamera_camera_available(espcamera_camera_obj_t *self);
59+
extern camera_fb_t *common_hal_espcamera_camera_take(espcamera_camera_obj_t *self, int timeout_ms);
60+
extern void common_hal_espcamera_camera_reconfigure(espcamera_camera_obj_t *self, framesize_t frame_size, pixformat_t pixel_format, camera_grab_mode_t grab_mode, mp_int_t framebuffer_count);
6161

6262
#define DECLARE_SENSOR_GETSET(type, name, field_name, setter_function_name) \
6363
DECLARE_SENSOR_GET(type, name, field_name, setter_function_name) \
@@ -70,10 +70,10 @@ extern void common_hal_esp32_camera_camera_reconfigure(esp32_camera_camera_obj_t
7070
DECLARE_SENSOR_GET(type, name, status.status_field_name, setter_function_name)
7171

7272
#define DECLARE_SENSOR_GET(type, name, status_field_name, setter_function_name) \
73-
extern type common_hal_esp32_camera_camera_get_##name(esp32_camera_camera_obj_t * self);
73+
extern type common_hal_espcamera_camera_get_##name(espcamera_camera_obj_t * self);
7474

7575
#define DECLARE_SENSOR_SET(type, name, setter_function_name) \
76-
extern void common_hal_esp32_camera_camera_set_##name(esp32_camera_camera_obj_t * self, type value);
76+
extern void common_hal_espcamera_camera_set_##name(espcamera_camera_obj_t * self, type value);
7777

7878
DECLARE_SENSOR_GET(pixformat_t, pixel_format, pixformat, set_pixformat)
7979
DECLARE_SENSOR_STATUS_GET(framesize_t, frame_size, framesize, set_framesize)
@@ -104,13 +104,13 @@ DECLARE_SENSOR_STATUS_GETSET(bool, raw_gma, raw_gma, set_raw_gma);
104104
DECLARE_SENSOR_STATUS_GETSET(bool, lenc, lenc, set_lenc);
105105

106106
// From settings
107-
extern camera_grab_mode_t common_hal_esp32_camera_camera_get_grab_mode(esp32_camera_camera_obj_t *self);
108-
extern int common_hal_esp32_camera_camera_get_framebuffer_count(esp32_camera_camera_obj_t *self);
107+
extern camera_grab_mode_t common_hal_espcamera_camera_get_grab_mode(espcamera_camera_obj_t *self);
108+
extern int common_hal_espcamera_camera_get_framebuffer_count(espcamera_camera_obj_t *self);
109109

110110
// From camera_sensor_info_t
111-
extern int common_hal_esp32_camera_camera_get_address(esp32_camera_camera_obj_t *self);
112-
extern const char *common_hal_esp32_camera_camera_get_sensor_name(esp32_camera_camera_obj_t *self);
113-
extern const bool common_hal_esp32_camera_camera_get_supports_jpeg(esp32_camera_camera_obj_t *self);
114-
extern framesize_t common_hal_esp32_camera_camera_get_max_frame_size(esp32_camera_camera_obj_t *self);
115-
extern int common_hal_esp32_camera_camera_get_width(esp32_camera_camera_obj_t *self);
116-
extern int common_hal_esp32_camera_camera_get_height(esp32_camera_camera_obj_t *self);
111+
extern int common_hal_espcamera_camera_get_address(espcamera_camera_obj_t *self);
112+
extern const char *common_hal_espcamera_camera_get_sensor_name(espcamera_camera_obj_t *self);
113+
extern const bool common_hal_espcamera_camera_get_supports_jpeg(espcamera_camera_obj_t *self);
114+
extern framesize_t common_hal_espcamera_camera_get_max_frame_size(espcamera_camera_obj_t *self);
115+
extern int common_hal_espcamera_camera_get_width(espcamera_camera_obj_t *self);
116+
extern int common_hal_espcamera_camera_get_height(espcamera_camera_obj_t *self);

ports/espressif/bindings/esp32_camera/__init__.c renamed to ports/espressif/bindings/espcamera/__init__.c

Lines changed: 68 additions & 68 deletions

0 commit comments

Comments
 (0)