Skip to content

sw: document that GPIO interrupt status reads clear all pins - #143

Open
sidcraftscode wants to merge 1 commit into
pulp-platform:mainfrom
sidcraftscode:gpio-status-doc
Open

sidcraftscode wants to merge 1 commit into
pulp-platform:mainfrom
sidcraftscode:gpio-status-doc

Conversation

@sidcraftscode

Copy link
Copy Markdown
Contributor

GPIO_INTRPT_STATUS is cleared on read as a whole (gpio_reg_top.sv, and the GPIO README), so gpio_pin_get_interrupt_status() also throws away whatever is pending on the other pins: with two pins fired, the call for pin 0 returns 1 and the following call for pin 1 returns 0. The header now says so and points to reading gpio_get_interrupt_status() once when checking several pins.

GPIO_INTRPT_STATUS is cleared on read as a whole, so
gpio_pin_get_interrupt_status() also drops the pending status of every
other pin. Say so in gpio.h and point to gpio_get_interrupt_status()
for checking several pins.
@phsauter

Copy link
Copy Markdown
Collaborator

Thanks for reporting and fixing the mismatch. I will merge as soon as the CI stops being broken.

This branch has not been deployed

No deployments
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.

2 participants