Ken Van Hoeylandt 61277e74b8
Align board project names with board ids (#399)
To avoid keeping track of a list that maps board project names to board ids.
Because of this change, we don't have to manually edit `boards.cmake` anymore when adding a new board.
2025-10-28 09:07:54 +01:00

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; }
};