Merge upstream

This commit is contained in:
Henrik Alsér 2022-07-08 23:42:19 +02:00
parent b72ba0a6c4
commit 15384d27bb
2 changed files with 6 additions and 6 deletions

View File

@ -101,7 +101,6 @@ where
} }
} }
<<<<<<< HEAD
pub struct I2cBusDeviceWithConfig<'a, M: RawMutex, BUS, C> { pub struct I2cBusDeviceWithConfig<'a, M: RawMutex, BUS, C> {
bus: &'a Mutex<M, RefCell<BUS>>, bus: &'a Mutex<M, RefCell<BUS>>,
config: C, config: C,
@ -183,7 +182,8 @@ where
let _ = operations; let _ = operations;
todo!() todo!()
} }
======= }
impl<'a, M, BUS, E> embedded_hal_02::blocking::i2c::Write for I2cBusDevice<'_, M, BUS> impl<'a, M, BUS, E> embedded_hal_02::blocking::i2c::Write for I2cBusDevice<'_, M, BUS>
where where
M: RawMutex, M: RawMutex,
@ -224,5 +224,4 @@ where
.map_err(I2cBusDeviceError::I2c) .map_err(I2cBusDeviceError::I2c)
}) })
} }
>>>>>>> master
} }

View File

@ -76,7 +76,6 @@ where
} }
} }
<<<<<<< HEAD
pub struct SpiBusDeviceWithConfig<'a, M: RawMutex, BUS, CS, C> { pub struct SpiBusDeviceWithConfig<'a, M: RawMutex, BUS, CS, C> {
bus: &'a Mutex<M, RefCell<BUS>>, bus: &'a Mutex<M, RefCell<BUS>>,
cs: CS, cs: CS,
@ -120,8 +119,11 @@ where
let f_res = f_res.map_err(SpiBusDeviceError::Spi)?; let f_res = f_res.map_err(SpiBusDeviceError::Spi)?;
flush_res.map_err(SpiBusDeviceError::Spi)?; flush_res.map_err(SpiBusDeviceError::Spi)?;
cs_res.map_err(SpiBusDeviceError::Cs)?; cs_res.map_err(SpiBusDeviceError::Cs)?;
Ok(f_res)
})
}
}
=======
impl<'d, M, BUS, CS, BusErr, CsErr> embedded_hal_02::blocking::spi::Transfer<u8> for SpiBusDevice<'_, M, BUS, CS> impl<'d, M, BUS, CS, BusErr, CsErr> embedded_hal_02::blocking::spi::Transfer<u8> for SpiBusDevice<'_, M, BUS, CS>
where where
M: RawMutex, M: RawMutex,
@ -158,7 +160,6 @@ where
let cs_res = self.cs.set_high(); let cs_res = self.cs.set_high();
let f_res = f_res.map_err(SpiBusDeviceError::Spi)?; let f_res = f_res.map_err(SpiBusDeviceError::Spi)?;
cs_res.map_err(SpiBusDeviceError::Cs)?; cs_res.map_err(SpiBusDeviceError::Cs)?;
>>>>>>> master
Ok(f_res) Ok(f_res)
}) })
} }