diff options
| author | Piotr Esden-Tempski <[email protected]> | 2024-12-17 14:45:52 -0800 |
|---|---|---|
| committer | Piotr Esden-Tempski <[email protected]> | 2024-12-17 14:45:52 -0800 |
| commit | b2e82684707e8675f61bba01e818947ba536d3c7 (patch) | |
| tree | adf19597cb736a8e928c9290b6b28f9ddd9e4a61 | |
| parent | 0c245892c6812538f4f51b784ed8afa1ce47f25d (diff) | |
stm32/(o|q)spi: command naming convention fix
The naming convention is to prefix blocking functions with blocking. As
both command implementations are blocking the async for the ospi
implementation should also be dropped.
| -rw-r--r-- | embassy-stm32/src/ospi/mod.rs | 2 | ||||
| -rw-r--r-- | embassy-stm32/src/qspi/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/embassy-stm32/src/ospi/mod.rs b/embassy-stm32/src/ospi/mod.rs index f8ef66216..38217a9a4 100644 --- a/embassy-stm32/src/ospi/mod.rs +++ b/embassy-stm32/src/ospi/mod.rs | |||
| @@ -520,7 +520,7 @@ impl<'d, T: Instance, M: PeriMode> Ospi<'d, T, M> { | |||
| 520 | } | 520 | } |
| 521 | 521 | ||
| 522 | /// Function used to control or configure the target device without data transfer | 522 | /// Function used to control or configure the target device without data transfer |
| 523 | pub async fn command(&mut self, command: &TransferConfig) -> Result<(), OspiError> { | 523 | pub fn blocking_command(&mut self, command: &TransferConfig) -> Result<(), OspiError> { |
| 524 | // Wait for peripheral to be free | 524 | // Wait for peripheral to be free |
| 525 | while T::REGS.sr().read().busy() {} | 525 | while T::REGS.sr().read().busy() {} |
| 526 | 526 | ||
diff --git a/embassy-stm32/src/qspi/mod.rs b/embassy-stm32/src/qspi/mod.rs index 49836aa57..0c65d0556 100644 --- a/embassy-stm32/src/qspi/mod.rs +++ b/embassy-stm32/src/qspi/mod.rs | |||
| @@ -148,7 +148,7 @@ impl<'d, T: Instance, M: PeriMode> Qspi<'d, T, M> { | |||
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | /// Do a QSPI command. | 150 | /// Do a QSPI command. |
| 151 | pub fn command(&mut self, transaction: TransferConfig) { | 151 | pub fn blocking_command(&mut self, transaction: TransferConfig) { |
| 152 | #[cfg(not(stm32h7))] | 152 | #[cfg(not(stm32h7))] |
| 153 | T::REGS.cr().modify(|v| v.set_dmaen(false)); | 153 | T::REGS.cr().modify(|v| v.set_dmaen(false)); |
| 154 | self.setup_transaction(QspiMode::IndirectWrite, &transaction, None); | 154 | self.setup_transaction(QspiMode::IndirectWrite, &transaction, None); |
