Ken Van Hoeylandt f620255c41
New logging and more (#446)
- `TT_LOG_*` macros are replaced by `Logger` via `#include<Tactility/Logger.h>`
- Changed default timezone to Europe/Amsterdam
- Fix for logic bug in unPhone hardware
- Fix for init/deinit in DRV2605 driver
- Other fixes
- Removed optimization that broke unPhone (disabled the moving of heap-related functions to flash)
2026-01-06 22:35:39 +01:00

31 lines
818 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;
bool initEncoder();
bool deinitEncoder();
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; }
};