Skip to content

Commit 2e33917

Browse files
authored
Merge branch 'adafruit:main' into main
2 parents 821ab83 + 89cfb22 commit 2e33917

File tree

9 files changed

+186
-20
lines changed

9 files changed

+186
-20
lines changed

ports/atmel-samd/boards/bradanlanestudio_coin_m0/mpconfigboard.mk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ CHIP_FAMILY = samd21
1818

1919
SPI_FLASH_FILESYSTEM = 1
2020
EXTERNAL_FLASH_DEVICES = "W25Q32JVxQ"
21-
LONGINT_IMPL = NONE
21+
LONGINT_IMPL = MPZ
2222

2323
# the M0 Coin has limited functionality and many modules can be eliminated
2424

2525
# there may be more modules which are of no used but will require further digging
2626

2727
# Disable modules that are unusable on this special-purpose board.
2828

29-
CIRCUITPY_FULL_BUILD = 0
29+
CIRCUITPY_FULL_BUILD = 1
3030

3131
CIRCUITPY_AUDIOIO = 1
3232
CIRCUITPY_DISPLAYIO = 0
@@ -38,7 +38,8 @@ CIRCUITPY_ROTARYIO = 0
3838
CIRCUITPY_RTC = 0
3939
CIRCUITPY_USB_HID = 1
4040
CIRCUITPY_USB_MIDI = 0
41-
41+
CIRCUITPY_NEOPIXEL_WRITE = 1
42+
CIRCUITPY_PIXELBUF = 1
4243

4344
# Include these Python libraries in firmware.
4445
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID
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 "supervisor/board.h"
8+
9+
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
#pragma once
8+
9+
// Micropython setup
10+
11+
#define MICROPY_HW_BOARD_NAME "Prokyber Ai-On-The-Edge-Cam"
12+
#define MICROPY_HW_MCU_NAME "ESP32S3"
13+
14+
#define MICROPY_HW_NEOPIXEL (&pin_GPIO12)
15+
16+
#define MICROPY_HW_LED_STATUS (&pin_GPIO48)
17+
18+
#define DEFAULT_UART_BUS_RX (&pin_GPIO44)
19+
#define DEFAULT_UART_BUS_TX (&pin_GPIO43)
20+
21+
#define CIRCUITPY_BOARD_I2C (1)
22+
#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO5, .sda = &pin_GPIO4}}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
USB_VID = 0x1209
2+
USB_PID = 0xDABB
3+
USB_PRODUCT = "AI-ON-THE-EDGE-CAM"
4+
USB_MANUFACTURER = "Prokyber"
5+
6+
IDF_TARGET = esp32s3
7+
8+
CIRCUITPY_ESP_FLASH_MODE = qio
9+
CIRCUITPY_ESP_FLASH_FREQ = 80m
10+
CIRCUITPY_ESP_FLASH_SIZE = 16MB
11+
12+
CIRCUITPY_ESP_PSRAM_MODE = opi
13+
CIRCUITPY_ESP_PSRAM_FREQ = 80m
14+
CIRCUITPY_ESP_PSRAM_SIZE = 8MB
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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+
10+
static const mp_rom_obj_tuple_t camera_data_tuple = {
11+
{&mp_type_tuple},
12+
8,
13+
{
14+
MP_ROM_PTR(&pin_GPIO11),
15+
MP_ROM_PTR(&pin_GPIO9),
16+
MP_ROM_PTR(&pin_GPIO8),
17+
MP_ROM_PTR(&pin_GPIO10),
18+
MP_ROM_PTR(&pin_GPIO47),
19+
MP_ROM_PTR(&pin_GPIO18),
20+
MP_ROM_PTR(&pin_GPIO17),
21+
MP_ROM_PTR(&pin_GPIO16),
22+
}
23+
};
24+
25+
static const mp_rom_map_elem_t board_module_globals_table[] = {
26+
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
27+
28+
{ MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) },
29+
{ MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) },
30+
31+
{ MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) },
32+
{ MP_ROM_QSTR(MP_QSTR_PER_EN), MP_ROM_PTR(&pin_GPIO46) },
33+
34+
// SD
35+
{ MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO3) },
36+
{ MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) },
37+
38+
{ MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_GPIO41) },
39+
{ MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) },
40+
41+
{ MP_ROM_QSTR(MP_QSTR_SD_MOSI), MP_ROM_PTR(&pin_GPIO42) },
42+
{ MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) },
43+
44+
{ MP_ROM_QSTR(MP_QSTR_SD_CLK), MP_ROM_PTR(&pin_GPIO40) },
45+
{ MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) },
46+
47+
// Ethernet
48+
{ MP_ROM_QSTR(MP_QSTR_ETH_RST), MP_ROM_PTR(&pin_GPIO45) },
49+
{ MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) },
50+
51+
{ MP_ROM_QSTR(MP_QSTR_ETH_INT), MP_ROM_PTR(&pin_GPIO38) },
52+
{ MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) },
53+
54+
{ MP_ROM_QSTR(MP_QSTR_ETH_MOSI), MP_ROM_PTR(&pin_GPIO1) },
55+
{ MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) },
56+
57+
{ MP_ROM_QSTR(MP_QSTR_ETH_MISO), MP_ROM_PTR(&pin_GPIO14) },
58+
{ MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) },
59+
60+
{ MP_ROM_QSTR(MP_QSTR_ETH_CLK), MP_ROM_PTR(&pin_GPIO21) },
61+
{ MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },
62+
63+
{ MP_ROM_QSTR(MP_QSTR_ETH_CS), MP_ROM_PTR(&pin_GPIO39) },
64+
{ MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) },
65+
66+
// LEDs
67+
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO12) },
68+
{ MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },
69+
70+
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO48) },
71+
{ MP_ROM_QSTR(MP_QSTR_IO48), MP_ROM_PTR(&pin_GPIO48) },
72+
73+
// UART
74+
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) },
75+
{ MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) },
76+
77+
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) },
78+
{ MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) },
79+
80+
// I2C
81+
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO4) },
82+
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO5) },
83+
84+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_DATA), MP_ROM_PTR(&camera_data_tuple) },
85+
86+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_VSYNC), MP_ROM_PTR(&pin_GPIO6) },
87+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_HREF), MP_ROM_PTR(&pin_GPIO7) },
88+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_DATA9), MP_ROM_PTR(&pin_GPIO16) },
89+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_XCLK), MP_ROM_PTR(&pin_GPIO15) },
90+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_DATA8), MP_ROM_PTR(&pin_GPIO17) },
91+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_DATA7), MP_ROM_PTR(&pin_GPIO18) },
92+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_PCLK), MP_ROM_PTR(&pin_GPIO13) },
93+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_DATA6), MP_ROM_PTR(&pin_GPIO47) },
94+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_DATA2), MP_ROM_PTR(&pin_GPIO11) },
95+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_DATA5), MP_ROM_PTR(&pin_GPIO10) },
96+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_DATA3), MP_ROM_PTR(&pin_GPIO9) },
97+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_DATA4), MP_ROM_PTR(&pin_GPIO8) },
98+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_SIOD), MP_ROM_PTR(&pin_GPIO4) }, // SDA
99+
{ MP_ROM_QSTR(MP_QSTR_CAMERA_SIOC), MP_ROM_PTR(&pin_GPIO5) }, // SCL
100+
101+
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
102+
{ MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) },
103+
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
104+
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
105+
};
106+
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# Espressif IoT Development Framework Configuration
3+
#
4+
#
5+
# Component config
6+
#
7+
#
8+
# LWIP
9+
#
10+
# end of LWIP
11+
CONFIG_OV2640_SUPPORT=y
12+
# end of Component config
13+
14+
# end of Espressif IoT Development Framework Configuration

