Ken Van Hoeylandt 737c0f7447
CoreS3 refactored & remove M5 libraries (#143)
Remove dependencies M5Unified and M5GFX because:
- Sometimes the release doesn't even compile
- The amount of functions is too close to the limit (I recently had to remove some code/dependency to be able to make a build at all)
- Graphics performance issue since last update
- Touch screen performance issues (not perfect yet, but better)
- Compatibility issues with Tactility SPI/I2C versus M5Unified/M5GFX variants.
2025-01-02 00:19:24 +01:00

27 lines
612 B
C++

#pragma once
#include "hal/Power.h"
#include "Axp2101/Axp2101.h"
#include <memory>
using namespace tt::hal;
class CoreS3Power : public Power {
Axp2101 axpDevice = Axp2101(I2C_NUM_0);
public:
CoreS3Power() = default;
~CoreS3Power() 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();