Skip to content

generic GPIO #207

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 4 commits into from
May 30, 2025
Merged

generic GPIO #207

merged 4 commits into from
May 30, 2025

Conversation

burrbull
Copy link
Member

Part 3 of #186

@burrbull burrbull marked this pull request as ready for review May 29, 2025 08:30
out_port!(OutPort5 => 5, (0, 1, 2, 3, 4), (N0, N1, N2, N3, N4));
out_port!(OutPort6 => 6, (0, 1, 2, 3, 4, 5), (N0, N1, N2, N3, N4, N5));
out_port!(OutPort7 => 7, (0, 1, 2, 3, 4, 5, 6), (N0, N1, N2, N3, N4, N5, N6));
out_port!(OutPort8 => 8, (0, 1, 2, 3, 4, 5, 6, 7), (N0, N1, N2, N3, N4, N5, N6, N7));
Copy link
Member

Choose a reason for hiding this comment

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

Wow, interesting!


#[inline(always)]
fn check_interrupt(&self) -> bool {
unsafe { ((*EXTI::ptr()).pr1().read().bits() & (1 << self.pin_id())) != 0 }
Copy link
Member

Choose a reason for hiding this comment

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

Are any of these arrayified?

Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunately not. G4 has holes in fields there. https://stm32-rs.github.io/stm32-rs/STM32G474.html#EXTI

@usbalbin
Copy link
Member

I ran the (not very extensive) test suite and it passed all tests for what it's worth

Copy link
Member

@usbalbin usbalbin left a comment

Choose a reason for hiding this comment

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

This is really nice stuff! Thank you :)

Can I merge this now?

@burrbull
Copy link
Member Author

Can I merge this now?

As you wish.

@usbalbin usbalbin added this pull request to the merge queue May 30, 2025
Merged via the queue into stm32-rs:main with commit 5308cce May 30, 2025
34 checks passed
@usbalbin
Copy link
Member

Thank you :)

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