Skip to content

Commit

Permalink
Merge pull request rp-rs#616 from jannic/mode-from-reference
Browse files Browse the repository at this point in the history
Minor usability improvement
  • Loading branch information
ithinuel authored May 20, 2023
2 parents 49d0460 + 2dd37fe commit 61eb7a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rp2040-hal/src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ impl From<embedded_hal::spi::Mode> for Mode {
}
}

impl From<&embedded_hal::spi::Mode> for Mode {
fn from(f: &embedded_hal::spi::Mode) -> Self {
Mode(*f)
}
}

#[cfg(feature = "eh1_0_alpha")]
impl From<eh1_0_alpha::spi::Mode> for Mode {
fn from(f: eh1_0_alpha::spi::Mode) -> Self {
Expand Down

0 comments on commit 61eb7a1

Please sign in to comment.