Move more code out of main-nrf52 into variant.cpp (#9450)

This commit is contained in:
Jonathan Bennett
2026-01-27 13:56:32 -06:00
committed by GitHub
parent b6a1020fc5
commit 10b2eae70c
3 changed files with 14 additions and 16 deletions

View File

@@ -59,4 +59,11 @@ void variant_shutdown()
NRF_GPIO->DIRCLR = (1 << pin);
}
}
nrf_gpio_cfg_input(PIN_BUTTON1, NRF_GPIO_PIN_PULLUP); // Configure the pin to be woken up as an input
nrf_gpio_pin_sense_t sense = NRF_GPIO_PIN_SENSE_LOW;
nrf_gpio_cfg_sense_set(PIN_BUTTON1, sense);
nrf_gpio_cfg_input(PIN_BUTTON2, NRF_GPIO_PIN_PULLUP);
nrf_gpio_pin_sense_t sense1 = NRF_GPIO_PIN_SENSE_LOW;
nrf_gpio_cfg_sense_set(PIN_BUTTON2, sense1);
}