Describe the bug
There's no way to use the power button as a soft power down option.
The AXP192 does detect short presses of the power button, and stores it in register 0X46.
This could be solved by the addition of the following function.
bool AXP192::GetPowerPressed()
{
if (Read8bit(0x46) | 0x02)
return true;
else
return false;
}
To reproduce
In environments, this cannot be done.
Expected behavior
I would expect something like this behavior
if(AXP192::GetPowerPressed())
{
//Do power down routine
AXP192::PowerOff();
}
or
if(AXP192::GetPowerPressed())
{
//Do power down routine
AXP192::LightSleep(SLEEP_SEC(5));
}
Screenshots
No response
Environment
- OS:
- IDE &IDE Version:
- Repository Version:
Additional context
No response
Issue checklist
Describe the bug
There's no way to use the power button as a soft power down option.
The AXP192 does detect short presses of the power button, and stores it in register 0X46.
This could be solved by the addition of the following function.
bool AXP192::GetPowerPressed()
{
if (Read8bit(0x46) | 0x02)
return true;
else
return false;
}
To reproduce
In environments, this cannot be done.
Expected behavior
I would expect something like this behavior
if(AXP192::GetPowerPressed())
{
//Do power down routine
AXP192::PowerOff();
}
or
if(AXP192::GetPowerPressed())
{
//Do power down routine
AXP192::LightSleep(SLEEP_SEC(5));
}
Screenshots
No response
Environment
Additional context
No response
Issue checklist