diff options
| author | Dion Dokter <[email protected]> | 2024-08-05 15:07:51 +0200 |
|---|---|---|
| committer | Dion Dokter <[email protected]> | 2024-08-05 15:07:51 +0200 |
| commit | 3cd20814501d03852a3c30facbd204dffcf048db (patch) | |
| tree | 7d813088df72bffe64b40f531028f9864076fbaa /tests/stm32/src/common.rs | |
| parent | 5884576b88e7ec7e26ec1c9b9f61e253cb0e5ea6 (diff) | |
Fix tests
Diffstat (limited to 'tests/stm32/src/common.rs')
| -rw-r--r-- | tests/stm32/src/common.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/stm32/src/common.rs b/tests/stm32/src/common.rs index 4e0231858..649eac6f6 100644 --- a/tests/stm32/src/common.rs +++ b/tests/stm32/src/common.rs | |||
| @@ -699,3 +699,21 @@ pub fn config() -> Config { | |||
| 699 | 699 | ||
| 700 | config | 700 | config |
| 701 | } | 701 | } |
| 702 | |||
| 703 | #[allow(unused)] | ||
| 704 | pub fn init() -> embassy_stm32::Peripherals { | ||
| 705 | init_with_config(config()) | ||
| 706 | } | ||
| 707 | |||
| 708 | #[allow(unused)] | ||
| 709 | pub fn init_with_config(config: Config) -> embassy_stm32::Peripherals { | ||
| 710 | #[cfg(feature = "stm32wl55jc")] | ||
| 711 | { | ||
| 712 | // Not in shared memory, but we're not running the second core, so it's fine | ||
| 713 | static SHARED_DATA: core::mem::MaybeUninit<embassy_stm32::SharedData> = core::mem::MaybeUninit::uninit(); | ||
| 714 | embassy_stm32::init_primary(config, &SHARED_DATA) | ||
| 715 | } | ||
| 716 | |||
| 717 | #[cfg(not(feature = "stm32wl55jc"))] | ||
| 718 | embassy_stm32::init(config) | ||
| 719 | } | ||
