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

Refactor SPI MISO setup #2557

Merged
merged 7 commits into from
Jan 7, 2025
Merged

Refactor SPI MISO setup #2557

merged 7 commits into from
Jan 7, 2025

Conversation

Dominaezzz
Copy link
Collaborator

@Dominaezzz Dominaezzz commented Nov 17, 2024

Thank you for your contribution!

We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:

Submission Checklist 📝

  • I have updated existing examples or added new ones (if applicable).
  • I have used cargo xtask fmt-packages command to ensure that all changed code is formatted correctly.
  • My changes were added to the CHANGELOG.md in the proper section.
  • I have added necessary changes to user code to the Migration Guide.
  • My changes are in accordance to the esp-rs API guidelines

Extra:

Pull Request Details 📖

Description

Fixes #2511 .

Not everyone wants to configure the "output part" of the MISO signal.

My thinking here is, most users see "MISO" as an input pin/signal. If they want the bidirectional variant, they should use with_sio1 to signify they want "Serial Input/Output" rather than "MISO".

This also allows setting up loopback without unsafe.

For aesthetics, it might be worth having a with_sio0 (alongside with_miso), just so it reads better when also using sio2, sio3, etc.

Testing

CI

@bugadani bugadani mentioned this pull request Nov 19, 2024
6 tasks
@Dominaezzz
Copy link
Collaborator Author

I'll come back to this once I figure out how to craft up a good migration guide.

But I'll close this for now as there's already enough (almost 30) lingering PRs that aren't being updated.

@Dominaezzz Dominaezzz closed this Nov 20, 2024
@MabezDev
Copy link
Member

Would you mind reopening this? We've got through most of the backlog now, sorry about that 😅

@Dominaezzz
Copy link
Collaborator Author

Sure! I still need to figure the migration guide so it might still linger for a while.

@Dominaezzz Dominaezzz reopened this Nov 23, 2024
@MabezDev
Copy link
Member

MabezDev commented Jan 3, 2025

Small poke @Dominaezzz, would you mind rebasing and adding changelogs etc?

Dominic Fischer added 3 commits January 4, 2025 22:31
# Conflicts:
#	esp-hal/src/spi/master.rs
#	hil-test/tests/spi_full_duplex.rs
@Dominaezzz
Copy link
Collaborator Author

Not sure what's going on with the HIL test, seeing as it times out rather than fails the assertion...

I don't have time to investigate this weekend.

@bugadani
Copy link
Contributor

bugadani commented Jan 6, 2025

@Dominaezzz that issue is independent from this PR, we have some timing difficulties in ESP32.

Copy link
Contributor

@bugadani bugadani left a comment

Choose a reason for hiding this comment

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

Besides the changelog, LGTM.

esp-hal/CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

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

Thanks!

@MabezDev MabezDev enabled auto-merge January 7, 2025 11:16
@MabezDev MabezDev added this pull request to the merge queue Jan 7, 2025
Merged via the queue into esp-rs:main with commit b3401bf Jan 7, 2025
27 of 28 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.

SPI: pin configuration is not flexible enough
4 participants