T-Deck Max & Pro support updates (#582)
- Created kernel driver for T-Deck Max & Pro display (needs work, doesn't refresh reliably on T-Deck Pro) - Created T-Deck Pro device implementation (incubating)
This commit is contained in:
committed by
GitHub
parent
429125734a
commit
29e80cfd65
@@ -1,35 +0,0 @@
|
||||
#include "devices/Display.h"
|
||||
|
||||
#include <Tactility/hal/Configuration.h>
|
||||
#include <tactility/check.h>
|
||||
#include <tactility/device.h>
|
||||
#include <tactility/drivers/esp32_spi.h>
|
||||
|
||||
using namespace tt::hal;
|
||||
|
||||
static bool initBoot() {
|
||||
// The LoRa and SD chip-selects share the EPD's SPI bus but aren't wired up
|
||||
// yet. spi0's start() already drives every cs-gpio high during kernel init;
|
||||
// re-assert deselection before the EPD driver first transacts, as a cheap
|
||||
// guard against either chip latching stray EPD command bytes (same pattern
|
||||
// as the esp32_sdspi mount path).
|
||||
auto* spi0 = device_find_by_name("spi0");
|
||||
check(spi0 != nullptr);
|
||||
esp32_spi_deselect_all_cs(spi0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static DeviceVector createDevices() {
|
||||
// Touch, keyboard and battery/charging are kernel drivers (cst66xx, tca8418, sy6970,
|
||||
// bq27220 - see the .dts), started independently of this HAL layer. Only the EPD
|
||||
// display remains on the deprecated HAL.
|
||||
return DeviceVector {
|
||||
createDisplay()
|
||||
};
|
||||
}
|
||||
|
||||
extern const Configuration hardwareConfiguration = {
|
||||
.initBoot = initBoot,
|
||||
.createDevices = createDevices
|
||||
};
|
||||
@@ -1,29 +0,0 @@
|
||||
#include "Display.h"
|
||||
|
||||
#include <Gdeq031t10Display.h>
|
||||
|
||||
// Pins from Xinyuan-LilyGO/T-Deck-MAX's lib/TDeckMaxBoard/src/TDeckMaxBoard.h and docs/pinmap.md.
|
||||
constexpr auto EPD_SPI_HOST = SPI2_HOST;
|
||||
constexpr auto EPD_PIN_CS = GPIO_NUM_34;
|
||||
constexpr auto EPD_PIN_DC = GPIO_NUM_35;
|
||||
constexpr auto EPD_PIN_RST = GPIO_NUM_9;
|
||||
constexpr auto EPD_PIN_BUSY = GPIO_NUM_37;
|
||||
|
||||
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() {
|
||||
// Touch is a kernel driver (hynitron,cst66xx - see the .dts), discovered and fed to LVGL
|
||||
// independently of this display, so no touch device is passed into the configuration here.
|
||||
auto configuration = std::make_unique<Gdeq031t10Display::Configuration>(
|
||||
EPD_SPI_HOST,
|
||||
EPD_PIN_CS,
|
||||
EPD_PIN_DC,
|
||||
EPD_PIN_RST,
|
||||
EPD_PIN_BUSY,
|
||||
nullptr,
|
||||
10'000'000,
|
||||
// Default to a fast (~1s) refresh for the automatic ghost-clears so the
|
||||
// full-screen flash they cause is as short as possible.
|
||||
Gdeq031t10Display::RefreshMode::Fast
|
||||
);
|
||||
|
||||
return std::make_shared<Gdeq031t10Display>(std::move(configuration));
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <Tactility/hal/display/DisplayDevice.h>
|
||||
|
||||
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay();
|
||||
Reference in New Issue
Block a user