-
Notifications
You must be signed in to change notification settings - Fork 231
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
treewide: spi: Enforce proper CS pin usage #103
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.
Nice, thank you very much! The design is solid, I've left a few comments but apart from that you can go ahead and update all the other HAL crates and examples :)
Lol you don't get to say that when I mostly copied from your comment 😉 |
Haha, I did not at all remember what I wrote back then, please forgive me :D |
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.
LGTM! Thanks a lot!
@@ -93,14 +93,13 @@ pub fn delay_us(us: u16) { | |||
/// | |||
/// let mut pins = arduino_leonardo::Pins::new(dp.PORTB, dp.PORTC, dp.PORTD, dp.PORTE); | |||
/// | |||
/// pins.led_rx.into_output(&mut pins.ddr); // Chip Select must be set to output mode. | |||
/// | |||
/// // Create SPI interface. | |||
/// let mut spi = arduino_leonardo::spi::Spi::new( |
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.
/// let mut spi = arduino_leonardo::spi::Spi::new( | |
/// let (mut spi, mut cs) = arduino_leonardo::spi::Spi::new( |
/resolves #27
Makes the proposed change to the SPI macro and the usage by ATmega328p. Waiting for review and approval before making an attempt to update all other usages.