Pro-Micro button SENSE signal

Added SENSE signal on the user button.
It is explicitly enabled now for this platform.
This commit is contained in:
MagnusKos 2025-07-21 18:50:10 +03:00
parent bdbc0afa2f
commit ff26459d56

View File

@ -380,6 +380,12 @@ void cpuDeepSleep(uint32_t msecToWake)
nrf_gpio_cfg_sense_set(PIN_BUTTON2, sense1);
#endif
#ifdef PROMICRO_DIY_TCXO
nrf_gpio_cfg_input(BUTTON_PIN, NRF_GPIO_PIN_PULLUP); // Enable internal pull-up on the button pin
nrf_gpio_pin_sense_t sense = NRF_GPIO_PIN_SENSE_LOW; // Configure SENSE signal on low edge
nrf_gpio_cfg_sense_set(BUTTON_PIN, sense); // Apply SENSE to wake up the device from the deep sleep
#endif
auto ok = sd_power_system_off();
if (ok != NRF_SUCCESS) {
LOG_ERROR("FIXME: Ignoring soft device (EasyDMA pending?) and forcing system-off!");