ports/espressif/esp-idf-config/sdkconfig.defaults

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,6 @@ CONFIG_LWIP_IPV6_AUTOCONFIG=y
7171
CONFIG_LWIP_IPV6_RDNSS_MAX_DNS_SERVERS=0
7272
CONFIG_LWIP_IPV6_DHCP6=y
7373
#
74-
# TCP
75-
#
76-
CONFIG_LWIP_MAX_ACTIVE_TCP=4
77-
CONFIG_LWIP_MAX_LISTENING_TCP=4
78-
CONFIG_LWIP_TCP_SYNMAXRTX=6
79-
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=2880
80-
CONFIG_LWIP_TCP_WND_DEFAULT=2880
81-
CONFIG_LWIP_TCP_RTO_TIME=3000
82-
# end of TCP
83-
8474
# end of LWIP
8575

8676
#

shared-bindings/time/__init__.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,16 @@ static mp_obj_t struct_time_make_new(const mp_obj_type_t *type, size_t n_args, s
8383
}
8484

8585
//| class struct_time:
86+
//| tm_year: int
87+
//| tm_mon: int
88+
//| tm_mday: int
89+
//| tm_hour: int
90+
//| tm_min: int
91+
//| tm_sec: int
92+
//| tm_wday: int
93+
//| tm_yday: int
94+
//| tm_isdst: int
95+
//|
8696
//| def __init__(self, time_tuple: Sequence[int]) -> None:
8797
//| """Structure used to capture a date and time. Can be constructed from a `struct_time`, `tuple`, `list`, or `namedtuple` with 9 elements.
8898
//|
@@ -210,7 +220,7 @@ static mp_obj_t time_monotonic_ns(void) {
210220
}
211221
MP_DEFINE_CONST_FUN_OBJ_0(time_monotonic_ns_obj, time_monotonic_ns);
212222

213-
//| def localtime(secs: int) -> struct_time:
223+
//| def localtime(secs: Optional[int] = None) -> struct_time:
214224
//| """Convert a time expressed in seconds since Jan 1, 1970 to a struct_time in
215225
//| local time. If secs is not provided or None, the current time as returned
216226
//| by time() is used.

shared-bindings/wifi/Radio.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ MP_PROPERTY_GETSET(wifi_radio_enabled_obj,
9999
(mp_obj_t)&wifi_radio_get_enabled_obj,
100100
(mp_obj_t)&wifi_radio_set_enabled_obj);
101101

102-
//| hostname: Union[str | ReadableBuffer]
102+
//| hostname: Union[str, ReadableBuffer]
103103
//| """Hostname for wifi interface. When the hostname is altered after interface started/connected
104104
//| the changes would only be reflected once the interface restarts/reconnects."""
105105
static mp_obj_t wifi_radio_get_hostname(mp_obj_t self_in) {
@@ -325,8 +325,8 @@ MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_stop_station_obj, wifi_radio_stop_station);
325325

326326
//| def start_ap(
327327
//| self,
328-
//| ssid: Union[str | ReadableBuffer],
329-
//| password: Union[str | ReadableBuffer] = b"",
328+
//| ssid: Union[str, ReadableBuffer],
329+
//| password: Union[str, ReadableBuffer] = b"",
330330
//| *,
331331
//| channel: int = 1,
332332
//| authmode: Iterable[AuthMode] = (),
@@ -438,11 +438,11 @@ MP_PROPERTY_GETTER(wifi_radio_ap_active_obj,
438438

439439
//| def connect(
440440
//| self,
441-
//| ssid: Union[str | ReadableBuffer],
442-
//| password: Union[str | ReadableBuffer] = b"",
441+
//| ssid: Union[str, ReadableBuffer],
442+
//| password: Union[str, ReadableBuffer] = b"",
443443
//| *,
444444
//| channel: int = 0,
445-
//| bssid: Optional[Union[str | ReadableBuffer]] = None,
445+
//| bssid: Optional[Union[str, ReadableBuffer]] = None,
446446
//| timeout: Optional[float] = None,
447447
//| ) -> None:
448448
//| """Connects to the given ssid and waits for an ip address. Reconnections are handled

0 commit comments

Comments
 (0)