-
Notifications
You must be signed in to change notification settings - Fork 193
Add an spi::config::BitOrder enum #222
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
Conversation
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.
@@ -165,6 +189,7 @@ pub mod config { | |||
/// See https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/spi_master.html#timing-considerations | |||
pub write_only: bool, | |||
pub duplex: Duplex, | |||
pub bit_order: BitOrder, | |||
pub cs_active_high: bool, | |||
pub input_delay_ns: i32, | |||
} |
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.
NIT: for consistency maybe add an pub fn bitorder to the Config builder pattern.
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.
Thanks, I missed that 😄 Added it now
Thanks! |
This PR introduces a new enum spi::config::BitOrder which can be used to specify the order of the bits transfered/received. I tried to test all the variants of the enum, but I am new to embedded development, so I would appreciate if someone else would also test them :)
Thanks @Vollbrecht and @Dominaezzz for the help in the Matrix channel!