|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
Power-on / power-button timing control for the AXP2101 PMIC. More...
#include <AXP2101Pwron.hpp>
Public Member Functions | |
| AXP2101Pwron (AXP2101Core &core) | |
| ~AXP2101Pwron ()=default | |
| bool | setOnDurationMs (uint16_t ms) override |
| Set the power-on delay (held duration to turn on). | |
| bool | getOnDurationMs (uint16_t &ms) const override |
| Get the power-on delay setting. | |
| bool | setOffDurationMs (uint16_t ms) override |
| Set the power-off delay (held duration to turn off). | |
| bool | getOffDurationMs (uint16_t &ms) const override |
| Get the power-off delay setting. | |
| bool | setIrqDurationMs (uint16_t ms) override |
| Set the short-press / IRQ trigger delay. | |
| bool | getIrqDurationMs (uint16_t &ms) const override |
| Get the short-press / IRQ trigger delay. | |
Public Member Functions inherited from PmicButtonBase | |
| virtual | ~PmicButtonBase ()=default |
| Virtual destructor. | |
Power-on / power-button timing control for the AXP2101 PMIC.
Configures the PEKEY (power key) press durations for:
Definition at line 45 of file AXP2101Pwron.hpp.
|
explicit |
Definition at line 38 of file AXP2101Pwron.cpp.
|
default |
|
overridevirtual |
Get the short-press / IRQ trigger delay.
| [out] | ms | Duration in milliseconds. |
Implements PmicButtonBase.
Definition at line 94 of file AXP2101Pwron.cpp.
References axp2101_regs::pmu::IRQ_OFF_ON_LEVEL, and SensorCommWrapper::readReg().
|
overridevirtual |
Get the power-off delay setting.
| [out] | ms | Duration in milliseconds. |
Implements PmicButtonBase.
Definition at line 77 of file AXP2101Pwron.cpp.
References axp2101_regs::pmu::IRQ_OFF_ON_LEVEL, and SensorCommWrapper::readReg().
|
overridevirtual |
Get the power-on delay setting.
| [out] | ms | Duration in milliseconds. |
Implements PmicButtonBase.
Definition at line 60 of file AXP2101Pwron.cpp.
References axp2101_regs::pmu::IRQ_OFF_ON_LEVEL, and SensorCommWrapper::readReg().
|
overridevirtual |
Set the short-press / IRQ trigger delay.
| ms | Duration in milliseconds. Allowed value is 1000ms,1500ms,2000ms,2500ms |
Implements PmicButtonBase.
Definition at line 86 of file AXP2101Pwron.cpp.
|
overridevirtual |
Set the power-off delay (held duration to turn off).
| ms | Duration in milliseconds. Allowed value is 4000ms,6000ms,8000ms,10000ms |
Implements PmicButtonBase.
Definition at line 69 of file AXP2101Pwron.cpp.
|
overridevirtual |
Set the power-on delay (held duration to turn on).
| ms | Duration in milliseconds. Allowed value is 128ms,512ms,1000ms,2000ms |
Implements PmicButtonBase.
Definition at line 52 of file AXP2101Pwron.cpp.