raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.27k stars 848 forks source link

Documentation of interrupt handlers and callback functions #939

Open fjansson opened 1 year ago

fjansson commented 1 year ago

I've read the Raspberry Pi Pico C/C++ SDK manual, regarding interrupt handlers and callback functions. The following points are unclear to me, and I think they are not documented. Would it be possible to improve the documentation here?

xadhoom commented 1 year ago
  • in other callbacks, for example for GPIO interrupts, one apparently does not have to clear the corresponding irq.

Sorry for chiming in, the 2nd point is explained in the docs, albeit not in the gpio_set_irq_enabled_with_callback function. Check for gpio_acknowledge_irq which states For callbacks set with gpio_set_irq_enabled_with_callback gpio_set_irq_callback, this function is called automatically.