Open daniel-dona opened 6 months ago
Approved 👍
@daniel-dona I don't want to jump in the middle of your work but do have these changes made and tested in my fork; I needed them for an ESPHome LibreTiny PR for deep_sleep. Judging by your comments maybe you are also working on something similar with deep sleep or another purpose?
Well, I'm in the same situation as @cap9qd, I need deep sleep and I started implementing it, eventually, we could collaborate on this.
@0x3333 #254 #253
Currently waking from deep sleep is defined as
REBOOT_REASON_SLEEP
but in BK7231 there are at least two possible "sub-types": GPIO and RTC.Can we have separate reboot reasons for these cases?
Maybe
REBOOT_REASON_SLEEP_GPIO
andREBOOT_REASON_SLEEP_RTC
.There are a lot of cases were makes sense to check the reason, for example I'm working with some battery powered sensors that use both RTC (for updating battery state every ~24h) and GPIO (sensor triggered).
I can prepare a PR if this sounds good...