Implement M5Stack Cardputer + minor Tactility improvements (#331)

- Implement M5Stack Cardputer: display, SD card and keyboard
- `St7789Display` now supports a "gap" configuration
- `ElfApp` has improved errors
This commit is contained in:
Ken Van Hoeylandt
2025-09-14 02:25:10 +02:00
committed by GitHub
parent d83b98e99b
commit 62c613477a
28 changed files with 1385 additions and 5 deletions
@@ -0,0 +1,28 @@
#include "Display.h"
#include <PwmBacklight.h>
#include <St7789Display.h>
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() {
auto configuration = std::make_unique<St7789Display::Configuration>(
LCD_SPI_HOST,
LCD_PIN_CS,
LCD_PIN_DC,
LCD_HORIZONTAL_RESOLUTION,
LCD_VERTICAL_RESOLUTION,
nullptr,
true,
true,
false,
true,
0,
53, // Should be 52 according to https://github.com/m5stack/M5GFX/blob/master/src/M5GFX.cpp but this leaves a gap at the bottom
40
);
configuration->resetPin = LCD_PIN_RESET;
configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty;
auto display = std::make_shared<St7789Display>(std::move(configuration));
return std::reinterpret_pointer_cast<tt::hal::display::DisplayDevice>(display);
}