Skip to content

Commit 63f01c6

Browse files
committed
add welefant module
1 parent ac00488 commit 63f01c6

File tree

12 files changed

+176
-1
lines changed

12 files changed

+176
-1
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,3 +411,6 @@
411411
[submodule "ports/analog/msdk"]
412412
path = ports/analog/msdk
413413
url = https://github.com/analogdevicesinc/msdk.git
414+
[submodule "frozen/HaCraFu_CircuitPython_Welefant"]
415+
path = frozen/HaCraFu_CircuitPython_Welefant
416+
url = https://github.com/HaCraFu/HaCraFu_CircuitPython_Welefant.git

ports/espressif/boards/hacrafu_welefant_231010_fn8/board.c renamed to ports/espressif/boards/hacrafu_welefant_231010_s3_16/board.c

File renamed without changes.

ports/espressif/boards/hacrafu_welefant_231010_fn8/mpconfigboard.h renamed to ports/espressif/boards/hacrafu_welefant_231010_s3_16/mpconfigboard.h

File renamed without changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
USB_VID = 0x303A
2+
USB_PID = 0x7003
3+
USB_PRODUCT = "Welefant"
4+
USB_MANUFACTURER = "HaCraFu"
5+
6+
IDF_TARGET = esp32s3
7+
8+
CIRCUITPY_ESP_FLASH_MODE = dio
9+
CIRCUITPY_ESP_FLASH_FREQ = 80m
10+
CIRCUITPY_ESP_FLASH_SIZE = 16MB
11+
# CFLAGS_INLINE_LIMIT = 55
12+
#CIRCUITPY_AUDIOBUSIO_PDMIN = 1
13+
14+
CIRCUITPY_ESPCAMERA = 0
15+
16+
# Include these Python libraries in firmware.
17+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_asyncio
18+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
19+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LED_Animation
20+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_framebuf
21+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Pixel_Framebuf
22+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SimpleMath
23+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks
24+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests
25+
FROZEN_MPY_DIRS += $(TOP)/frozen/HaCraFu_CircuitPython_Welefant

ports/espressif/boards/hacrafu_welefant_231010_fn8/pins.c renamed to ports/espressif/boards/hacrafu_welefant_231010_s3_16/pins.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "shared-bindings/board/__init__.h"
22

3-
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
3+
static const mp_rom_map_elem_t board_module_globals_table[] = {
44
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
55

66
{MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0)},

ports/espressif/boards/hacrafu_welefant_231010_fn8/sdkconfig renamed to ports/espressif/boards/hacrafu_welefant_231010_s3_16/sdkconfig

File renamed without changes.
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) 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+
31+
void board_init(void) {
32+
// Debug UART
33+
#ifdef DEBUG
34+
common_hal_never_reset_pin(&pin_GPIO43);
35+
common_hal_never_reset_pin(&pin_GPIO44);
36+
#endif
37+
}
38+
39+
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2019 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+
// Micropython setup
28+
29+
#define MICROPY_HW_BOARD_NAME "Welefant"
30+
#define MICROPY_HW_MCU_NAME "ESP32S3"
31+
32+
#define MICROPY_HW_NEOPIXEL (&pin_GPIO48)
33+
34+
#define DEFAULT_UART_BUS_RX (&pin_GPIO44)
35+
#define DEFAULT_UART_BUS_TX (&pin_GPIO43)

ports/espressif/boards/hacrafu_welefant_231010_fn8/mpconfigboard.mk renamed to ports/espressif/boards/hacrafu_welefant_231010_s3_fn8/mpconfigboard.mk

File renamed without changes.

0 commit comments

Comments
 (0)