aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjrmoulton <[email protected]>2024-06-18 11:13:32 -0600
committerjrmoulton <[email protected]>2024-08-13 09:46:16 -0600
commitbec0eac5aba15c38697cfedae948e0a9f3005c56 (patch)
tree4b0306263dbd70021f82cc2166db4171a7c29011
parent98437e39ee3b62289d1d126141d8cfb150e9c03a (diff)
Fix v1 mod
-rw-r--r--embassy-stm32/src/i2c/v1.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-stm32/src/i2c/v1.rs b/embassy-stm32/src/i2c/v1.rs
index e98ab0290..30964e3f4 100644
--- a/embassy-stm32/src/i2c/v1.rs
+++ b/embassy-stm32/src/i2c/v1.rs
@@ -42,7 +42,7 @@ pub unsafe fn on_interrupt<T: Instance>() {
42 }); 42 });
43} 43}
44 44
45impl<'d, M: PeriMode> I2c<'d, M, Master> { 45impl<'d, M: PeriMode, IM: MasterMode> I2c<'d, M, IM> {
46 pub(crate) fn init(&mut self, freq: Hertz, _config: Config) { 46 pub(crate) fn init(&mut self, freq: Hertz, _config: Config) {
47 self.info.regs.cr1().modify(|reg| { 47 self.info.regs.cr1().modify(|reg| {
48 reg.set_pe(false); 48 reg.set_pe(false);
@@ -298,7 +298,7 @@ impl<'d, M: PeriMode> I2c<'d, M, Master> {
298 } 298 }
299 299
300 /// Blocking read. 300 /// Blocking read.
301 pub fn blocking_read(&mut self, addr: Address, read: &mut [u8]) -> Result<(), Error> { 301 pub fn blocking_read(&mut self, addr: u8, read: &mut [u8]) -> Result<(), Error> {
302 self.blocking_read_timeout(addr, read, self.timeout(), FrameOptions::FirstAndLastFrame) 302 self.blocking_read_timeout(addr, read, self.timeout(), FrameOptions::FirstAndLastFrame)
303 } 303 }
304 304
@@ -355,7 +355,7 @@ impl<'d, M: PeriMode> I2c<'d, M, Master> {
355 } 355 }
356} 356}
357 357
358impl<'d> I2c<'d, Async, Master> { 358impl<'d, IM: MasterMode> I2c<'d, Async, IM> {
359 async fn write_frame(&mut self, address: u8, write: &[u8], frame: FrameOptions) -> Result<(), Error> { 359 async fn write_frame(&mut self, address: u8, write: &[u8], frame: FrameOptions) -> Result<(), Error> {
360 self.info.regs.cr2().modify(|w| { 360 self.info.regs.cr2().modify(|w| {
361 // Note: Do not enable the ITBUFEN bit in the I2C_CR2 register if DMA is used for 361 // Note: Do not enable the ITBUFEN bit in the I2C_CR2 register if DMA is used for