Unphone battery status (#176)

This commit is contained in:
Ken Van Hoeylandt
2025-01-21 19:53:00 +01:00
committed by GitHub
parent c3bcf93698
commit 97b8007aca
6 changed files with 149 additions and 3 deletions
+11
View File
@@ -6,13 +6,24 @@
#include "esp_lcd_touch.h"
class UnPhoneTouch : public tt::hal::Touch {
private:
static UnPhoneTouch* instance;
esp_lcd_panel_io_handle_t _Nullable ioHandle = nullptr;
esp_lcd_touch_handle_t _Nullable touchHandle = nullptr;
lv_indev_t* _Nullable deviceHandle = nullptr;
void cleanup();
public:
bool start(lv_display_t* display) override;
bool stop() override;
lv_indev_t* _Nullable getLvglIndev() override { return deviceHandle; }
bool getVBat(float& outputVbat);
/** Used for accessing getVBat() in Power driver */
static UnPhoneTouch* getInstance() { return instance; }
};