Skip to content
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

rp: Fix indexing for pins >31 on rp235xb #3330

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

CBJamo
Copy link
Contributor

@CBJamo CBJamo commented Sep 11, 2024

Does not handle using PIO with pins > 31, which is still broken.

@@ -953,7 +965,7 @@ macro_rules! impl_pin {
impl SealedPin for peripherals::$name {
#[inline]
fn pin_bank(&self) -> u8 {
($bank as u8) * 32 + $pin_num
($bank as u8) * 64 + $pin_num
Copy link
Member

Choose a reason for hiding this comment

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

if bank is bit 7, shouldn't this be 128?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, of course it is. I just didn't hit it because I'm not trying to use the qspi pins. The way pins are selected is a bit fiddly imo. When I get around to trying the gpio co-processor it should improve.

@Dirbaio Dirbaio added this pull request to the merge queue Sep 11, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 11, 2024
@Dirbaio
Copy link
Member

Dirbaio commented Sep 11, 2024

spurious failure, forcing merge.

@Dirbaio Dirbaio merged commit 3d6a270 into embassy-rs:main Sep 11, 2024
6 checks passed
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