Skip to content

Commit 62551fc

Browse files
authored
Merge pull request #10523 from sensebox/main
add senseBox-eye with ESP32S3
2 parents 48d945f + 0e26ab4 commit 62551fc

File tree

7 files changed

+150
-2
lines changed

7 files changed

+150
-2
lines changed

ports/espressif/README.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,3 @@ And follow the Espressif GDB tutorial `instructions for connecting <https://docs
222222
mon reset halt
223223
flushregs
224224
thb app_main
225-
c
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
#include "mpconfigboard.h"
8+
9+
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
// Micropython setup
8+
9+
#define MICROPY_HW_BOARD_NAME "senseBox-eye ESP32S3"
10+
#define MICROPY_HW_MCU_NAME "ESP32S3"
11+
12+
#define MICROPY_HW_NEOPIXEL (&pin_GPIO45)
13+
14+
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO1)
15+
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2)
16+
17+
#define DEFAULT_UART_BUS_RX (&pin_GPIO44)
18+
#define DEFAULT_UART_BUS_TX (&pin_GPIO43)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
USB_VID = 0x303A
2+
USB_PID = 0x82D2
3+
4+
USB_PRODUCT = "senseBox-eye ESP32S3"
5+
USB_MANUFACTURER = "senseBox"
6+
7+
IDF_TARGET = esp32s3
8+
9+
CIRCUITPY_ESP_FLASH_MODE = qio
10+
CIRCUITPY_ESP_FLASH_SIZE = 8MB
11+
CIRCUITPY_ESP_FLASH_FREQ = 80m
12+
13+
CIRCUITPY_ESP_PSRAM_MODE = opi
14+
CIRCUITPY_ESP_PSRAM_SIZE = 8MB
15+
CIRCUITPY_ESP_PSRAM_FREQ = 80m
16+
17+
CIRCUITPY_ESPCAMERA = 1
18+
CIRCUITPY_AUDIOBUSIO = 1
19+
20+
# Include these Python libraries in firmware.
21+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
#include "py/objtuple.h"
8+
#include "shared-bindings/board/__init__.h"
9+
#include "shared-module/displayio/__init__.h"
10+
11+
CIRCUITPY_BOARD_BUS_SINGLETON(sscb_i2c, i2c, 2)
12+
13+
static const mp_rom_obj_tuple_t camera_data_tuple = {
14+
// The order matters.
15+
// They must be ordered from low to high (CAM_D0, CAM_D1...CAM_D7).
16+
17+
// Do not include any of the control pins in here.
18+
{&mp_type_tuple},
19+
8,
20+
{
21+
MP_ROM_PTR(&pin_GPIO11),
22+
MP_ROM_PTR(&pin_GPIO9),
23+
MP_ROM_PTR(&pin_GPIO8),
24+
MP_ROM_PTR(&pin_GPIO10),
25+
MP_ROM_PTR(&pin_GPIO12),
26+
MP_ROM_PTR(&pin_GPIO18),
27+
MP_ROM_PTR(&pin_GPIO17),
28+
MP_ROM_PTR(&pin_GPIO16),
29+
}
30+
};
31+
32+
static const mp_rom_map_elem_t board_module_globals_table[] = {
33+
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
34+
{ MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) },
35+
{ MP_ROM_QSTR(MP_QSTR_BOOT0), MP_ROM_PTR(&pin_GPIO0) },
36+
{MP_ROM_QSTR(MP_QSTR_BUTTON_SW), MP_ROM_PTR(&pin_GPIO47) },
37+
38+
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO2) },
39+
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO1) },
40+
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) },
41+
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) },
42+
43+
{ MP_ROM_QSTR(MP_QSTR_A14), MP_ROM_PTR(&pin_GPIO14) },
44+
{ MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) },
45+
{ MP_ROM_QSTR(MP_QSTR_A48), MP_ROM_PTR(&pin_GPIO48) },
46+
{ MP_ROM_QSTR(MP_QSTR_D48), MP_ROM_PTR(&pin_GPIO48) },
47+
48+
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO45) },
49+
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO45) },
50+
51+
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) },
52+
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) },
53+
{ MP_ROM_QSTR(MP_QSTR_UART_ENABLE), MP_ROM_PTR(&pin_GPIO26) },
54+
55+
{ MP_ROM_QSTR(MP_QSTR_CAM_DATA), MP_ROM_PTR(&camera_data_tuple) },
56+
{ MP_ROM_QSTR(MP_QSTR_CAM_D0), MP_ROM_PTR(&pin_GPIO11) },
57+
{ MP_ROM_QSTR(MP_QSTR_CAM_D1), MP_ROM_PTR(&pin_GPIO9) },
58+
{ MP_ROM_QSTR(MP_QSTR_CAM_D2), MP_ROM_PTR(&pin_GPIO8) },
59+
{ MP_ROM_QSTR(MP_QSTR_CAM_D3), MP_ROM_PTR(&pin_GPIO10) },
60+
{ MP_ROM_QSTR(MP_QSTR_CAM_D4), MP_ROM_PTR(&pin_GPIO12) },
61+
{ MP_ROM_QSTR(MP_QSTR_CAM_D5), MP_ROM_PTR(&pin_GPIO18) },
62+
{ MP_ROM_QSTR(MP_QSTR_CAM_D6), MP_ROM_PTR(&pin_GPIO17) },
63+
{ MP_ROM_QSTR(MP_QSTR_CAM_D7), MP_ROM_PTR(&pin_GPIO16) },
64+
{ MP_ROM_QSTR(MP_QSTR_CAM_XCLK), MP_ROM_PTR(&pin_GPIO15) },
65+
{ MP_ROM_QSTR(MP_QSTR_CAM_HREF), MP_ROM_PTR(&pin_GPIO7) },
66+
{ MP_ROM_QSTR(MP_QSTR_CAM_PCLK), MP_ROM_PTR(&pin_GPIO13) },
67+
{ MP_ROM_QSTR(MP_QSTR_CAM_VSYNC), MP_ROM_PTR(&pin_GPIO6) },
68+
{ MP_ROM_QSTR(MP_QSTR_CAM_SCL), MP_ROM_PTR(&pin_GPIO5) },
69+
{ MP_ROM_QSTR(MP_QSTR_CAM_SDA), MP_ROM_PTR(&pin_GPIO4) },
70+
{ MP_ROM_QSTR(MP_QSTR_PWDN), MP_ROM_PTR(&pin_GPIO46) },
71+
72+
{ MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO41) },
73+
{ MP_ROM_QSTR(MP_QSTR_SD_MOSI), MP_ROM_PTR(&pin_GPIO38) },
74+
{ MP_ROM_QSTR(MP_QSTR_SD_SCLK), MP_ROM_PTR(&pin_GPIO39) },
75+
{ MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_GPIO40) },
76+
{ MP_ROM_QSTR(MP_QSTR_SD_ENABLE), MP_ROM_PTR(&pin_GPIO3) },
77+
78+
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
79+
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
80+
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
81+
};
82+
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Espressif IoT Development Framework Configuration
3+
#
4+
#
5+
# Component config
6+
#
7+
#
8+
# LWIP
9+
#
10+
# end of LWIP
11+
# Camera configuration
12+
#
13+
CONFIG_OV2640_SUPPORT=y
14+
# CONFIG_OV7725_SUPPORT is not set
15+
# CONFIG_OV3660_SUPPORT is not set
16+
# end of Camera configuration
17+
# end of Component config
18+
19+
# end of Espressif IoT Development Framework Configuration

ports/espressif/boards/sensebox_mcu_esp32s2/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
USB_VID = 0x303A
22
USB_PID = 0x81B9
33
USB_PRODUCT = "senseBox MCU-S2 ESP32S2"
4-
USB_MANUFACTURER = "Espressif"
4+
USB_MANUFACTURER = "senseBox"
55

66
IDF_TARGET = esp32s2
77

0 commit comments

Comments
 (0)