Page 1 of 1

[Answered] Distinction between gpio_isr_register() and gpio_isr_handler_add()

Posted: Wed Jan 18, 2017 4:36 am
by kolban
While studying the GPIO interrupt handlers I seem to see two distinct techniques ... one based around an API called gpio_isr_register() and one based around gpio_isr_handler_add(). Unfortunately I'm not sensing the obvious distinct between them. How do they differ? When would I want to use one vs the others? What questions am I failing to ask that would help someone understand the architecture at play here?

Re: Distinction between gpio_isr_register() and gpio_isr_handler_add()

Posted: Wed Jan 18, 2017 4:55 am
by WiFive
gpio_isr_handler_add is to be used with gpio_install_isr_service to add separate handlers tied to specific gpio pins.

gpio_isr_register is to add a handler for all gpio interrupts if you want to implement your own pin checking.