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

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

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

Postby kolban » Wed Jan 18, 2017 4:36 am

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?
Last edited by kolban on Wed Jan 18, 2017 2:37 pm, edited 1 time in total.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Distinction between gpio_isr_register() and gpio_isr_handler_add()

Postby WiFive » Wed Jan 18, 2017 4:55 am

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.

Who is online

Users browsing this forum: No registered users and 255 guests