SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
SY6970Power.hpp
Go to the documentation of this file.
1
56#pragma once
57
58#include "SY6970Core.hpp"
59#include "../../PmicPowerBase.hpp"
60#include "../../PmicWatchdogBase.hpp"
61
63{
64public:
69 explicit SY6970Power(SY6970Core &core);
70
71 ~SY6970Power() = default;
72
86 bool setMinimumSystemVoltage(uint32_t mv) override;
87
92 uint32_t getMinimumSystemVoltage() const override;
93
108 bool setInputVoltageLimit(uint32_t mv) override;
109
114 uint32_t getInputVoltageLimit() const override;
115
128 bool setInputCurrentLimit(uint32_t mA) override;
129
134 uint32_t getInputCurrentLimit() const override;
135
150 bool enableBoost(bool enable) override;
151
156 bool isBoostEnabled() const override;
157
171 bool setBoostVoltage(uint16_t mv) override;
172
177 uint16_t getBoostVoltage() const override;
178
199 bool enableShipMode(bool enable) override;
200
211 bool isShipModeEnabled() const override;
212
231 bool enableWatchdog(bool enable) override;
232
238 bool isWatchdogEnabled() const override;
239
254 bool setWatchdogTimeout(uint16_t timeout_s) override;
255
261 uint16_t getWatchdogTimeout() const override;
262
278 bool resetWatchdog() override;
279
280private:
281 SY6970Core &_core;
282};
@license MIT License
bool setBoostVoltage(uint16_t mv) override
Set boost output voltage.
bool setInputCurrentLimit(uint32_t mA) override
Set input current limit.
bool isBoostEnabled() const override
Check if boost mode is enabled.
bool resetWatchdog() override
Reset the watchdog timer (feed the watchdog)
uint32_t getInputVoltageLimit() const override
Get input voltage limit.
~SY6970Power()=default
uint32_t getInputCurrentLimit() const override
Get input current limit.
bool enableBoost(bool enable) override
Enable/disable OTG (boost) mode.
bool isWatchdogEnabled() const override
Check if watchdog is enabled.
bool setInputVoltageLimit(uint32_t mv) override
Set input voltage limit (VINDPM)
bool setMinimumSystemVoltage(uint32_t mv) override
Set minimum system voltage.
uint16_t getBoostVoltage() const override
Get boost output voltage.
uint32_t getMinimumSystemVoltage() const override
Get minimum system voltage.
bool setWatchdogTimeout(uint16_t timeout_s) override
Set the watchdog timeout duration.
uint16_t getWatchdogTimeout() const override
Get the current watchdog timeout setting.
bool enableShipMode(bool enable) override
Enable or disable ship mode.
bool enableWatchdog(bool enable) override
Enable or disable the I2C watchdog timer.
bool isShipModeEnabled() const override
Check if ship mode is enabled.