Skip to content

Add CYD-2432S024R Support#521

Merged
KenVanHoeylandt merged 14 commits intoTactilityProject:mainfrom
NellowTCS:cyd-2.4
Apr 13, 2026
Merged

Add CYD-2432S024R Support#521
KenVanHoeylandt merged 14 commits intoTactilityProject:mainfrom
NellowTCS:cyd-2.4

Conversation

@NellowTCS
Copy link
Copy Markdown
Contributor

@NellowTCS NellowTCS commented Apr 10, 2026

This PR depends on #520 as the screen is the correct orientation just currently not calibrated.
Will update when that is merged!

Summary by CodeRabbit

  • New Features
    • Added support for the CYD 2432S024R device with integrated 2.4" display, touch, and SD card functionality.
    • CI now builds firmware for the CYD 2432S024R board so official builds are produced for this target.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 50429a25-bf97-4e0f-91e9-6807c329e624

📥 Commits

Reviewing files that changed from the base of the PR and between e14c292 and a8917d1.

📒 Files selected for processing (1)
  • Devices/cyd-2432s024r/Source/devices/Display.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • Devices/cyd-2432s024r/Source/devices/Display.cpp

📝 Walkthrough

Walkthrough

Adds support for a new device target "cyd-2432s024r". Changes include a CI matrix entry for the board, a CMake component under Devices/cyd-2432s024r, device-specific sources (hardware Configuration with exported hardwareConfiguration, module entry, display and SD card factories and headers), a device tree source (cyd,2432s024r.dts), device.properties, and devicetree.yaml. The display uses ILI934x with XPT2046 touch; SD card uses an SPI SD driver.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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 'Add CYD-2432S024R Support' directly and clearly describes the main change in the PR—adding support for a specific display device model.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown
Contributor

@KenVanHoeylandt KenVanHoeylandt left a comment

Choose a reason for hiding this comment

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

Looks good! I only have 2 small remarks.

Comment thread .github/workflows/build.yml Outdated
Comment thread Devices/cyd-2432s024r/Source/Configuration.cpp Outdated
@NellowTCS NellowTCS marked this pull request as ready for review April 13, 2026 15:37
Copy link
Copy Markdown

@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: 2

🧹 Nitpick comments (2)
Devices/cyd-2432s024r/Source/devices/SdCard.h (1)

3-7: Avoid exporting using declarations from headers.

Line 5 introduces namespace leakage to every includer. Prefer a fully-qualified return type in the declaration.

Proposed refactor
 `#pragma` once
 
 `#include` "Tactility/hal/sdcard/SdCardDevice.h"
+#include <memory>
 
-using tt::hal::sdcard::SdCardDevice;
-
-std::shared_ptr<SdCardDevice> createSdCard();
+std::shared_ptr<tt::hal::sdcard::SdCardDevice> createSdCard();
Devices/cyd-2432s024r/CMakeLists.txt (1)

1-5: Prefer SRC_DIRS over recursive source globbing here.

Line 1’s glob adds avoidable fragility and diverges from existing component CMake patterns in this repo.

Proposed refactor
-file(GLOB_RECURSE SOURCE_FILES Source/*.c*)
-
 idf_component_register(
-    SRCS ${SOURCE_FILES}
+    SRC_DIRS "Source"
     INCLUDE_DIRS "Source"
     REQUIRES Tactility esp_lvgl_port ILI934x XPT2046 PwmBacklight driver vfs fatfs
 )

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 084a76c0-bf93-41a4-b4c0-2286fef92683

📥 Commits

Reviewing files that changed from the base of the PR and between e64f4ff and 2bcedeb.

📒 Files selected for processing (11)
  • .github/workflows/build.yml
  • Devices/cyd-2432s024r/CMakeLists.txt
  • Devices/cyd-2432s024r/Source/Configuration.cpp
  • Devices/cyd-2432s024r/Source/devices/Display.cpp
  • Devices/cyd-2432s024r/Source/devices/Display.h
  • Devices/cyd-2432s024r/Source/devices/SdCard.cpp
  • Devices/cyd-2432s024r/Source/devices/SdCard.h
  • Devices/cyd-2432s024r/Source/module.cpp
  • Devices/cyd-2432s024r/cyd,2432s024r.dts
  • Devices/cyd-2432s024r/device.properties
  • Devices/cyd-2432s024r/devicetree.yaml

Comment thread Devices/cyd-2432s024r/Source/devices/Display.cpp
Comment thread Devices/cyd-2432s024r/Source/devices/Display.cpp
@NellowTCS NellowTCS marked this pull request as draft April 13, 2026 15:51
@NellowTCS NellowTCS marked this pull request as ready for review April 13, 2026 15:52
Copy link
Copy Markdown

@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.

♻️ Duplicate comments (1)
Devices/cyd-2432s024r/Source/devices/Display.cpp (1)

39-39: ⚠️ Potential issue | 🔴 Critical

Pass a real SPI bus handle to createTouch, not a host-device enum.

Line 39 passes spi_configuration->spiHostDevice into createTouch(esp_lcd_spi_bus_handle_t). If spiHostDevice is spi_host_device_t, this is a hard type/API mismatch and can break touch SPI initialization.

Use this read-only check to confirm the type definitions and call-site compatibility:

#!/bin/bash
set -euo pipefail

echo "== Xpt2046Touch configuration signature =="
rg -n -C3 'class Configuration|esp_lcd_spi_bus_handle_t|Configuration\(' --iglob '*Xpt2046Touch.h'

echo
echo "== Ili934x/EspLcd SPI configuration field types =="
rg -n -C4 'struct SpiConfiguration|spiHostDevice|esp_lcd_spi_bus_handle_t|spi_host_device_t' --iglob '*Ili934xDisplay.h' --iglob '*EspLcdSpiDisplay*.h'

echo
echo "== Local call site =="
rg -n -C3 'createTouch\s*\(|spi_configuration->spiHostDevice' Devices/cyd-2432s024r/Source/devices/Display.cpp

Expected result: the argument type passed at Line 39 should match esp_lcd_spi_bus_handle_t exactly.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f5191148-7e48-4573-a244-8afb6746d04c

📥 Commits

Reviewing files that changed from the base of the PR and between 2bcedeb and e14c292.

📒 Files selected for processing (1)
  • Devices/cyd-2432s024r/Source/devices/Display.cpp

@KenVanHoeylandt
Copy link
Copy Markdown
Contributor

Looks good, thanks!
I'm not 100% sure yet about the setup of the calibration app. I'm still figuring out my feedback for it.

@KenVanHoeylandt
Copy link
Copy Markdown
Contributor

I think the touch calibration is as good as it will get with the current (old) driver system. Thanks!

@KenVanHoeylandt KenVanHoeylandt merged commit be2cdc0 into TactilityProject:main Apr 13, 2026
55 checks passed
@NellowTCS NellowTCS deleted the cyd-2.4 branch April 13, 2026 19:45
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.

2 participants