diff options
| author | jrmoulton <[email protected]> | 2024-08-13 09:45:28 -0600 |
|---|---|---|
| committer | jrmoulton <[email protected]> | 2024-08-13 09:46:17 -0600 |
| commit | b4eb4a3d189efe5fe3716bb5dcd6396efcfab5c3 (patch) | |
| tree | 10c6f7d61568dd264d5eb42d76d7424dee0f1d80 /embassy-stm32/src/i2c | |
| parent | d1f5a4c5c72787cfa7ce9e7c057714e3a272031f (diff) | |
remove 10 bit support
Diffstat (limited to 'embassy-stm32/src/i2c')
| -rw-r--r-- | embassy-stm32/src/i2c/mod.rs | 68 | ||||
| -rw-r--r-- | embassy-stm32/src/i2c/v1.rs | 70 | ||||
| -rw-r--r-- | embassy-stm32/src/i2c/v2.rs | 132 |
3 files changed, 90 insertions, 180 deletions
diff --git a/embassy-stm32/src/i2c/mod.rs b/embassy-stm32/src/i2c/mod.rs index fed2e4714..6f952b8f8 100644 --- a/embassy-stm32/src/i2c/mod.rs +++ b/embassy-stm32/src/i2c/mod.rs | |||
| @@ -333,6 +333,30 @@ foreach_peripheral!( | |||
| 333 | }; | 333 | }; |
| 334 | ); | 334 | ); |
| 335 | 335 | ||
| 336 | impl<'d, M: Mode, IM: MasterMode> embedded_hal_02::blocking::i2c::Read for I2c<'d, M, IM> { | ||
| 337 | type Error = Error; | ||
| 338 | |||
| 339 | fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error> { | ||
| 340 | self.blocking_read(address, buffer) | ||
| 341 | } | ||
| 342 | } | ||
| 343 | |||
| 344 | impl<'d, M: Mode, IM: MasterMode> embedded_hal_02::blocking::i2c::Write for I2c<'d, M, IM> { | ||
| 345 | type Error = Error; | ||
| 346 | |||
| 347 | fn write(&mut self, address: u8, write: &[u8]) -> Result<(), Self::Error> { | ||
| 348 | self.blocking_write(address, write) | ||
| 349 | } | ||
| 350 | } | ||
| 351 | |||
| 352 | impl<'d, M: Mode, IM: MasterMode> embedded_hal_02::blocking::i2c::WriteRead for I2c<'d, M, IM> { | ||
| 353 | type Error = Error; | ||
| 354 | |||
| 355 | fn write_read(&mut self, address: u8, write: &[u8], read: &mut [u8]) -> Result<(), Self::Error> { | ||
| 356 | self.blocking_write_read(address, write, read) | ||
| 357 | } | ||
| 358 | } | ||
| 359 | |||
| 336 | impl embedded_hal_1::i2c::Error for Error { | 360 | impl embedded_hal_1::i2c::Error for Error { |
| 337 | fn kind(&self) -> embedded_hal_1::i2c::ErrorKind { | 361 | fn kind(&self) -> embedded_hal_1::i2c::ErrorKind { |
| 338 | match *self { | 362 | match *self { |
| @@ -353,6 +377,50 @@ impl<'d, M: Mode, IM: MasterMode> embedded_hal_1::i2c::ErrorType for I2c<'d, M, | |||
| 353 | type Error = Error; | 377 | type Error = Error; |
| 354 | } | 378 | } |
| 355 | 379 | ||
| 380 | impl<'d, M: Mode, IM: MasterMode> embedded_hal_1::i2c::I2c for I2c<'d, M, IM> { | ||
| 381 | fn read(&mut self, address: u8, read: &mut [u8]) -> Result<(), Self::Error> { | ||
| 382 | self.blocking_read(address, read) | ||
| 383 | } | ||
| 384 | |||
| 385 | fn write(&mut self, address: u8, write: &[u8]) -> Result<(), Self::Error> { | ||
| 386 | self.blocking_write(address, write) | ||
| 387 | } | ||
| 388 | |||
| 389 | fn write_read(&mut self, address: u8, write: &[u8], read: &mut [u8]) -> Result<(), Self::Error> { | ||
| 390 | self.blocking_write_read(address, write, read) | ||
| 391 | } | ||
| 392 | |||
| 393 | fn transaction( | ||
| 394 | &mut self, | ||
| 395 | address: u8, | ||
| 396 | operations: &mut [embedded_hal_1::i2c::Operation<'_>], | ||
| 397 | ) -> Result<(), Self::Error> { | ||
| 398 | self.blocking_transaction(address, operations) | ||
| 399 | } | ||
| 400 | } | ||
| 401 | |||
| 402 | impl<'d, IM: MasterMode> embedded_hal_async::i2c::I2c for I2c<'d, Async, IM> { | ||
| 403 | async fn read(&mut self, address: u8, read: &mut [u8]) -> Result<(), Self::Error> { | ||
| 404 | self.read(address, read).await | ||
| 405 | } | ||
| 406 | |||
| 407 | async fn write(&mut self, address: u8, write: &[u8]) -> Result<(), Self::Error> { | ||
| 408 | self.write(address, write).await | ||
| 409 | } | ||
| 410 | |||
| 411 | async fn write_read(&mut self, address: u8, write: &[u8], read: &mut [u8]) -> Result<(), Self::Error> { | ||
| 412 | self.write_read(address, write, read).await | ||
| 413 | } | ||
| 414 | |||
| 415 | async fn transaction( | ||
| 416 | &mut self, | ||
| 417 | address: u8, | ||
| 418 | operations: &mut [embedded_hal_1::i2c::Operation<'_>], | ||
| 419 | ) -> Result<(), Self::Error> { | ||
| 420 | self.transaction(address, operations).await | ||
| 421 | } | ||
| 422 | } | ||
| 423 | |||
| 356 | /// Frame type in I2C transaction. | 424 | /// Frame type in I2C transaction. |
| 357 | /// | 425 | /// |
| 358 | /// This tells each method what kind of framing to use, to generate a (repeated) start condition (ST | 426 | /// This tells each method what kind of framing to use, to generate a (repeated) start condition (ST |
diff --git a/embassy-stm32/src/i2c/v1.rs b/embassy-stm32/src/i2c/v1.rs index 30964e3f4..35f13ab46 100644 --- a/embassy-stm32/src/i2c/v1.rs +++ b/embassy-stm32/src/i2c/v1.rs | |||
| @@ -821,73 +821,3 @@ impl<'d, M: PeriMode> SetConfig for I2c<'d, M, Master> { | |||
| 821 | Ok(()) | 821 | Ok(()) |
| 822 | } | 822 | } |
| 823 | } | 823 | } |
| 824 | |||
| 825 | // ======== Embedded HAL impls ======== | ||
| 826 | |||
| 827 | impl<'d, M: PeriMode, IM: MasterMode> embedded_hal_02::blocking::i2c::Read for I2c<'d, M, IM> { | ||
| 828 | type Error = Error; | ||
| 829 | |||
| 830 | fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error> { | ||
| 831 | self.blocking_read(address, buffer) | ||
| 832 | } | ||
| 833 | } | ||
| 834 | |||
| 835 | impl<'d, M: PeriMode, IM: MasterMode> embedded_hal_02::blocking::i2c::Write for I2c<'d, M, IM> { | ||
| 836 | type Error = Error; | ||
| 837 | |||
| 838 | fn write(&mut self, address: u8, write: &[u8]) -> Result<(), Self::Error> { | ||
| 839 | self.blocking_write(address, write) | ||
| 840 | } | ||
| 841 | } | ||
| 842 | |||
| 843 | impl<'d, M: PeriMode, IM: MasterMode> embedded_hal_02::blocking::i2c::WriteRead for I2c<'d, M, IM> { | ||
| 844 | type Error = Error; | ||
| 845 | |||
| 846 | fn write_read(&mut self, address: u8, write: &[u8], read: &mut [u8]) -> Result<(), Self::Error> { | ||
| 847 | self.blocking_write_read(address, write, read) | ||
| 848 | } | ||
| 849 | } | ||
| 850 | |||
| 851 | impl<'d, M: PeriMode, IM: MasterMode> embedded_hal_1::i2c::I2c for I2c<'d, M, IM> { | ||
| 852 | fn read(&mut self, address: u8, read: &mut [u8]) -> Result<(), Self::Error> { | ||
| 853 | self.blocking_read(address, read) | ||
| 854 | } | ||
| 855 | |||
| 856 | fn write(&mut self, address: u8, write: &[u8]) -> Result<(), Self::Error> { | ||
| 857 | self.blocking_write(address, write) | ||
| 858 | } | ||
| 859 | |||
| 860 | fn write_read(&mut self, address: u8, write: &[u8], read: &mut [u8]) -> Result<(), Self::Error> { | ||
| 861 | self.blocking_write_read(address, write, read) | ||
| 862 | } | ||
| 863 | |||
| 864 | fn transaction( | ||
| 865 | &mut self, | ||
| 866 | address: u8, | ||
| 867 | operations: &mut [embedded_hal_1::i2c::Operation<'_>], | ||
| 868 | ) -> Result<(), Self::Error> { | ||
| 869 | self.blocking_transaction(address, operations) | ||
| 870 | } | ||
| 871 | } | ||
| 872 | |||
| 873 | impl<'d, IM: MasterMode> embedded_hal_async::i2c::I2c for I2c<'d, Async, IM> { | ||
| 874 | async fn read(&mut self, address: u8, read: &mut [u8]) -> Result<(), Self::Error> { | ||
| 875 | self.read(address, read).await | ||
| 876 | } | ||
| 877 | |||
| 878 | async fn write(&mut self, address: u8, write: &[u8]) -> Result<(), Self::Error> { | ||
| 879 | self.write(address, write).await | ||
| 880 | } | ||
| 881 | |||
| 882 | async fn write_read(&mut self, address: u8, write: &[u8], read: &mut [u8]) -> Result<(), Self::Error> { | ||
| 883 | self.write_read(address, write, read).await | ||
| 884 | } | ||
| 885 | |||
| 886 | async fn transaction( | ||
| 887 | &mut self, | ||
| 888 | address: u8, | ||
| 889 | operations: &mut [embedded_hal_1::i2c::Operation<'_>], | ||
| 890 | ) -> Result<(), Self::Error> { | ||
| 891 | self.transaction(address, operations).await | ||
| 892 | } | ||
| 893 | } | ||
diff --git a/embassy-stm32/src/i2c/v2.rs b/embassy-stm32/src/i2c/v2.rs index 7ca958fca..1cc41fb5f 100644 --- a/embassy-stm32/src/i2c/v2.rs +++ b/embassy-stm32/src/i2c/v2.rs | |||
| @@ -365,21 +365,21 @@ impl<'d, M: Mode, IM: MasterMode> I2c<'d, M, IM> { | |||
| 365 | // Blocking public API | 365 | // Blocking public API |
| 366 | 366 | ||
| 367 | /// Blocking read. | 367 | /// Blocking read. |
| 368 | pub fn blocking_read(&mut self, address: Address, read: &mut [u8]) -> Result<(), Error> { | 368 | pub fn blocking_read(&mut self, address: u8, read: &mut [u8]) -> Result<(), Error> { |
| 369 | self.read_internal(address, read, false, self.timeout()) | 369 | self.read_internal(address.into(), read, false, self.timeout()) |
| 370 | // Automatic Stop | 370 | // Automatic Stop |
| 371 | } | 371 | } |
| 372 | 372 | ||
| 373 | /// Blocking write. | 373 | /// Blocking write. |
| 374 | pub fn blocking_write(&mut self, address: Address, write: &[u8]) -> Result<(), Error> { | 374 | pub fn blocking_write(&mut self, address: u8, write: &[u8]) -> Result<(), Error> { |
| 375 | self.write_internal(address, write, true, self.timeout()) | 375 | self.write_internal(address.into(), write, true, self.timeout()) |
| 376 | } | 376 | } |
| 377 | 377 | ||
| 378 | /// Blocking write, restart, read. | 378 | /// Blocking write, restart, read. |
| 379 | pub fn blocking_write_read(&mut self, address: Address, write: &[u8], read: &mut [u8]) -> Result<(), Error> { | 379 | pub fn blocking_write_read(&mut self, address: u8, write: &[u8], read: &mut [u8]) -> Result<(), Error> { |
| 380 | let timeout = self.timeout(); | 380 | let timeout = self.timeout(); |
| 381 | self.write_internal(address, write, false, timeout)?; | 381 | self.write_internal(address.into(), write, false, timeout)?; |
| 382 | self.read_internal(address, read, true, timeout) | 382 | self.read_internal(address.into(), read, true, timeout) |
| 383 | // Automatic Stop | 383 | // Automatic Stop |
| 384 | } | 384 | } |
| 385 | 385 | ||
| @@ -388,7 +388,7 @@ impl<'d, M: Mode, IM: MasterMode> I2c<'d, M, IM> { | |||
| 388 | /// Consecutive operations of same type are merged. See [transaction contract] for details. | 388 | /// Consecutive operations of same type are merged. See [transaction contract] for details. |
| 389 | /// | 389 | /// |
| 390 | /// [transaction contract]: embedded_hal_1::i2c::I2c::transaction | 390 | /// [transaction contract]: embedded_hal_1::i2c::I2c::transaction |
| 391 | pub fn blocking_transaction(&mut self, addr: Address, operations: &mut [Operation<'_>]) -> Result<(), Error> { | 391 | pub fn blocking_transaction(&mut self, addr: u8, operations: &mut [Operation<'_>]) -> Result<(), Error> { |
| 392 | let _ = addr; | 392 | let _ = addr; |
| 393 | let _ = operations; | 393 | let _ = operations; |
| 394 | todo!() | 394 | todo!() |
| @@ -397,7 +397,7 @@ impl<'d, M: Mode, IM: MasterMode> I2c<'d, M, IM> { | |||
| 397 | /// Blocking write multiple buffers. | 397 | /// Blocking write multiple buffers. |
| 398 | /// | 398 | /// |
| 399 | /// The buffers are concatenated in a single write transaction. | 399 | /// The buffers are concatenated in a single write transaction. |
| 400 | pub fn blocking_write_vectored(&mut self, address: Address, write: &[&[u8]]) -> Result<(), Error> { | 400 | pub fn blocking_write_vectored(&mut self, address: u8, write: &[&[u8]]) -> Result<(), Error> { |
| 401 | if write.is_empty() { | 401 | if write.is_empty() { |
| 402 | return Err(Error::ZeroLengthTransfer); | 402 | return Err(Error::ZeroLengthTransfer); |
| 403 | } | 403 | } |
| @@ -409,7 +409,7 @@ impl<'d, M: Mode, IM: MasterMode> I2c<'d, M, IM> { | |||
| 409 | 409 | ||
| 410 | if let Err(err) = Self::master_write( | 410 | if let Err(err) = Self::master_write( |
| 411 | self.info, | 411 | self.info, |
| 412 | address, | 412 | address.into(), |
| 413 | first_length.min(255), | 413 | first_length.min(255), |
| 414 | Stop::Software, | 414 | Stop::Software, |
| 415 | (first_length > 255) || (last_slice_index != 0), | 415 | (first_length > 255) || (last_slice_index != 0), |
| @@ -639,13 +639,13 @@ impl<'d, IM: MasterMode> I2c<'d, Async, IM> { | |||
| 639 | // Async public API | 639 | // Async public API |
| 640 | 640 | ||
| 641 | /// Write. | 641 | /// Write. |
| 642 | pub async fn write(&mut self, address: Address, write: &[u8]) -> Result<(), Error> { | 642 | pub async fn write(&mut self, address: u8, write: &[u8]) -> Result<(), Error> { |
| 643 | let timeout = self.timeout(); | 643 | let timeout = self.timeout(); |
| 644 | if write.is_empty() { | 644 | if write.is_empty() { |
| 645 | self.write_internal(address, write, true, timeout) | 645 | self.write_internal(address.into(), write, true, timeout) |
| 646 | } else { | 646 | } else { |
| 647 | timeout | 647 | timeout |
| 648 | .with(self.write_dma_internal(address, write, true, true, timeout)) | 648 | .with(self.write_dma_internal(address.into(), write, true, true, timeout)) |
| 649 | .await | 649 | .await |
| 650 | } | 650 | } |
| 651 | } | 651 | } |
| @@ -676,32 +676,32 @@ impl<'d, IM: MasterMode> I2c<'d, Async, IM> { | |||
| 676 | } | 676 | } |
| 677 | 677 | ||
| 678 | /// Read. | 678 | /// Read. |
| 679 | pub async fn read(&mut self, address: Address, buffer: &mut [u8]) -> Result<(), Error> { | 679 | pub async fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Error> { |
| 680 | let timeout = self.timeout(); | 680 | let timeout = self.timeout(); |
| 681 | 681 | ||
| 682 | if buffer.is_empty() { | 682 | if buffer.is_empty() { |
| 683 | self.read_internal(address, buffer, false, timeout) | 683 | self.read_internal(address.into(), buffer, false, timeout) |
| 684 | } else { | 684 | } else { |
| 685 | let fut = self.read_dma_internal(address, buffer, false, timeout); | 685 | let fut = self.read_dma_internal(address.into(), buffer, false, timeout); |
| 686 | timeout.with(fut).await | 686 | timeout.with(fut).await |
| 687 | } | 687 | } |
| 688 | } | 688 | } |
| 689 | 689 | ||
| 690 | /// Write, restart, read. | 690 | /// Write, restart, read. |
| 691 | pub async fn write_read(&mut self, address: Address, write: &[u8], read: &mut [u8]) -> Result<(), Error> { | 691 | pub async fn write_read(&mut self, address: u8, write: &[u8], read: &mut [u8]) -> Result<(), Error> { |
| 692 | let timeout = self.timeout(); | 692 | let timeout = self.timeout(); |
| 693 | 693 | ||
| 694 | if write.is_empty() { | 694 | if write.is_empty() { |
| 695 | self.write_internal(address, write, false, timeout)?; | 695 | self.write_internal(address.into(), write, false, timeout)?; |
| 696 | } else { | 696 | } else { |
| 697 | let fut = self.write_dma_internal(address, write, true, true, timeout); | 697 | let fut = self.write_dma_internal(address.into(), write, true, true, timeout); |
| 698 | timeout.with(fut).await?; | 698 | timeout.with(fut).await?; |
| 699 | } | 699 | } |
| 700 | 700 | ||
| 701 | if read.is_empty() { | 701 | if read.is_empty() { |
| 702 | self.read_internal(address, read, true, timeout)?; | 702 | self.read_internal(address.into(), read, true, timeout)?; |
| 703 | } else { | 703 | } else { |
| 704 | let fut = self.read_dma_internal(address, read, true, timeout); | 704 | let fut = self.read_dma_internal(address.into(), read, true, timeout); |
| 705 | timeout.with(fut).await?; | 705 | timeout.with(fut).await?; |
| 706 | } | 706 | } |
| 707 | 707 | ||
| @@ -713,7 +713,7 @@ impl<'d, IM: MasterMode> I2c<'d, Async, IM> { | |||
| 713 | /// Consecutive operations of same type are merged. See [transaction contract] for details. | 713 | /// Consecutive operations of same type are merged. See [transaction contract] for details. |
| 714 | /// | 714 | /// |
| 715 | /// [transaction contract]: embedded_hal_1::i2c::I2c::transaction | 715 | /// [transaction contract]: embedded_hal_1::i2c::I2c::transaction |
| 716 | pub async fn transaction(&mut self, addr: Address, operations: &mut [Operation<'_>]) -> Result<(), Error> { | 716 | pub async fn transaction(&mut self, addr: u8, operations: &mut [Operation<'_>]) -> Result<(), Error> { |
| 717 | let _ = addr; | 717 | let _ = addr; |
| 718 | let _ = operations; | 718 | let _ = operations; |
| 719 | todo!() | 719 | todo!() |
| @@ -1232,91 +1232,3 @@ impl<'d, M: Mode> SetConfig for I2c<'d, M, MultiMaster> { | |||
| 1232 | Ok(()) | 1232 | Ok(()) |
| 1233 | } | 1233 | } |
| 1234 | } | 1234 | } |
| 1235 | |||
| 1236 | // ======== Embedded HAL impls ======== | ||
| 1237 | |||
| 1238 | impl<'d, M: Mode, IM: MasterMode, A: embedded_hal_02::blocking::i2c::AddressMode> | ||
| 1239 | embedded_hal_02::blocking::i2c::Read<A> for I2c<'d, M, IM> | ||
| 1240 | where | ||
| 1241 | A: Into<Address>, | ||
| 1242 | { | ||
| 1243 | type Error = Error; | ||
| 1244 | |||
| 1245 | fn read(&mut self, address: A, buffer: &mut [u8]) -> Result<(), Self::Error> { | ||
| 1246 | self.blocking_read(address.into(), buffer) | ||
| 1247 | } | ||
| 1248 | } | ||
| 1249 | |||
| 1250 | impl<'d, M: Mode, IM: MasterMode, A: embedded_hal_02::blocking::i2c::AddressMode> | ||
| 1251 | embedded_hal_02::blocking::i2c::Write<A> for I2c<'d, M, IM> | ||
| 1252 | where | ||
| 1253 | A: Into<Address>, | ||
| 1254 | { | ||
| 1255 | type Error = Error; | ||
| 1256 | |||
| 1257 | fn write(&mut self, address: A, write: &[u8]) -> Result<(), Self::Error> { | ||
| 1258 | self.blocking_write(address.into(), write) | ||
| 1259 | } | ||
| 1260 | } | ||
| 1261 | |||
| 1262 | impl<'d, M: Mode, IM: MasterMode, A: embedded_hal_02::blocking::i2c::AddressMode> | ||
| 1263 | embedded_hal_02::blocking::i2c::WriteRead<A> for I2c<'d, M, IM> | ||
| 1264 | where | ||
| 1265 | A: Into<Address>, | ||
| 1266 | { | ||
| 1267 | type Error = Error; | ||
| 1268 | |||
| 1269 | fn write_read(&mut self, address: A, write: &[u8], read: &mut [u8]) -> Result<(), Self::Error> { | ||
| 1270 | self.blocking_write_read(address.into(), write, read) | ||
| 1271 | } | ||
| 1272 | } | ||
| 1273 | |||
| 1274 | impl<'d, M: Mode, IM: MasterMode, A: embedded_hal_1::i2c::AddressMode> embedded_hal_1::i2c::I2c<A> for I2c<'d, M, IM> | ||
| 1275 | where | ||
| 1276 | Address: From<A>, | ||
| 1277 | { | ||
| 1278 | fn read(&mut self, address: A, read: &mut [u8]) -> Result<(), Self::Error> { | ||
| 1279 | self.blocking_read(address.into(), read) | ||
| 1280 | } | ||
| 1281 | |||
| 1282 | fn write(&mut self, address: A, write: &[u8]) -> Result<(), Self::Error> { | ||
| 1283 | self.blocking_write(address.into(), write) | ||
| 1284 | } | ||
| 1285 | |||
| 1286 | fn write_read(&mut self, address: A, write: &[u8], read: &mut [u8]) -> Result<(), Self::Error> { | ||
| 1287 | self.blocking_write_read(address.into(), write, read) | ||
| 1288 | } | ||
| 1289 | |||
| 1290 | fn transaction( | ||
| 1291 | &mut self, | ||
| 1292 | address: A, | ||
| 1293 | operations: &mut [embedded_hal_1::i2c::Operation<'_>], | ||
| 1294 | ) -> Result<(), Self::Error> { | ||
| 1295 | self.blocking_transaction(address.into(), operations) | ||
| 1296 | } | ||
| 1297 | } | ||
| 1298 | |||
| 1299 | impl<'d, IM: MasterMode, A: embedded_hal_async::i2c::AddressMode> embedded_hal_async::i2c::I2c<A> for I2c<'d, Async, IM> | ||
| 1300 | where | ||
| 1301 | Address: From<A>, | ||
| 1302 | { | ||
| 1303 | async fn read(&mut self, address: A, read: &mut [u8]) -> Result<(), Self::Error> { | ||
| 1304 | self.read(address.into(), read).await | ||
| 1305 | } | ||
| 1306 | |||
| 1307 | async fn write(&mut self, address: A, write: &[u8]) -> Result<(), Self::Error> { | ||
| 1308 | self.write(address.into(), write).await | ||
| 1309 | } | ||
| 1310 | |||
| 1311 | async fn write_read(&mut self, address: A, write: &[u8], read: &mut [u8]) -> Result<(), Self::Error> { | ||
| 1312 | self.write_read(address.into(), write, read).await | ||
| 1313 | } | ||
| 1314 | |||
| 1315 | async fn transaction( | ||
| 1316 | &mut self, | ||
| 1317 | address: A, | ||
| 1318 | operations: &mut [embedded_hal_1::i2c::Operation<'_>], | ||
| 1319 | ) -> Result<(), Self::Error> { | ||
| 1320 | self.transaction(address.into(), operations).await | ||
| 1321 | } | ||
| 1322 | } | ||
