pico-sdk icon indicating copy to clipboard operation
pico-sdk copied to clipboard

Add adc_irq_set_enabled_with_callback or similar

Open jonathangjertsen opened this issue 3 years ago • 1 comments

The ADC module could use a function to set up an interrupt handler for the ADC FIFO interrupt, in a similar fashion to what the GPIO module does. Also: there is a function adc_irq_set_enabled, but it only sets the interrupt enable flag in the ADC module. Should it call irq_set_enabled as well?

jonathangjertsen avatar May 27 '21 09:05 jonathangjertsen

[...] Also: there is a function adc_irq_set_enabled, but it only sets the interrupt enable flag in the ADC module. Should it call irq_set_enabled as well?

I would say no, it shouldn't. ADC and IRQ are two separate things. And enabling the IRQ for a given core should be up to you.

bruelltuete avatar Apr 12 '22 14:04 bruelltuete