diff options
| author | xoviat <[email protected]> | 2021-03-29 09:02:23 -0500 |
|---|---|---|
| committer | xoviat <[email protected]> | 2021-03-29 09:02:23 -0500 |
| commit | a3d876bf46087973c6640c291ac90debe3aca562 (patch) | |
| tree | b49603decb7bbc894c74ff97fa30f644cfb2ed1c | |
| parent | 50ecb7d42b74d6bd0af91310d6d02c1a4a6531dd (diff) | |
take clocks on peripheral take
| -rw-r--r-- | embassy-extras/src/macros.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-extras/src/macros.rs b/embassy-extras/src/macros.rs index e57b89ec7..5ce14a76d 100644 --- a/embassy-extras/src/macros.rs +++ b/embassy-extras/src/macros.rs | |||
| @@ -122,7 +122,7 @@ macro_rules! std_peripherals { | |||
| 122 | 122 | ||
| 123 | impl Peripherals { | 123 | impl Peripherals { |
| 124 | pub fn take() -> Option<(Peripherals, Clocks)> { | 124 | pub fn take() -> Option<(Peripherals, Clocks)> { |
| 125 | match unsafe {GLOBAL_CLOCKS} { | 125 | match unsafe {GLOBAL_CLOCKS.take()} { |
| 126 | Some(clocks) => { | 126 | Some(clocks) => { |
| 127 | let dp = unsafe { pac::Peripherals::steal() }; | 127 | let dp = unsafe { pac::Peripherals::steal() }; |
| 128 | let peripherals = Peripherals { | 128 | let peripherals = Peripherals { |
