SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
AXP517Pwron.hpp
Go to the documentation of this file.
1
31#pragma once
32
33#include "AXP517Core.hpp"
34#include "../../PmicButtonBase.hpp"
35
42{
43public:
48 explicit AXP517Pwron(AXP517Core &core);
49
57 bool setOnDurationMs(uint16_t ms) override;
58
64 bool getOnDurationMs(uint16_t &ms) const override;
65
73 bool setOffDurationMs(uint16_t ms) override;
74
80 bool getOffDurationMs(uint16_t &ms) const override;
81
89 bool setIrqDurationMs(uint16_t ms) override;
90
96 bool getIrqDurationMs(uint16_t &ms) const override;
97
98private:
105 bool updateBits(uint8_t mask, uint8_t value);
106
107private:
108 AXP517Core &_core;
109};
@license MIT License
AXP517 low-level core driver.
AXP517 PWRON button configuration driver.
bool setOffDurationMs(uint16_t ms) override
Set the power-off debounce duration.
bool setOnDurationMs(uint16_t ms) override
Set the power-on debounce duration.
bool getOnDurationMs(uint16_t &ms) const override
Get the current power-on debounce duration.
bool getIrqDurationMs(uint16_t &ms) const override
Get the current button IRQ trigger duration.
bool getOffDurationMs(uint16_t &ms) const override
Get the current power-off debounce duration.
bool setIrqDurationMs(uint16_t ms) override
Set the button IRQ trigger duration.