Skip to content

Commit

Permalink
Remove unused Into<Mode> generic
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonAPenn committed Jul 21, 2023
1 parent e84c296 commit f042839
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rp2040-hal/src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ impl<D: SpiDevice, P: ValidSpiPinout<D>, const DS: u8> Spi<Disabled, D, P, DS> {
}

/// Initialize the SPI in slave mode
pub fn init_slave<M: Into<Mode>>(self, resets: &mut RESETS, frame_format: FrameFormat) -> Spi<Enabled, D, P, DS> {
pub fn init_slave(self, resets: &mut RESETS, frame_format: FrameFormat) -> Spi<Enabled, D, P, DS> {
// Use dummy values for frequency and baudrate.
// With both values 0, set_baudrate will set prescale == u8::MAX, which will break if debug assertions are enabled.
// u8::MAX is outside the allowed range 2..=254 for CPSDVSR, which might interfere with proper operation in slave mode.
Expand Down

0 comments on commit f042839

Please sign in to comment.