aboutsummaryrefslogtreecommitdiff
path: root/embassy-embedded-hal
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-embedded-hal')
-rw-r--r--embassy-embedded-hal/src/shared_bus/blocking/i2c.rs5
-rw-r--r--embassy-embedded-hal/src/shared_bus/blocking/spi.rs7
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 12c2a1f4b..e8dd0f248 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
101 } 101 }
102} 102}
103 103
104<<<<<<< HEAD
105pub struct I2cBusDeviceWithConfig<'a, M: RawMutex, BUS, C> { 104pub struct I2cBusDeviceWithConfig<'a, M: RawMutex, BUS, C> {
106 bus: &'a Mutex<M, RefCell<BUS>>, 105 bus: &'a Mutex<M, RefCell<BUS>>,
107 config: C, 106 config: C,
@@ -183,7 +182,8 @@ where
183 let _ = operations; 182 let _ = operations;
184 todo!() 183 todo!()
185 } 184 }
186======= 185}
186
187impl<'a, M, BUS, E> embedded_hal_02::blocking::i2c::Write for I2cBusDevice<'_, M, BUS> 187impl<'a, M, BUS, E> embedded_hal_02::blocking::i2c::Write for I2cBusDevice<'_, M, BUS>
188where 188where
189 M: RawMutex, 189 M: RawMutex,
@@ -224,5 +224,4 @@ where
224 .map_err(I2cBusDeviceError::I2c) 224 .map_err(I2cBusDeviceError::I2c)
225 }) 225 })
226 } 226 }
227>>>>>>> master
228} 227}
diff --git a/embassy-embedded-hal/src/shared_bus/blocking/spi.rs b/embassy-embedded-hal/src/shared_bus/blocking/spi.rs
index b31efd64b..2bcf47cff 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
76 } 76 }
77} 77}
78 78
79<<<<<<< HEAD
80pub struct SpiBusDeviceWithConfig<'a, M: RawMutex, BUS, CS, C> { 79pub struct SpiBusDeviceWithConfig<'a, M: RawMutex, BUS, CS, C> {
81 bus: &'a Mutex<M, RefCell<BUS>>, 80 bus: &'a Mutex<M, RefCell<BUS>>,
82 cs: CS, 81 cs: CS,
@@ -120,8 +119,11 @@ where
120 let f_res = f_res.map_err(SpiBusDeviceError::Spi)?; 119 let f_res = f_res.map_err(SpiBusDeviceError::Spi)?;
121 flush_res.map_err(SpiBusDeviceError::Spi)?; 120 flush_res.map_err(SpiBusDeviceError::Spi)?;
122 cs_res.map_err(SpiBusDeviceError::Cs)?; 121 cs_res.map_err(SpiBusDeviceError::Cs)?;
122 Ok(f_res)
123 })
124 }
125}
123 126
124=======
125impl<'d, M, BUS, CS, BusErr, CsErr> embedded_hal_02::blocking::spi::Transfer<u8> for SpiBusDevice<'_, M, BUS, CS> 127impl<'d, M, BUS, CS, BusErr, CsErr> embedded_hal_02::blocking::spi::Transfer<u8> for SpiBusDevice<'_, M, BUS, CS>
126where 128where
127 M: RawMutex, 129 M: RawMutex,
@@ -158,7 +160,6 @@ where
158 let cs_res = self.cs.set_high(); 160 let cs_res = self.cs.set_high();
159 let f_res = f_res.map_err(SpiBusDeviceError::Spi)?; 161 let f_res = f_res.map_err(SpiBusDeviceError::Spi)?;
160 cs_res.map_err(SpiBusDeviceError::Cs)?; 162 cs_res.map_err(SpiBusDeviceError::Cs)?;
161>>>>>>> master
162 Ok(f_res) 163 Ok(f_res)
163 }) 164 })
164 } 165 }