mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
- Create real drivers instead of wrapping M5Unified/M5GFX - Display HAL improvements (better default base class behaviour) - Fixed bug with LVGL statusbar service locking (would hang indefinitely waiting for mutex, causing WDT issues) - Fixes for `Critical.h` - Fixes and improvements for `Dispatcher` and `DispatcherThread`
28 lines
579 B
C++
28 lines
579 B
C++
#pragma once
|
|
|
|
#include "hal/Power.h"
|
|
#include <memory>
|
|
|
|
using namespace tt::hal;
|
|
|
|
class Core2Power : public Power {
|
|
|
|
private:
|
|
|
|
bool allowedToCharge = true;
|
|
|
|
public:
|
|
|
|
Core2Power() = default;
|
|
~Core2Power() override = default;
|
|
|
|
bool supportsMetric(MetricType type) const override;
|
|
bool getMetric(Power::MetricType type, Power::MetricData& data) override;
|
|
|
|
bool supportsChargeControl() const override { return true; }
|
|
bool isAllowedToCharge() const override;
|
|
void setAllowedToCharge(bool canCharge) override;
|
|
};
|
|
|
|
std::shared_ptr<Power> createPower();
|