33#include "../../../platform/comm/I2CDeviceWithHal.hpp"
97 return hal ?
hal->millis() : 0;
119 hal->pinMode(pin, mode);
130 return hal ?
hal->digitalRead(pin) : 1;
139 bool initImpl(uint8_t param)
override;
AXP517 low-level core driver.
uint8_t digitalRead(uint8_t pin)
Read a platform GPIO pin through the active HAL.
uint32_t millis()
Return the current platform millisecond counter.
void pinMode(uint8_t pin, uint8_t mode)
Configure a platform GPIO pin through the active HAL.
AXP517Core()=default
Construct an uninitialized AXP517 core object.
bool isModuleEnabled(Module module)
Check if a module is enabled.
void delayMs(uint32_t ms)
Delay using the active platform HAL.
bool enableModule(Module module, bool enable)
Enable or disable a module.
Module
Functional module switches exposed by AXP517.
@ CHARGE
REG 19H bit 1 Charger.
@ BC12
Module enable control 0 (REG 0BH).
@ BUCK
REG 19H bit 3 Buck converter.
@ GAUGE
REG 0BH bit 2 Fuel gauge.
@ CHGLED
REG 19H bit 2 Charge LED.
@ TYPEC
REG 0BH bit 3 Type-C.
@ BOOST
REG 19H bit 4 Boost converter.
@ MPPT
REG 22H bit 0 MPPT configure.
@ WATCHDOG
REG 0BH bit 0 Watchdog CLK and REG 19H bit 0 Watchdog Module enable.
@ GAUGE_LOW_POWER
Module enable control 1 (REG 19H).
std::unique_ptr< SensorHal > hal