diff options
| author | Henrik Alsér <[email protected]> | 2022-07-08 23:42:19 +0200 |
|---|---|---|
| committer | Henrik Alsér <[email protected]> | 2022-07-08 23:42:19 +0200 |
| commit | 15384d27bb181bf48e580ca4a1c4fd848ecb1720 (patch) | |
| tree | 0b3187161a857cf25dce0bb7727606918add72e3 /embassy-embedded-hal/src | |
| parent | b72ba0a6c47369c3efe26fe3882ba741d266bb87 (diff) | |
Merge upstream
Diffstat (limited to 'embassy-embedded-hal/src')
| -rw-r--r-- | embassy-embedded-hal/src/shared_bus/blocking/i2c.rs | 5 | ||||
| -rw-r--r-- | 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 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 | ||
| 105 | pub struct I2cBusDeviceWithConfig<'a, M: RawMutex, BUS, C> { | 104 | pub 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 | |||
| 187 | impl<'a, M, BUS, E> embedded_hal_02::blocking::i2c::Write for I2cBusDevice<'_, M, BUS> | 187 | impl<'a, M, BUS, E> embedded_hal_02::blocking::i2c::Write for I2cBusDevice<'_, M, BUS> |
| 188 | where | 188 | where |
| 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 | ||
| 80 | pub struct SpiBusDeviceWithConfig<'a, M: RawMutex, BUS, CS, C> { | 79 | pub 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 | ======= | ||
| 125 | impl<'d, M, BUS, CS, BusErr, CsErr> embedded_hal_02::blocking::spi::Transfer<u8> for SpiBusDevice<'_, M, BUS, CS> | 127 | impl<'d, M, BUS, CS, BusErr, CsErr> embedded_hal_02::blocking::spi::Transfer<u8> for SpiBusDevice<'_, M, BUS, CS> |
| 126 | where | 128 | where |
| 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 | } |
