Skip to content

M5Stack PaperS3 implementation #478

Merged
KenVanHoeylandt merged 6 commits intomainfrom
m5stack-papers3
Feb 3, 2026
Merged

M5Stack PaperS3 implementation #478
KenVanHoeylandt merged 6 commits intomainfrom
m5stack-papers3

Conversation

@KenVanHoeylandt
Copy link
Contributor

@KenVanHoeylandt KenVanHoeylandt commented Feb 3, 2026

Selectively imported code from @juicecultus fork
Full diff of code is here.

I'm very happy to have it building and running in the first attempt, so great job @juicecultus

Things not included:

  • ESP-IDF 6.x changes: this will be done later this year
  • Epub app: will be added later (juicecultus seems to be working on making it an external app)
  • Fix for Launcher app: icons aren't visible now. I'll try to fix this by adding black&white icon alternatives later.
  • Nullability changes: the annotations were recently removed. Regular code docs will be leading.
  • EPDIY library (unused)
  • Rewrites of various struct value assignments for various drivers. They are unsafe and shouldn't be used.

Summary by CodeRabbit

  • New Features

    • Added M5Stack Paper S3 support: device metadata, device tree, hardware configuration, and module entry
    • New E‑ink display driver with grayscale rendering, LVGL integration, and full‑refresh API
    • Touch input and SD card device support with factory-style device creation
  • Changes

    • Firmware SPI/RAM mode mapping adjusted (OPI→OCT)
    • Added FastEPD integration and component registrations
    • Board added to firmware build matrix
  • Chores

    • Removed legacy device-selection block from firmware config

@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

Adds support for the M5Stack Paper S3: a new Devices/m5stack-papers3 tree (CMake, device.properties, devicetree, module, hardware Configuration, and factory functions for touch, display, and SD card). Introduces a FastEpdDisplay driver (new class and implementation) with LVGL integration and an idf dependency on FastEPD. Exposes DisplayDevice::requestFullRefresh() virtual method. Removes the TT_DEVICE_ID choice block from Firmware/Kconfig. Adds m5stack-papers3 (esp32s3) to the CI build matrix and maps SPI RAM mode OPI to OCT in device.py.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.56% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'M5Stack PaperS3 implementation' directly summarizes the main change: introducing support for the M5Stack PaperS3 device across the codebase.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch m5stack-papers3

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
device.py (1)

151-152: Consider adding a brief comment explaining the OPI→OCT mapping.

The remapping is correct since ESP-IDF uses CONFIG_SPIRAM_MODE_OCT for octal PSRAM mode, but device configurations may use "OPI" (Octal Peripheral Interface) terminology. A short comment would help future maintainers understand why this alias exists.

📝 Suggested comment
     mode = get_property_or_exit(device_properties, "hardware", "spiRamMode")
+    # ESP-IDF uses "OCT" for octal mode; accept "OPI" (Octal Peripheral Interface) as alias
     if mode == "OPI":
         mode = "OCT"
Firmware/idf_component.yml (1)

57-59: Consider adding target rules for FastEPD dependency.

Other display-related dependencies in this file use target rules to restrict which platforms include them. Since FastEPD is only used by the Paper S3 device (ESP32-S3), adding a rule would avoid pulling this dependency for other targets and maintain consistency with similar dependencies like esp_lcd_ili9341 and esp_lcd_st7735.

Proposed fix
   FastEPD:
     git: https://github.com/bitbank2/FastEPD.git
     version: 1.4.2
+    rules:
+      - if: "target == esp32s3"

@KenVanHoeylandt KenVanHoeylandt merged commit 9cc96fd into main Feb 3, 2026
52 checks passed
@KenVanHoeylandt KenVanHoeylandt deleted the m5stack-papers3 branch February 3, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant