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

PORT Event vs nrf_drv_gpiote_in_init()

nrf_drv_gpiote_in_config_t in_config_lotohi = GPIOTE_CONFIG_IN_SENSE_LOTOHI(false);
if(!nrf_drv_gpiote_is_init())
{
    err_code = nrf_drv_gpiote_init();
    APP_ERROR_CHECK(err_code);
}
err_code = nrf_drv_gpiote_in_init(GPIO_AC_INTP1_PIN, &in_config_lotohi, key_event_handler);
  1. my code is just like above
  2. I know the difference between IN EVENT and PORT event
  3. If I use nrf_drv_gpiote_init() with GPIOTE_CONFIG_IN_SENSE_LOTOHI(false), that means I use Port Event? or same current consumption as Port Event? or it use IN EVENT?
Parents Reply
  • Can I have more questions?

    1. So I can use nrf_drv_gpiote_in_init() for every 31 GPIO pins? or there is limitations for pin numbers. (ex, 8 pin)
    2. if I don't use IN_EVENT, still I need to init GPIOTE with nrf_drv_gpiote_init()?
    3. Can I register (with nrf_drv_gpiote_in_init()) and use all different event handler functions for each GPIO pin? ex) pin 1 Port Event -> key1_event_handler function pin 2 Port Event -> key2_event_handler function
Children
No Data
Related