Skip to content

Documentation: Clarify GPIO interrupt behaviour #814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 7, 2022

Conversation

Malvineous
Copy link
Contributor

Just some small documentation updates to clarify a few things I had to investigate to find answers to, related to how the GPIO interrupts work.

@@ -401,7 +401,8 @@ void gpio_set_dormant_irq_enabled(uint gpio, uint32_t events, bool enabled);
*
* \param gpio GPIO number
* \param events Bitmask of events to clear. See \ref gpio_set_irq_enabled for details.
*
*
* \note \ref gpio_set_irq_enabled_with_callback calls this function before the callback.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gpio_set_irq_enabled_with_callback doesn't directly call gpio_acknowledge_irq. Did you mean something like "The default GPIO IRQ-handler automatically calls this function before calling any callback-function" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry yes, I meant to imply that callbacks set with gpio_set_irq_enabled_with_callback don't need to acknowledge the IRQ as it's done before the user callback runs. I've reworded it, hopefully it reads better now.

@kilograham
Copy link
Contributor

Not picking this up yet, as this API may get reworked shortly.

@Malvineous
Copy link
Contributor Author

@kilograham You could merge it now and then just let it get replaced if/when the API gets redeveloped 😀

@kilograham kilograham changed the base branch from develop to gpio_irq_improvements June 7, 2022 19:51
@kilograham kilograham merged commit e612770 into raspberrypi:gpio_irq_improvements Jun 7, 2022
@Malvineous Malvineous deleted the doco branch June 19, 2022 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants