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

Improve spi master constructor #901

Merged
merged 20 commits into from
Nov 8, 2023
Merged

Improve spi master constructor #901

merged 20 commits into from
Nov 8, 2023

Conversation

sanxus
Copy link
Contributor

@sanxus sanxus commented Nov 3, 2023

Thank you!

Thank you for your contribution.
Please make sure that your submission includes the following:

Must

  • The code compiles without errors or warnings.
  • All examples work.
  • cargo fmt was run.
  • Your changes were added to the CHANGELOG.md in the proper section.
  • You updated existing examples or added examples (if applicable).
  • Added examples are checked in CI

Nice to have

  • You add a description of your work to this PR.
  • You added proper docs for your newly added features and code.

Fix #890

This makes master mode spi constructor builder-like with all pins optional.

@sanxus
Copy link
Contributor Author

sanxus commented Nov 4, 2023

Is this fine?

Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@JurajSadel JurajSadel left a comment

Choose a reason for hiding this comment

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

LGTM

@bjoernQ bjoernQ merged commit c196b67 into esp-rs:main Nov 8, 2023
17 checks passed
@jessebraham
Copy link
Member

I guess we should also start updating other drivers' APIs to be consistent, if this is the pattern we'd like to use moving forward.

@bjoernQ
Copy link
Contributor

bjoernQ commented Nov 8, 2023

Probably - I guess we don't need it for drivers which only take one pin however (e.g. RMT channels). Not sure about I2C since the two pins are not really optional

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.

Allow using FullDuplexMode SPI with any pin combinations (mosi, miso, cs, ...)
4 participants