b92c58d74b
They are all broadly similar, all being based on the ESP32-D0WD core, but have some subtle differences between variants around PSRAM inclusion and camera pin mappings. The ESP32CAM "unit" product (SKU: U007) has no PSRAM and maps the "Pixel Data 0" (Y2 GPIO/OV2640 D2) camera pin to IO17 rather than IO32 as is the case with most other M5Stack ESP32 camera devices. The ESP32CAM also requires the "hmirror" and "vflip" camera configuration bits setting in order to capture a true image. The relevant M5Stack pin configuration documentation can be found here: https://docs.m5stack.com/#/en/unit/esp32cam?id=pinmap
157 lines
4.0 KiB
C
157 lines
4.0 KiB
C
|
|
#if defined(CAMERA_MODEL_WROVER_KIT)
|
|
#define PWDN_GPIO_NUM -1
|
|
#define RESET_GPIO_NUM -1
|
|
#define XCLK_GPIO_NUM 21
|
|
#define SIOD_GPIO_NUM 26
|
|
#define SIOC_GPIO_NUM 27
|
|
|
|
#define Y9_GPIO_NUM 35
|
|
#define Y8_GPIO_NUM 34
|
|
#define Y7_GPIO_NUM 39
|
|
#define Y6_GPIO_NUM 36
|
|
#define Y5_GPIO_NUM 19
|
|
#define Y4_GPIO_NUM 18
|
|
#define Y3_GPIO_NUM 5
|
|
#define Y2_GPIO_NUM 4
|
|
#define VSYNC_GPIO_NUM 25
|
|
#define HREF_GPIO_NUM 23
|
|
#define PCLK_GPIO_NUM 22
|
|
|
|
#elif defined(CAMERA_MODEL_ESP_EYE)
|
|
#define PWDN_GPIO_NUM -1
|
|
#define RESET_GPIO_NUM -1
|
|
#define XCLK_GPIO_NUM 4
|
|
#define SIOD_GPIO_NUM 18
|
|
#define SIOC_GPIO_NUM 23
|
|
|
|
#define Y9_GPIO_NUM 36
|
|
#define Y8_GPIO_NUM 37
|
|
#define Y7_GPIO_NUM 38
|
|
#define Y6_GPIO_NUM 39
|
|
#define Y5_GPIO_NUM 35
|
|
#define Y4_GPIO_NUM 14
|
|
#define Y3_GPIO_NUM 13
|
|
#define Y2_GPIO_NUM 34
|
|
#define VSYNC_GPIO_NUM 5
|
|
#define HREF_GPIO_NUM 27
|
|
#define PCLK_GPIO_NUM 25
|
|
|
|
#elif defined(CAMERA_MODEL_M5STACK_PSRAM)
|
|
#define PWDN_GPIO_NUM -1
|
|
#define RESET_GPIO_NUM 15
|
|
#define XCLK_GPIO_NUM 27
|
|
#define SIOD_GPIO_NUM 25
|
|
#define SIOC_GPIO_NUM 23
|
|
|
|
#define Y9_GPIO_NUM 19
|
|
#define Y8_GPIO_NUM 36
|
|
#define Y7_GPIO_NUM 18
|
|
#define Y6_GPIO_NUM 39
|
|
#define Y5_GPIO_NUM 5
|
|
#define Y4_GPIO_NUM 34
|
|
#define Y3_GPIO_NUM 35
|
|
#define Y2_GPIO_NUM 32
|
|
#define VSYNC_GPIO_NUM 22
|
|
#define HREF_GPIO_NUM 26
|
|
#define PCLK_GPIO_NUM 21
|
|
|
|
#elif defined(CAMERA_MODEL_M5STACK_V2_PSRAM)
|
|
#define PWDN_GPIO_NUM -1
|
|
#define RESET_GPIO_NUM 15
|
|
#define XCLK_GPIO_NUM 27
|
|
#define SIOD_GPIO_NUM 22
|
|
#define SIOC_GPIO_NUM 23
|
|
|
|
#define Y9_GPIO_NUM 19
|
|
#define Y8_GPIO_NUM 36
|
|
#define Y7_GPIO_NUM 18
|
|
#define Y6_GPIO_NUM 39
|
|
#define Y5_GPIO_NUM 5
|
|
#define Y4_GPIO_NUM 34
|
|
#define Y3_GPIO_NUM 35
|
|
#define Y2_GPIO_NUM 32
|
|
#define VSYNC_GPIO_NUM 25
|
|
#define HREF_GPIO_NUM 26
|
|
#define PCLK_GPIO_NUM 21
|
|
|
|
#elif defined(CAMERA_MODEL_M5STACK_WIDE)
|
|
#define PWDN_GPIO_NUM -1
|
|
#define RESET_GPIO_NUM 15
|
|
#define XCLK_GPIO_NUM 27
|
|
#define SIOD_GPIO_NUM 22
|
|
#define SIOC_GPIO_NUM 23
|
|
|
|
#define Y9_GPIO_NUM 19
|
|
#define Y8_GPIO_NUM 36
|
|
#define Y7_GPIO_NUM 18
|
|
#define Y6_GPIO_NUM 39
|
|
#define Y5_GPIO_NUM 5
|
|
#define Y4_GPIO_NUM 34
|
|
#define Y3_GPIO_NUM 35
|
|
#define Y2_GPIO_NUM 32
|
|
#define VSYNC_GPIO_NUM 25
|
|
#define HREF_GPIO_NUM 26
|
|
#define PCLK_GPIO_NUM 21
|
|
|
|
#elif defined(CAMERA_MODEL_M5STACK_ESP32CAM)
|
|
#define PWDN_GPIO_NUM -1
|
|
#define RESET_GPIO_NUM 15
|
|
#define XCLK_GPIO_NUM 27
|
|
#define SIOD_GPIO_NUM 25
|
|
#define SIOC_GPIO_NUM 23
|
|
|
|
#define Y9_GPIO_NUM 19
|
|
#define Y8_GPIO_NUM 36
|
|
#define Y7_GPIO_NUM 18
|
|
#define Y6_GPIO_NUM 39
|
|
#define Y5_GPIO_NUM 5
|
|
#define Y4_GPIO_NUM 34
|
|
#define Y3_GPIO_NUM 35
|
|
#define Y2_GPIO_NUM 17
|
|
#define VSYNC_GPIO_NUM 22
|
|
#define HREF_GPIO_NUM 26
|
|
#define PCLK_GPIO_NUM 21
|
|
|
|
#elif defined(CAMERA_MODEL_AI_THINKER)
|
|
#define PWDN_GPIO_NUM 32
|
|
#define RESET_GPIO_NUM -1
|
|
#define XCLK_GPIO_NUM 0
|
|
#define SIOD_GPIO_NUM 26
|
|
#define SIOC_GPIO_NUM 27
|
|
|
|
#define Y9_GPIO_NUM 35
|
|
#define Y8_GPIO_NUM 34
|
|
#define Y7_GPIO_NUM 39
|
|
#define Y6_GPIO_NUM 36
|
|
#define Y5_GPIO_NUM 21
|
|
#define Y4_GPIO_NUM 19
|
|
#define Y3_GPIO_NUM 18
|
|
#define Y2_GPIO_NUM 5
|
|
#define VSYNC_GPIO_NUM 25
|
|
#define HREF_GPIO_NUM 23
|
|
#define PCLK_GPIO_NUM 22
|
|
|
|
#elif defined(CAMERA_MODEL_TTGO_T_JOURNAL)
|
|
#define PWDN_GPIO_NUM 0
|
|
#define RESET_GPIO_NUM 15
|
|
#define XCLK_GPIO_NUM 27
|
|
#define SIOD_GPIO_NUM 25
|
|
#define SIOC_GPIO_NUM 23
|
|
|
|
#define Y9_GPIO_NUM 19
|
|
#define Y8_GPIO_NUM 36
|
|
#define Y7_GPIO_NUM 18
|
|
#define Y6_GPIO_NUM 39
|
|
#define Y5_GPIO_NUM 5
|
|
#define Y4_GPIO_NUM 34
|
|
#define Y3_GPIO_NUM 35
|
|
#define Y2_GPIO_NUM 17
|
|
#define VSYNC_GPIO_NUM 22
|
|
#define HREF_GPIO_NUM 26
|
|
#define PCLK_GPIO_NUM 21
|
|
|
|
#else
|
|
#error "Camera model not selected"
|
|
#endif
|