Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions embassy-stm32/src/i2c/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1075,8 +1075,6 @@ impl<'d, IM: MasterMode> I2c<'d, Async, IM> {

/// Write.
pub async fn write(&mut self, address: u8, write: &[u8]) -> Result<(), Error> {
#[cfg(all(feature = "low-power", stm32wlex))]
let _device_busy = crate::low_power::DeviceBusy::new_stop1();
let timeout = self.timeout();
if write.is_empty() {
self.write_internal(address.into(), write, true, timeout)
Expand All @@ -1091,8 +1089,6 @@ impl<'d, IM: MasterMode> I2c<'d, Async, IM> {
///
/// The buffers are concatenated in a single write transaction.
pub async fn write_vectored(&mut self, address: Address, write: &[&[u8]]) -> Result<(), Error> {
#[cfg(all(feature = "low-power", stm32wlex))]
let _device_busy = crate::low_power::DeviceBusy::new_stop1();
let timeout = self.timeout();

if write.is_empty() {
Expand Down Expand Up @@ -1124,8 +1120,6 @@ impl<'d, IM: MasterMode> I2c<'d, Async, IM> {

/// Read.
pub async fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Error> {
#[cfg(all(feature = "low-power", stm32wlex))]
let _device_busy = crate::low_power::DeviceBusy::new_stop1();
let timeout = self.timeout();

if buffer.is_empty() {
Expand All @@ -1138,8 +1132,6 @@ impl<'d, IM: MasterMode> I2c<'d, Async, IM> {

/// Write, restart, read.
pub async fn write_read(&mut self, address: u8, write: &[u8], read: &mut [u8]) -> Result<(), Error> {
#[cfg(all(feature = "low-power", stm32wlex))]
let _device_busy = crate::low_power::DeviceBusy::new_stop1();
let timeout = self.timeout();

if write.is_empty() {
Expand All @@ -1165,9 +1157,6 @@ impl<'d, IM: MasterMode> I2c<'d, Async, IM> {
///
/// [transaction contract]: embedded_hal_1::i2c::I2c::transaction
pub async fn transaction(&mut self, addr: u8, operations: &mut [Operation<'_>]) -> Result<(), Error> {
#[cfg(all(feature = "low-power", stm32wlex))]
let _device_busy = crate::low_power::DeviceBusy::new_stop1();

if operations.is_empty() {
return Err(Error::ZeroLengthTransfer);
}
Expand Down
Loading