Skip to content

Commit 0d9429f

Browse files
sbonnickdpgeorge
authored andcommitted
esp32/boards: Add LOLIN_S2_MINI ESP32-S2 board.
To support Lolin S2 Mini ESP32-S2 Variant board. More information about this board can be found at https://www.wemos.cc/en/latest/s2/s2_mini.html
1 parent 67d1dca commit 0d9429f

File tree

5 files changed

+62
-0
lines changed

5 files changed

+62
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include("$(PORT_DIR)/boards/manifest.py")
2+
freeze("./modules")
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# LOLIN S2 MINI MicroPython Helper Library
2+
3+
from micropython import const
4+
from machine import Pin
5+
6+
# Pin Assignments
7+
8+
# SPI
9+
SPI_MOSI = const(11)
10+
SPI_MISO = const(9)
11+
SPI_CLK = const(7)
12+
13+
# I2C
14+
I2C_SDA = const(33)
15+
I2C_SCL = const(35)
16+
17+
# DAC
18+
DAC1 = const(17)
19+
DAC2 = const(18)
20+
21+
# LED
22+
LED = const(15)
23+
24+
# BUTTON
25+
BUTTON = const(0)
26+
27+
# Helper methods for built in sensors
28+
29+
led = Pin(LED, Pin.OUT, value=0)
30+
31+
button = Pin(BUTTON, Pin.IN, Pin.PULL_UP)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
set(IDF_TARGET esp32s2)
2+
3+
set(SDKCONFIG_DEFAULTS
4+
boards/sdkconfig.base
5+
boards/sdkconfig.spiram_sx
6+
boards/sdkconfig.usb
7+
)
8+
9+
if(NOT MICROPY_FROZEN_MANIFEST)
10+
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
11+
endif()
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#define MICROPY_HW_BOARD_NAME "LOLIN_S2_MINI"
2+
#define MICROPY_HW_MCU_NAME "ESP32-S2FN4R2"
3+
4+
#define MICROPY_PY_BLUETOOTH (0)
5+
#define MICROPY_HW_ENABLE_SDCARD (0)
6+
7+
#define MICROPY_HW_I2C0_SCL (35)
8+
#define MICROPY_HW_I2C0_SDA (33)
9+
10+
#define MICROPY_HW_SPI1_MOSI (11)
11+
#define MICROPY_HW_SPI1_MISO (9)
12+
#define MICROPY_HW_SPI1_SCK (7)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CONFIG_FLASHMODE_QIO=y
2+
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
3+
CONFIG_USB_AND_UART=y
4+
# LWIP
5+
CONFIG_LWIP_LOCAL_HOSTNAME="LOLIN_S2_MINI"
6+
# end of LWIP

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy