mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
sensecap solar: stabilize wake pin and add button hold poweroff
This commit is contained in:
parent
e323755990
commit
e08dcbdd03
2 changed files with 24 additions and 2 deletions
|
|
@ -43,10 +43,12 @@ public:
|
|||
|
||||
#ifdef PIN_USER_BTN
|
||||
while (digitalRead(PIN_USER_BTN) == LOW);
|
||||
nrf_gpio_cfg_sense_input(digitalPinToInterrupt(g_ADigitalPinMap[PIN_USER_BTN]), NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_LOW);
|
||||
// Keep pull-up enabled in system-off so the wake line doesn't float low.
|
||||
nrf_gpio_cfg_sense_input(digitalPinToInterrupt(g_ADigitalPinMap[PIN_USER_BTN]), NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);
|
||||
#elif defined(PIN_BUTTON1)
|
||||
while (digitalRead(PIN_BUTTON1) == LOW);
|
||||
nrf_gpio_cfg_sense_input(digitalPinToInterrupt(g_ADigitalPinMap[PIN_BUTTON1]), NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_LOW);
|
||||
// Keep pull-up enabled in system-off so the wake line doesn't float low.
|
||||
nrf_gpio_cfg_sense_input(digitalPinToInterrupt(g_ADigitalPinMap[PIN_BUTTON1]), NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);
|
||||
#endif
|
||||
|
||||
#ifdef NRF52_POWER_MANAGEMENT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue