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

GPIO Pin Status

Hi,

It's a very simple question, is there a simple way to check GPIO pin status. I just want to know at a given time if the Pin is High/Low. I don't think I need an ISR for doing this.

I am doing as followings,

nrf_drv_gpiote_in_config_t in_config1 = GPIOTE_CONFIG_IN_SENSE_TOGGLE(true);
in_config1.pull = NRF_GPIO_PIN_PULLUP;

err_code = nrf_drv_gpiote_in_init(PIN_IN_INT, &in_config1, Current_Measure);
APP_ERROR_CHECK(err_code);

nrf_drv_gpiote_in_event_enable(PIN_IN_INT, true);

Regards Siva

Parents Reply Children
Related