-
Notifications
You must be signed in to change notification settings - Fork 46
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
Updated logic around sysfs/cdev pin selection #34
Conversation
r? @nastevens (rust_highfive has picked a reviewer for you, use r? to override) |
src/lib.rs
Outdated
|
||
#[cfg(all(feature = "gpio_cdev", not(feature = "gpio_sysfs")))] | ||
/// Re-export of `cdev_pin::CdevPin` pin type when `gpio_cdev` feature is selected | ||
pub type Pin = cdev_pin::CdevPin; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My gut feeling is that it could make sense to re-export SysfsPin
as Pin
if the gpio_sysfs feature is enabled. I think I would prefer to not export any symbol with the name Pin
that ever points at a different type that is cdev. I think that's probably just going to cause confusion without any real benefit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's probably fair, I put this in because a) there was a duplicated Pin impl and b) it makes the change non-breaking.
If we're going to break it, does it make sense to have the re-export at all? We could just export whatever is enabled and indicate a preference in the comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that would be my preference overall -- With a semver bump I think the move to be explicit about the subsystem being used to talk to the GPIO makes sense. Any breakage with the semver major version is not something I think will be a big deal for users if they are sticking with sysfs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet as, updated
bors try |
tryBuild succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
Build succeeded |
35: Add transactional SPI r=ryankurte a=ryankurte Implementation of transactional SPI - replaces #33 - blocked on: - ~rust-embedded/embedded-hal#191 - ~#34 ~Important: remove patch and bump hal version before merging~ Co-authored-by: ryan <ryan@kurte.nz> Co-authored-by: Ryan <ryankurte@users.noreply.github.com>
Pin
type using type aliases