Skip to content

Commit 861fa96

Browse files
committed
Add the ESP32-EYE aka ESP-EYE
1 parent 98202c8 commit 861fa96

File tree

5 files changed

+210
-0
lines changed

5 files changed

+210
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the "Software"), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in
16+
* all copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
* THE SOFTWARE.
25+
*/
26+
27+
#include "supervisor/board.h"
28+
#include "mpconfigboard.h"
29+
#include "shared-bindings/microcontroller/Pin.h"
30+
#include "components/driver/include/driver/gpio.h"
31+
#include "components/hal/include/hal/gpio_hal.h"
32+
#include "common-hal/microcontroller/Pin.h"
33+
34+
void board_init(void) {
35+
reset_board();
36+
}
37+
38+
bool board_requests_safe_mode(void) {
39+
return false;
40+
}
41+
42+
void reset_board(void) {
43+
}
44+
45+
void board_deinit(void) {
46+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2022 Dan Halbert for Adafruit Industries
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the "Software"), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in
16+
* all copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
* THE SOFTWARE.
25+
*/
26+
27+
// Micropython setup
28+
29+
#define MICROPY_HW_BOARD_NAME "Espressif ESP32-EYE"
30+
#define MICROPY_HW_MCU_NAME "ESP32"
31+
32+
#define CIRCUITPY_BOARD_I2C (1)
33+
#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO23, .sda = &pin_GPIO18}}
34+
35+
// UART pins attached to the USB-serial converter chip
36+
#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1)
37+
#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3)
38+
39+
#define DEFAULT_RESERVED_PSRAM (1048576)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
CIRCUITPY_CREATOR_ID = 0x000C303A
2+
CIRCUITPY_CREATION_ID = 0x00320001
3+
4+
IDF_TARGET = esp32
5+
6+
INTERNAL_FLASH_FILESYSTEM = 1
7+
LONGINT_IMPL = MPZ
8+
9+
CIRCUITPY_STATUS_BAR = 0
10+
CIRCUITPY_WEB_WORKFLOW = 0
11+
12+
CIRCUITPY_ESP_FLASH_MODE = dio
13+
CIRCUITPY_ESP_FLASH_FREQ = 40m
14+
CIRCUITPY_ESP_FLASH_SIZE = 4MB
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#include "py/objtuple.h"
2+
#include "shared-bindings/board/__init__.h"
3+
4+
STATIC const mp_rom_obj_tuple_t camera_data_tuple = {
5+
{&mp_type_tuple},
6+
8,
7+
{
8+
MP_ROM_PTR(&pin_GPIO34),
9+
MP_ROM_PTR(&pin_GPIO13),
10+
MP_ROM_PTR(&pin_GPIO14),
11+
MP_ROM_PTR(&pin_GPIO35),
12+
MP_ROM_PTR(&pin_GPIO39), // "S_VN"
13+
MP_ROM_PTR(&pin_GPIO38),
14+
MP_ROM_PTR(&pin_GPIO37),
15+
MP_ROM_PTR(&pin_GPIO36), // "S_VP"
16+
}
17+
};
18+
19+
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
20+
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
21+
22+
{ MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_GPIO26) },
23+
{ MP_ROM_QSTR(MP_QSTR_I2S_WS), MP_ROM_PTR(&pin_GPIO32) },
24+
{ MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_GPIO32) },
25+
26+
{ MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_GPIO0) },
27+
28+
{ MP_ROM_QSTR(MP_QSTR_LED_RED), MP_ROM_PTR(&pin_GPIO21) },
29+
{ MP_ROM_QSTR(MP_QSTR_LED_WHITE), MP_ROM_PTR(&pin_GPIO22) },
30+
31+
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
32+
33+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_DATA), MP_ROM_PTR(&camera_data_tuple) },
34+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_VSYNC), MP_ROM_PTR(&pin_GPIO5) },
35+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_HREF), MP_ROM_PTR(&pin_GPIO27) },
36+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_PCLK), MP_ROM_PTR(&pin_GPIO25) },
37+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_XCLK), MP_ROM_PTR(&pin_GPIO4) },
38+
};
39+
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Automatically generated file. DO NOT EDIT.
2+
# Espressif IoT Development Framework (ESP-IDF) Project Configuration
3+
#
4+
#
5+
# Component config
6+
#
7+
#
8+
# ESP32-specific
9+
#
10+
CONFIG_ESP32_SPIRAM_SUPPORT=y
11+
#
12+
# SPI RAM config
13+
#
14+
CONFIG_SPIRAM_TYPE_AUTO=y
15+
# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set
16+
# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set
17+
# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set
18+
CONFIG_SPIRAM_SIZE=-1
19+
CONFIG_SPIRAM_SPEED_40M=y
20+
CONFIG_SPIRAM=y
21+
CONFIG_SPIRAM_BOOT_INIT=y
22+
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
23+
CONFIG_SPIRAM_USE_MEMMAP=y
24+
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
25+
# CONFIG_SPIRAM_USE_MALLOC is not set
26+
CONFIG_SPIRAM_MEMTEST=y
27+
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
28+
# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set
29+
CONFIG_SPIRAM_CACHE_WORKAROUND=y
30+
# CONFIG_SPIRAM_BANKSWITCH_ENABLE is not set
31+
# end of SPI RAM config
32+
33+
# end of ESP32-specific
34+
35+
#
36+
# NVS
37+
#
38+
# CONFIG_NVS_ASSERT_ERROR_CHECK is not set
39+
# end of NVS
40+
41+
#
42+
# Camera configuration
43+
#
44+
CONFIG_OV7670_SUPPORT=y
45+
CONFIG_OV7725_SUPPORT=y
46+
CONFIG_NT99141_SUPPORT=y
47+
CONFIG_OV2640_SUPPORT=y
48+
CONFIG_OV3660_SUPPORT=y
49+
CONFIG_OV5640_SUPPORT=y
50+
CONFIG_GC2145_SUPPORT=y
51+
CONFIG_GC032A_SUPPORT=y
52+
CONFIG_GC0308_SUPPORT=y
53+
CONFIG_BF3005_SUPPORT=y
54+
CONFIG_BF20A6_SUPPORT=y
55+
# CONFIG_SC101IOT_SUPPORT is not set
56+
CONFIG_SC030IOT_SUPPORT=y
57+
# CONFIG_SCCB_HARDWARE_I2C_PORT0 is not set
58+
CONFIG_SCCB_HARDWARE_I2C_PORT1=y
59+
CONFIG_SCCB_CLK_FREQ=100000
60+
# CONFIG_GC_SENSOR_WINDOWING_MODE is not set
61+
CONFIG_GC_SENSOR_SUBSAMPLE_MODE=y
62+
CONFIG_CAMERA_CORE0=y
63+
# CONFIG_CAMERA_CORE1 is not set
64+
# CONFIG_CAMERA_NO_AFFINITY is not set
65+
CONFIG_CAMERA_DMA_BUFFER_SIZE_MAX=32768
66+
# end of Camera configuration
67+
68+
# end of Component config
69+
#
70+
CONFIG_ESP_CONSOLE_UART_TX_GPIO=1
71+
CONFIG_ESP_CONSOLE_UART_RX_GPIO=3
72+

0 commit comments

Comments
 (0)