uint32_t bsp_wakeup_button_disable(uint32_t button_idx) { #if (BUTTONS_NUMBER > 0) && !defined(BSP_SIMPLE) nrf_gpio_cfg_sense_set(bsp_board_button_idx_to_pin(button_idx), NRF_GPIO_PIN_NOSENSE); return NRF_SUCCESS; #else UNUSED_PARAMETER(button_idx); return NRF_ERROR_NOT_SUPPORTED; #endif }
static uint32_t wakeup_button_cfg(uint32_t button_idx, bool enable) { #if !defined(BSP_SIMPLE) if (button_idx < BUTTONS_NUMBER) { nrf_gpio_pin_sense_t sense = enable ? (BUTTONS_ACTIVE_STATE ? NRF_GPIO_PIN_SENSE_HIGH : NRF_GPIO_PIN_SENSE_LOW) : NRF_GPIO_PIN_NOSENSE; nrf_gpio_cfg_sense_set(bsp_board_button_idx_to_pin(button_idx), sense); return NRF_SUCCESS; } #else UNUSED_PARAMETER(button_idx); UNUSED_PARAMETER(enable); #endif return NRF_ERROR_NOT_SUPPORTED; }