Skip to content

Commit

Permalink
Merge pull request #332 from espressif/bsp/m5dial
Browse files Browse the repository at this point in the history
bsp: New BSP for M5Dial (BSP-488)
  • Loading branch information
espzav authored Jun 20, 2024
2 parents 1a18831 + d25ba52 commit 6bcea47
Show file tree
Hide file tree
Showing 27 changed files with 1,339 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .build-test-rules.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
examples:
disable:
- if: IDF_VERSION_MAJOR < 5 and CONFIG_NAME in ["esp32_c3_lcdkit", "esp32_s3_lcd_ev_board", "esp32_s3_usb_otg", "m5stack_core_s3"]
- if: IDF_VERSION_MAJOR < 5 and CONFIG_NAME in ["esp32_c3_lcdkit", "esp32_s3_lcd_ev_board", "esp32_s3_usb_otg", "m5stack_core_s3", "m5dial"]
reason: Example depends on BSP, which is supported only for IDF >= 5.0
- if: IDF_VERSION_MAJOR < 5 and IDF_TARGET in ["esp32c2", "esp32p4", "esp32c5", "esp32c6"]
reason: Example depends on target, which is supported only for IDF >= 5.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: espressif/upload-components-ci-action@v1
with:
directories: >
bsp/esp32_azure_iot_kit;bsp/esp32_s2_kaluga_kit;bsp/esp_wrover_kit;bsp/esp-box;bsp/esp32_s3_usb_otg;bsp/esp32_s3_eye;bsp/esp32_s3_lcd_ev_board;bsp/esp32_s3_korvo_2;bsp/esp-box-lite;bsp/esp32_lyrat;bsp/esp32_c3_lcdkit;bsp/esp-box-3;bsp/esp_bsp_generic;bsp/esp32_s3_korvo_1;bsp/esp32_p4_function_ev_board;bsp/m5stack_core_s3;
bsp/esp32_azure_iot_kit;bsp/esp32_s2_kaluga_kit;bsp/esp_wrover_kit;bsp/esp-box;bsp/esp32_s3_usb_otg;bsp/esp32_s3_eye;bsp/esp32_s3_lcd_ev_board;bsp/esp32_s3_korvo_2;bsp/esp-box-lite;bsp/esp32_lyrat;bsp/esp32_c3_lcdkit;bsp/esp-box-3;bsp/esp_bsp_generic;bsp/esp32_s3_korvo_1;bsp/esp32_p4_function_ev_board;bsp/m5stack_core_s3;bsp/m5dial;
components/bh1750;components/ds18b20;components/es8311;components/es7210;components/fbm320;components/hts221;components/mag3110;components/mpu6050;components/esp_lvgl_port;components/icm42670;
components/lcd_touch/esp_lcd_touch;components/lcd_touch/esp_lcd_touch_ft5x06;components/lcd_touch/esp_lcd_touch_gt911;components/lcd_touch/esp_lcd_touch_tt21100;components/lcd_touch/esp_lcd_touch_gt1151;components/lcd_touch/esp_lcd_touch_cst816s;
components/lcd/esp_lcd_gc9a01;components/lcd/esp_lcd_ili9341;components/lcd/esp_lcd_ra8875;components/lcd_touch/esp_lcd_touch_stmpe610;components/lcd/esp_lcd_sh1107;components/lcd/esp_lcd_st7796;components/lcd/esp_lcd_gc9503;components/lcd/esp_lcd_ssd1681;components/lcd/esp_lcd_ili9881c;
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/upload_component_noglib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Upload noglib version of BSPs
# TODO: Extend this part to all BSPs
env:
BSPs: "bsp/esp32_s3_eye bsp/esp32_p4_function_ev_board bsp/m5stack_core_s3"
BSPs: "bsp/esp32_s3_eye bsp/esp32_p4_function_ev_board bsp/m5stack_core_s3 bsp/m5dial"
run: |
pip install idf-component-manager py-markdown-table --upgrade
python .github/ci/bsp_noglib.py ${BSPs}
Expand All @@ -26,6 +26,7 @@ jobs:
bsp/esp32_s3_eye_noglib;
bsp/esp32_p4_function_ev_board_noglib;
bsp/m5stack_core_s3_noglib;
bsp/m5dial_noglib;
namespace: "espressif"
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}
dry_run: ${{ github.ref_name != 'master' || github.repository_owner != 'espressif' }}
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Board support packages for development boards using Espressif's SoCs, written in
| [ESP-BOX-3](bsp/esp-box-3) | ESP32-S3 | LCD display with touch, audio codec + power amplifier,<br>accelerometer and gyroscope | <img src="docu/pics/esp32_s3_box_3.png" width="150"> |
| [ESP32-S3-KORVO-1](bsp/esp32_s3_korvo_1) | ESP32-S3 | uSD card slot, microphone, audio codec + power amplifier, RGB led strip | <img src="docu/pics/esp32_s3_korvo_1.png" width="150"> |
| [M5Stack CoreS3](bsp/m5stack_core_s3) | ESP32-S3 | LCD display with touch, uSD card slot, microphone, audio codec | <img src="docu/pics/m5stack_cores3.webp" width="150"> |
| [M5Dial](bsp/m5dial) | ESP32-S3 | LCD display with touch and encoder | <img src="docu/pics/m5dial.webp" width="150"> |
## LCD displays and TOUCH

