mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
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
45 lines
1.0 KiB
C++
45 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include <driver/gpio.h>
|
|
#include <lvgl.h>
|
|
|
|
namespace trackball {
|
|
|
|
/**
|
|
* @brief Trackball configuration structure
|
|
*/
|
|
struct TrackballConfig {
|
|
gpio_num_t pinRight; // Right direction GPIO
|
|
gpio_num_t pinUp; // Up direction GPIO
|
|
gpio_num_t pinLeft; // Left direction GPIO
|
|
gpio_num_t pinDown; // Down direction GPIO
|
|
gpio_num_t pinClick; // Click/select button GPIO
|
|
uint8_t movementStep; // Pixels to move per trackball event (default: 10)
|
|
};
|
|
|
|
/**
|
|
* @brief Initialize trackball as LVGL input device
|
|
* @param config Trackball GPIO configuration
|
|
* @return LVGL input device pointer, or nullptr on failure
|
|
*/
|
|
lv_indev_t* init(const TrackballConfig& config);
|
|
|
|
/**
|
|
* @brief Deinitialize trackball
|
|
*/
|
|
void deinit();
|
|
|
|
/**
|
|
* @brief Set movement step size
|
|
* @param step Encoder steps per trackball event
|
|
*/
|
|
void setMovementStep(uint8_t step);
|
|
|
|
/**
|
|
* @brief Enable or disable trackball input processing
|
|
* @param enabled Boolean value to enable or disable
|
|
*/
|
|
void setEnabled(bool enabled);
|
|
|
|
}
|