diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/stm32/src/bin/spi.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/stm32/src/bin/spi.rs b/tests/stm32/src/bin/spi.rs index 59cb0cfd3..c1576bfeb 100644 --- a/tests/stm32/src/bin/spi.rs +++ b/tests/stm32/src/bin/spi.rs | |||
| @@ -58,6 +58,14 @@ async fn main(_spawner: Spawner) { | |||
| 58 | spi.blocking_read::<u8>(&mut []).unwrap(); | 58 | spi.blocking_read::<u8>(&mut []).unwrap(); |
| 59 | spi.blocking_write::<u8>(&[]).unwrap(); | 59 | spi.blocking_write::<u8>(&[]).unwrap(); |
| 60 | 60 | ||
| 61 | // Assert the RCC bit gets disabled on drop. | ||
| 62 | #[cfg(feature = "stm32f429zi")] | ||
| 63 | { | ||
| 64 | defmt::assert!(embassy_stm32::pac::RCC.apb2enr().read().spi1en()); | ||
| 65 | drop(spi); | ||
| 66 | defmt::assert!(!embassy_stm32::pac::RCC.apb2enr().read().spi1en()); | ||
| 67 | } | ||
| 68 | |||
| 61 | info!("Test OK"); | 69 | info!("Test OK"); |
| 62 | cortex_m::asm::bkpt(); | 70 | cortex_m::asm::bkpt(); |
| 63 | } | 71 | } |
