Shadowtrance a4dc633063
Feature additions (#434)
Lots of things "ported" over from the "enhanced" fork. With some adjustments here and there.

KeyboardBacklight driver (for T-Deck only currently)
Trackball driver (for T-Deck only currently)
Keyboard backlight sleep/wake (for T-Deck only currently...also requires keyboard firmware update)
Display sleep/wake
Files - create file/folder
Keyboard settings (for T-Deck only currently)
Time & Date settings tweaks
Locale settings tweaks
Systeminfo additions
Espnow wifi coexist

initI2cDevices - moved to T-deck init.cpp / initBoot
KeyboardInitService - removed,  moved to T-deck init.cpp / initBoot
Adjusted TIMER_UPDATE_INTERVAL to 2 seconds.
Added lock to ActionCreateFolder

Maybe missed some things in the list.

Display wake could do with some kind of block on wake first touch to prevent UI elements being hit when waking device with touch. Same with encoder/trackball/keyboard press i guess.

The original code was written by @cscott0108 at https://github.com/cscott0108/tactility-enhanced-t-deck
2026-01-02 12:14:55 +01:00

33 lines
803 B
C++

#pragma once
#include <Tactility/hal/Device.h>
#include <Tactility/TactilityCore.h>
class KeyboardBacklightDevice final : public tt::hal::Device {
bool initialized = false;
public:
tt::hal::Device::Type getType() const override { return tt::hal::Device::Type::I2c; }
std::string getName() const override { return "Keyboard Backlight"; }
std::string getDescription() const override { return "T-Deck keyboard backlight control"; }
bool start();
bool stop();
bool isAttached() const { return initialized; }
/**
* Set keyboard backlight brightness
* @param brightness 0-255 (0=off, 255=max)
*/
bool setBrightness(uint8_t brightness);
/**
* Get current brightness
* @return 0-255
*/
uint8_t getBrightness() const;
};