mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-08-17 23:55:04 +00:00
- Implement generic trackball settings - Refactor T-Deck trackball driver into generic driver at `Drivers/gpio-trackball-module` - Automatically bind/unbind trackball devices with LVGL - Automatically load settings for trackball devices on boot
33 lines
537 B
C++
33 lines
537 B
C++
#include <tactility/error.h>
|
|
#include <tactility/log.h>
|
|
#include <tactility/module.h>
|
|
|
|
#include <lilygo/drivers/tdeck_power_on.h>
|
|
|
|
constexpr auto* TAG = "tdeck-plus";
|
|
|
|
extern "C" {
|
|
|
|
static error_t start() {
|
|
LOG_I(TAG, "Power on start");
|
|
|
|
if (!tdeck_power_on()) {
|
|
LOG_E(TAG, "Power on failed");
|
|
return ERROR_RESOURCE;
|
|
}
|
|
|
|
return ERROR_NONE;
|
|
}
|
|
|
|
static error_t stop() {
|
|
return ERROR_NONE;
|
|
}
|
|
|
|
Module lilygo_tdeck_plus_module = {
|
|
.name = "lilygo-tdeck-plus",
|
|
.start = start,
|
|
.stop = stop,
|
|
};
|
|
|
|
}
|