| [LVGL port](components/esp_lvgl_port) | [LCD drivers](LCD.md) |
Expand Down Expand Up @@ -53,7 +54,7 @@ Best way to start with ESP-BSP is trying one of the [examples](examples) on your
* `bsp/name-of-the-bsp.h`: Main include file of the BSP with public API
* `bsp/esp-bsp.h`: Convenience include file with the same name for all BPSs
* `bsp/display.h` and `bsp/touch.h`: Only for BSPs with LCD or touch controller. Contain low level initialization functions for usage without LVGL graphical library
* By default, BSPs with display are shipped with LVGL, if you are interested in BSP without LVGL you can use BSP versions with `noglib` suffix (eg. `esp32_s3_eye_noglib`).
* By default, BSPs with display are shipped with LVGL, if you are interested in BSP without LVGL you can use BSP versions with `noglib` suffix (eg. `esp32_s3_eye_noglib`).

> **_NOTE:_** There can be only one BSP in a single esp-idf project.
Expand Down
Binary file added SquareLine/boards/v9/m5dial/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions SquareLine/boards/v9/m5dial/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: ESP-BSP SquareLine LVGL Example
targets:
- esp32s3
dependencies:
idf: ">=5.0"
m5dial: "*"
20 changes: 20 additions & 0 deletions SquareLine/boards/v9/m5dial/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name":"M5Dial",
"version":"1.0.0",
"mcu":"ESP32S3",

"screen_width":"240",
"screen_height":"240",
"screen_color_swap":true,

"supported_lvgl_version":"9.1.*",

"short_description":"As a versatile embedded development board, M5Dial integrates the necessary features and sensors for various smart home control applications. It features a 1.28-inch round TFT touchscreen, a rotary encoder, an RFID detection module, an RTC circuit, a buzzer, and under-screen buttons, enabling users to easily implement a wide range of creative projects.",
"long_description":"As a versatile embedded development board, M5Dial integrates the necessary features and sensors for various smart home control applications. It features a 1.28-inch round TFT touchscreen, a rotary encoder, an RFID detection module, an RTC circuit, a buzzer, and under-screen buttons, enabling users to easily implement a wide range of creative projects.",

"placeholders":
{
"__ESP_BOARD_INCLUDE__": "bsp/esp-bsp.h",
"__ESP_BOARD_I2C_INIT__": "/* Initialize I2C (for touch and audio) */\n bsp_i2c_init();"
}
}
5 changes: 5 additions & 0 deletions SquareLine/boards/v9/m5dial/partitions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 8M,
11 changes: 11 additions & 0 deletions SquareLine/boards/v9/m5dial/sdkconfig.defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file was generated using idf.py save-defconfig. It can be edited manually.
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration
#
CONFIG_IDF_TARGET="esp32s3"
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_LV_COLOR_16_SWAP=y
CONFIG_LV_MEM_CUSTOM=y
CONFIG_LV_MEMCPY_MEMSET_STD=y
CONFIG_LV_USE_PERF_MONITOR=y
7 changes: 7 additions & 0 deletions bsp/m5dial/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
idf_component_register(
SRCS "m5dial.c"
INCLUDE_DIRS "include"
PRIV_INCLUDE_DIRS "priv_include"
REQUIRES driver spiffs
PRIV_REQUIRES fatfs esp_lcd
)
65 changes: 65 additions & 0 deletions bsp/m5dial/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
menu "Board Support Package"

config BSP_ERROR_CHECK
bool "Enable error check in BSP"
default y
help
Error check assert the application before returning the error code.

menu "I2C"
config BSP_I2C_NUM
int "I2C peripheral index"
default 1
range 0 1
help
ESP32S3 has two I2C peripherals, pick the one you want to use.

config BSP_I2C_FAST_MODE
bool "Enable I2C fast mode"
default n
help
I2C has two speed modes: normal (100kHz) and fast (400kHz).

config BSP_I2C_CLK_SPEED_HZ
int
default 400000 if BSP_I2C_FAST_MODE
default 100000
endmenu

menu "SPIFFS - Virtual File System"
config BSP_SPIFFS_FORMAT_ON_MOUNT_FAIL
bool "Format SPIFFS if mounting fails"
default n
help
Format SPIFFS if it fails to mount the filesystem.

config BSP_SPIFFS_MOUNT_POINT
string "SPIFFS mount point"
default "/spiffs"
help
Mount point of SPIFFS in the Virtual File System.

config BSP_SPIFFS_PARTITION_LABEL
string "Partition label of SPIFFS"
default "storage"
help
Partition label which stores SPIFFS.

config BSP_SPIFFS_MAX_FILES
int "Max files supported for SPIFFS VFS"
default 5
help
Supported max files for SPIFFS in the Virtual File System.
endmenu

menu "Display"
config BSP_DISPLAY_BRIGHTNESS_LEDC_CH
int "LEDC channel index"
default 1
range 0 7
help
LEDC channel is used to generate PWM signal that controls display brightness.
Set LEDC index that should be used.
endmenu

endmenu
Loading

0 comments on commit 6bcea47

Please sign in to comment.