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

How to set two interreupt for one pin

Hi,

I need to have two different interrupt handler for one pin? For LOTOHI one handler and for HITOLO another handler, how to do that?

Here is what i did until now, I have sent one signal (cls) to two different pin

#define CLS_1							0 // P0.0
#define CLS_2							1 // P0.1

nrf_drv_gpiote_in_config_t cls_1_config = GPIOTE_CONFIG_IN_SENSE_HITOLO(true);
cls_1_config.pull = NRF_GPIO_PIN_PULLUP;
nrf_drv_gpiote_in_init(CLS_1, &cls_1_config, cls_fall_handler);
nrf_drv_gpiote_in_event_enable(CLS_1, true);
    	
nrf_drv_gpiote_in_config_t cls_2_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(true);
cls_2_config.pull = NRF_GPIO_PIN_PULLUP;
nrf_drv_gpiote_in_init(CLS_2, &cls_2_config, cls_rise_handler);
nrf_drv_gpiote_in_event_enable(CLS_2, true);
Parents Reply Children
No Data
Related