mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
- Updated all boards to use `hal::Configuration.createDevices` - Updated all boards to use new directory structure and file naming convention - Refactored `Xpt2046SoftSpi` driver. - Created `Axp2101Power` device in `Drivers/AXP2101` - Removed global static instances from some drivers (instances that kept a reference to the Device*) - Improved `SystemInfoApp` UI: better memory labels, hide external memory bar when there's no PSRAM - Fix for HAL: register touch devices after displays are registered - Fix for Boot splash hanging on WiFi init: unlock file lock after using it
30 lines
792 B
C++
30 lines
792 B
C++
#pragma once
|
|
|
|
#include <Tactility/hal/encoder/EncoderDevice.h>
|
|
#include <driver/pulse_cnt.h>
|
|
|
|
class TpagerEncoder final : public tt::hal::encoder::EncoderDevice {
|
|
|
|
lv_indev_t* _Nullable encHandle = nullptr;
|
|
pcnt_unit_handle_t encPcntUnit = nullptr;
|
|
|
|
void initEncoder();
|
|
|
|
static void readCallback(lv_indev_t* indev, lv_indev_data_t* data);
|
|
|
|
public:
|
|
|
|
TpagerEncoder() {}
|
|
~TpagerEncoder() override {}
|
|
|
|
std::string getName() const override { return "T-Lora Pager Encoder"; }
|
|
std::string getDescription() const override { return "The encoder wheel next to the display"; }
|
|
|
|
bool startLvgl(lv_display_t* display) override;
|
|
bool stopLvgl() override;
|
|
|
|
int getEncoderPulses() const;
|
|
|
|
lv_indev_t* _Nullable getLvglIndev() override { return encHandle; }
|
|
};
|