From 9c5d4d9f8abe498b903c74293116d0ecce245b8a Mon Sep 17 00:00:00 2001 From: Thales Fragoso Date: Sun, 23 May 2021 17:22:07 -0300 Subject: [PATCH] STM32 Clock: Use atomic-polyfill --- embassy-stm32/Cargo.toml | 1 + embassy-stm32/src/clock.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index ae92e0002..43d5250e5 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml @@ -21,6 +21,7 @@ sdio-host = { version = "0.5.0", optional = true } embedded-sdmmc = { git = "https://github.com/thalesfragoso/embedded-sdmmc-rs", branch = "async", optional = true } critical-section = "0.2.1" bare-metal = "1.0.0" +atomic-polyfill = "0.1.2" [build-dependencies] regex = "1.4.6" diff --git a/embassy-stm32/src/clock.rs b/embassy-stm32/src/clock.rs index b4f735efa..709a2d36c 100644 --- a/embassy-stm32/src/clock.rs +++ b/embassy-stm32/src/clock.rs @@ -2,8 +2,9 @@ use core::cell::Cell; use core::convert::TryInto; -use core::sync::atomic::{compiler_fence, AtomicU32, Ordering}; +use core::sync::atomic::{compiler_fence, Ordering}; +use atomic_polyfill::AtomicU32; use embassy::interrupt::InterruptExt; use embassy::time::{Clock as EmbassyClock, TICKS_PER_SECOND};