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
This commit is contained in:
parent
67d1dca9c2
commit
0d9429f44c
2
ports/esp32/boards/LOLIN_S2_MINI/manifest.py
Normal file
2
ports/esp32/boards/LOLIN_S2_MINI/manifest.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
include("$(PORT_DIR)/boards/manifest.py")
|
||||||
|
freeze("./modules")
|
||||||
31
ports/esp32/boards/LOLIN_S2_MINI/modules/s2mini.py
Normal file
31
ports/esp32/boards/LOLIN_S2_MINI/modules/s2mini.py
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# LOLIN S2 MINI MicroPython Helper Library
|
||||||
|
|
||||||
|
from micropython import const
|
||||||
|
from machine import Pin
|
||||||
|
|
||||||
|
# Pin Assignments
|
||||||
|
|
||||||
|
# SPI
|
||||||
|
SPI_MOSI = const(11)
|
||||||
|
SPI_MISO = const(9)
|
||||||
|
SPI_CLK = const(7)
|
||||||
|
|
||||||
|
# I2C
|
||||||
|
I2C_SDA = const(33)
|
||||||
|
I2C_SCL = const(35)
|
||||||
|
|
||||||
|
# DAC
|
||||||
|
DAC1 = const(17)
|
||||||
|
DAC2 = const(18)
|
||||||
|
|
||||||
|
# LED
|
||||||
|
LED = const(15)
|
||||||
|
|
||||||
|
# BUTTON
|
||||||
|
BUTTON = const(0)
|
||||||
|
|
||||||
|
# Helper methods for built in sensors
|
||||||
|
|
||||||
|
led = Pin(LED, Pin.OUT, value=0)
|
||||||
|
|
||||||
|
button = Pin(BUTTON, Pin.IN, Pin.PULL_UP)
|
||||||
11
ports/esp32/boards/LOLIN_S2_MINI/mpconfigboard.cmake
Normal file
11
ports/esp32/boards/LOLIN_S2_MINI/mpconfigboard.cmake
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
set(IDF_TARGET esp32s2)
|
||||||
|
|
||||||
|
set(SDKCONFIG_DEFAULTS
|
||||||
|
boards/sdkconfig.base
|
||||||
|
boards/sdkconfig.spiram_sx
|
||||||
|
boards/sdkconfig.usb
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT MICROPY_FROZEN_MANIFEST)
|
||||||
|
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
||||||
|
endif()
|
||||||
12
ports/esp32/boards/LOLIN_S2_MINI/mpconfigboard.h
Normal file
12
ports/esp32/boards/LOLIN_S2_MINI/mpconfigboard.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#define MICROPY_HW_BOARD_NAME "LOLIN_S2_MINI"
|
||||||
|
#define MICROPY_HW_MCU_NAME "ESP32-S2FN4R2"
|
||||||
|
|
||||||
|
#define MICROPY_PY_BLUETOOTH (0)
|
||||||
|
#define MICROPY_HW_ENABLE_SDCARD (0)
|
||||||
|
|
||||||
|
#define MICROPY_HW_I2C0_SCL (35)
|
||||||
|
#define MICROPY_HW_I2C0_SDA (33)
|
||||||
|
|
||||||
|
#define MICROPY_HW_SPI1_MOSI (11)
|
||||||
|
#define MICROPY_HW_SPI1_MISO (9)
|
||||||
|
#define MICROPY_HW_SPI1_SCK (7)
|
||||||
6
ports/esp32/boards/LOLIN_S2_MINI/sdkconfig.board
Normal file
6
ports/esp32/boards/LOLIN_S2_MINI/sdkconfig.board
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
CONFIG_FLASHMODE_QIO=y
|
||||||
|
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
|
||||||
|
CONFIG_USB_AND_UART=y
|
||||||
|
# LWIP
|
||||||
|
CONFIG_LWIP_LOCAL_HOSTNAME="LOLIN_S2_MINI"
|
||||||
|
# end of LWIP
|
||||||
Loading…
x
Reference in New Issue
Block a user