esp32/boards: Add LOLIN C3 MINI ESP32-C3 based board.
This commit is contained in:
parent
3b9de192be
commit
1a0bd352d3
19
ports/esp32/boards/LOLIN_C3_MINI/board.json
Normal file
19
ports/esp32/boards/LOLIN_C3_MINI/board.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"deploy": [
|
||||
"../deploy_c3.md"
|
||||
],
|
||||
"docs": "",
|
||||
"features": [
|
||||
"BLE",
|
||||
"USB-C",
|
||||
"WiFi"
|
||||
],
|
||||
"images": [
|
||||
"lolin_c3_mini.jpg"
|
||||
],
|
||||
"mcu": "esp32c3",
|
||||
"product": "C3 mini",
|
||||
"thumbnail": "",
|
||||
"url": "https://www.wemos.cc/en/latest/c3/c3_mini.html",
|
||||
"vendor": "Wemos"
|
||||
}
|
2
ports/esp32/boards/LOLIN_C3_MINI/manifest.py
Normal file
2
ports/esp32/boards/LOLIN_C3_MINI/manifest.py
Normal file
@ -0,0 +1,2 @@
|
||||
include("$(PORT_DIR)/boards/manifest.py")
|
||||
freeze("./modules")
|
26
ports/esp32/boards/LOLIN_C3_MINI/modules/c3mini.py
Normal file
26
ports/esp32/boards/LOLIN_C3_MINI/modules/c3mini.py
Normal file
@ -0,0 +1,26 @@
|
||||
# LOLIN C3 MINI MicroPython Helper Library
|
||||
|
||||
from micropython import const
|
||||
from machine import Pin
|
||||
|
||||
# Pin Assignments
|
||||
|
||||
# SPI
|
||||
SPI_MOSI = const(4)
|
||||
SPI_MISO = const(3)
|
||||
SPI_CLK = const(2)
|
||||
|
||||
# I2C
|
||||
I2C_SDA = const(8)
|
||||
I2C_SCL = const(10)
|
||||
|
||||
# LED
|
||||
LED = const(7)
|
||||
|
||||
# BUTTON
|
||||
BUTTON = const(0)
|
||||
|
||||
# Built-in peripherals
|
||||
|
||||
led = Pin(LED, Pin.OUT, value=0)
|
||||
button = Pin(BUTTON, Pin.IN, Pin.PULL_UP)
|
11
ports/esp32/boards/LOLIN_C3_MINI/mpconfigboard.cmake
Normal file
11
ports/esp32/boards/LOLIN_C3_MINI/mpconfigboard.cmake
Normal file
@ -0,0 +1,11 @@
|
||||
set(IDF_TARGET esp32c3)
|
||||
|
||||
set(SDKCONFIG_DEFAULTS
|
||||
boards/sdkconfig.base
|
||||
boards/sdkconfig.ble
|
||||
boards/LOLIN_C3_MINI/sdkconfig.board
|
||||
)
|
||||
|
||||
if(NOT MICROPY_FROZEN_MANIFEST)
|
||||
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
||||
endif()
|
13
ports/esp32/boards/LOLIN_C3_MINI/mpconfigboard.h
Normal file
13
ports/esp32/boards/LOLIN_C3_MINI/mpconfigboard.h
Normal file
@ -0,0 +1,13 @@
|
||||
#define MICROPY_HW_BOARD_NAME "LOLIN_C3_MINI"
|
||||
#define MICROPY_HW_MCU_NAME "ESP32-C3FH4"
|
||||
|
||||
#define MICROPY_HW_ENABLE_SDCARD (0)
|
||||
#define MICROPY_PY_MACHINE_DAC (0)
|
||||
#define MICROPY_PY_MACHINE_I2S (0)
|
||||
|
||||
#define MICROPY_HW_I2C0_SCL (10)
|
||||
#define MICROPY_HW_I2C0_SDA (8)
|
||||
|
||||
#define MICROPY_HW_SPI1_MOSI (4)
|
||||
#define MICROPY_HW_SPI1_MISO (3)
|
||||
#define MICROPY_HW_SPI1_SCK (2)
|
9
ports/esp32/boards/LOLIN_C3_MINI/sdkconfig.board
Normal file
9
ports/esp32/boards/LOLIN_C3_MINI/sdkconfig.board
Normal file
@ -0,0 +1,9 @@
|
||||
CONFIG_ESP32C3_REV_MIN_3=y
|
||||
CONFIG_ESP32C3_REV_MIN=3
|
||||
CONFIG_ESP32C3_BROWNOUT_DET=y
|
||||
CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_7=
|
||||
CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_4=y
|
||||
CONFIG_ESP32C3_BROWNOUT_DET_LVL=4
|
||||
CONFIG_ESP_CONSOLE_UART_DEFAULT=
|
||||
CONFIG_ESP_CONSOLE_USB_CDC=
|
||||
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
|
Loading…
x
Reference in New Issue
Block a user