This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

GPIO IN_EVENT to GPIO PORT Event

Hello, I'm new to Nordic SDK and I would like to ask you for help with change of GPIO IN_EVENT to GPIO PORT event implementation. The reason is we are using revision < 3 and I need to decrease power consumption.

Current implementation is like following:

void init_gpio_button()
{
    nrf_gpio_cfg_input(GPIO_BUTTON, NRF_GPIO_PIN_PULLUP);

	uint32_t err_code = nrf_drv_gpiote_init();
	APP_ERROR_CHECK(err_code);
  
    nrf_drv_gpiote_in_config_t btn = GPIOTE_CONFIG_IN_SENSE_HITOLO(true);
	btn.pull = NRF_GPIO_PIN_PULLUP;

	nrf_drv_gpiote_in_uninit(GPIO_BUTTON);
	err_code = nrf_drv_gpiote_in_init(GPIO_BUTTON, &btn, btn_handler_isr);
	APP_ERROR_CHECK(err_code);

	nrf_drv_gpiote_in_event_enable(GPIO_BUTTON, true);
}

Is it enough to just set GPIOTE_CONFIG_IN_SENSE_HITOLO.hi_accuracy = false?

Thank you very much for your help.

Related