diff --git a/embassy-embedded-hal/src/shared_bus/blocking/spi.rs b/embassy-embedded-hal/src/shared_bus/blocking/spi.rs index 8f1cce4ad..2979d4ace 100644 --- a/embassy-embedded-hal/src/shared_bus/blocking/spi.rs +++ b/embassy-embedded-hal/src/shared_bus/blocking/spi.rs @@ -33,17 +33,14 @@ pub struct SpiDevice<'a, M: RawMutex, BUS, CS> { cs: CS, } -impl<'a, M: RawMutex, BUS, CS> SpiDevice<'a, M, BUS, CS, > { +impl<'a, M: RawMutex, BUS, CS> SpiDevice<'a, M, BUS, CS> { /// Create a new `SpiDevice`. pub fn new(bus: &'a Mutex>, cs: CS) -> Self { - Self { - bus, - cs, - } + Self { bus, cs } } } -impl<'a, M: RawMutex, BUS, CS> spi::ErrorType for SpiDevice<'a, M, BUS, CS, > +impl<'a, M: RawMutex, BUS, CS> spi::ErrorType for SpiDevice<'a, M, BUS, CS> where BUS: spi::ErrorType, CS: OutputPin, @@ -51,7 +48,7 @@ where type Error = SpiDeviceError; } -impl embedded_hal_1::spi::SpiDevice for SpiDevice<'_, M, BUS, CS, > +impl embedded_hal_1::spi::SpiDevice for SpiDevice<'_, M, BUS, CS> where M: RawMutex, BUS: SpiBus, @@ -94,7 +91,6 @@ where } } - /// SPI device on a shared bus, with its own configuration. /// /// This is like [`SpiDevice`], with an additional bus configuration that's applied