From 15384d27bb181bf48e580ca4a1c4fd848ecb1720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Als=C3=A9r?= Date: Fri, 8 Jul 2022 23:42:19 +0200 Subject: [PATCH] Merge upstream --- embassy-embedded-hal/src/shared_bus/blocking/i2c.rs | 5 ++--- embassy-embedded-hal/src/shared_bus/blocking/spi.rs | 7 ++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/embassy-embedded-hal/src/shared_bus/blocking/i2c.rs b/embassy-embedded-hal/src/shared_bus/blocking/i2c.rs index 12c2a1f4..e8dd0f24 100644 --- a/embassy-embedded-hal/src/shared_bus/blocking/i2c.rs +++ b/embassy-embedded-hal/src/shared_bus/blocking/i2c.rs @@ -101,7 +101,6 @@ where } } -<<<<<<< HEAD pub struct I2cBusDeviceWithConfig<'a, M: RawMutex, BUS, C> { bus: &'a Mutex>, config: C, @@ -183,7 +182,8 @@ where let _ = operations; todo!() } -======= +} + impl<'a, M, BUS, E> embedded_hal_02::blocking::i2c::Write for I2cBusDevice<'_, M, BUS> where M: RawMutex, @@ -224,5 +224,4 @@ where .map_err(I2cBusDeviceError::I2c) }) } ->>>>>>> master } diff --git a/embassy-embedded-hal/src/shared_bus/blocking/spi.rs b/embassy-embedded-hal/src/shared_bus/blocking/spi.rs index b31efd64..2bcf47cf 100644 --- a/embassy-embedded-hal/src/shared_bus/blocking/spi.rs +++ b/embassy-embedded-hal/src/shared_bus/blocking/spi.rs @@ -76,7 +76,6 @@ where } } -<<<<<<< HEAD pub struct SpiBusDeviceWithConfig<'a, M: RawMutex, BUS, CS, C> { bus: &'a Mutex>, cs: CS, @@ -120,8 +119,11 @@ where let f_res = f_res.map_err(SpiBusDeviceError::Spi)?; flush_res.map_err(SpiBusDeviceError::Spi)?; cs_res.map_err(SpiBusDeviceError::Cs)?; + Ok(f_res) + }) + } +} -======= impl<'d, M, BUS, CS, BusErr, CsErr> embedded_hal_02::blocking::spi::Transfer for SpiBusDevice<'_, M, BUS, CS> where M: RawMutex, @@ -158,7 +160,6 @@ where let cs_res = self.cs.set_high(); let f_res = f_res.map_err(SpiBusDeviceError::Spi)?; cs_res.map_err(SpiBusDeviceError::Cs)?; ->>>>>>> master Ok(f_res) }) }