Ken Van Hoeylandt c87200a80d
Project restructuring (fixes macOS builds) (#198)
- Create `Include/` folder for all main projects
- Fix some issues here and there (found while moving things)
- All includes are now in `Tactility/` subfolder and must be included with that prefix. This fixes issues with clashing POSIX headers (e.g. `<semaphore.h>` versus Tactility's `Semaphore.h`)
2025-02-01 18:13:20 +01:00

28 lines
623 B
C++

#pragma once
#include "Axp2101/Axp2101.h"
#include <Tactility/hal/Power.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();