diff options
| author | Ulf Lilleengen <[email protected]> | 2024-01-20 16:24:02 +0100 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2024-01-24 21:23:54 +0100 |
| commit | 53ea850d289384ea1810419b980ad73bcd556a04 (patch) | |
| tree | 05fbc7b91d4afc8a99eee29cd6f00962eb353b35 | |
| parent | 2a810a1a6ad5351ef2248133855dc01ba4b7a76b (diff) | |
rustfmt again
| -rw-r--r-- | embassy-nrf/src/gpio.rs | 11 | ||||
| -rw-r--r-- | embassy-nrf/src/rng.rs | 2 | ||||
| -rw-r--r-- | embassy-nrf/src/time_driver.rs | 2 |
3 files changed, 6 insertions, 9 deletions
diff --git a/embassy-nrf/src/gpio.rs b/embassy-nrf/src/gpio.rs index 164363460..b1eb8ae87 100644 --- a/embassy-nrf/src/gpio.rs +++ b/embassy-nrf/src/gpio.rs | |||
| @@ -8,17 +8,14 @@ use cfg_if::cfg_if; | |||
| 8 | use embassy_hal_internal::{impl_peripheral, into_ref, PeripheralRef}; | 8 | use embassy_hal_internal::{impl_peripheral, into_ref, PeripheralRef}; |
| 9 | 9 | ||
| 10 | use self::sealed::Pin as _; | 10 | use self::sealed::Pin as _; |
| 11 | |||
| 12 | #[cfg(not(feature = "nrf51"))] | ||
| 13 | use crate::pac::p0 as gpio; | ||
| 14 | #[cfg(not(feature = "nrf51"))] | ||
| 15 | use crate::pac::p0::pin_cnf::{DRIVE_A, PULL_A}; | ||
| 16 | |||
| 17 | #[cfg(feature = "nrf51")] | 11 | #[cfg(feature = "nrf51")] |
| 18 | use crate::pac::gpio; | 12 | use crate::pac::gpio; |
| 19 | #[cfg(feature = "nrf51")] | 13 | #[cfg(feature = "nrf51")] |
| 20 | use crate::pac::gpio::pin_cnf::{DRIVE_A, PULL_A}; | 14 | use crate::pac::gpio::pin_cnf::{DRIVE_A, PULL_A}; |
| 21 | 15 | #[cfg(not(feature = "nrf51"))] | |
| 16 | use crate::pac::p0 as gpio; | ||
| 17 | #[cfg(not(feature = "nrf51"))] | ||
| 18 | use crate::pac::p0::pin_cnf::{DRIVE_A, PULL_A}; | ||
| 22 | use crate::{pac, Peripheral}; | 19 | use crate::{pac, Peripheral}; |
| 23 | 20 | ||
| 24 | /// A GPIO port with up to 32 pins. | 21 | /// A GPIO port with up to 32 pins. |
diff --git a/embassy-nrf/src/rng.rs b/embassy-nrf/src/rng.rs index 79088b25d..966097578 100644 --- a/embassy-nrf/src/rng.rs +++ b/embassy-nrf/src/rng.rs | |||
| @@ -6,11 +6,11 @@ use core::future::poll_fn; | |||
| 6 | use core::marker::PhantomData; | 6 | use core::marker::PhantomData; |
| 7 | use core::ptr; | 7 | use core::ptr; |
| 8 | use core::task::Poll; | 8 | use core::task::Poll; |
| 9 | use portable_atomic::{AtomicPtr, Ordering}; | ||
| 10 | 9 | ||
| 11 | use embassy_hal_internal::drop::OnDrop; | 10 | use embassy_hal_internal::drop::OnDrop; |
| 12 | use embassy_hal_internal::{into_ref, PeripheralRef}; | 11 | use embassy_hal_internal::{into_ref, PeripheralRef}; |
| 13 | use embassy_sync::waitqueue::AtomicWaker; | 12 | use embassy_sync::waitqueue::AtomicWaker; |
| 13 | use portable_atomic::{AtomicPtr, Ordering}; | ||
| 14 | 14 | ||
| 15 | use crate::interrupt::typelevel::Interrupt; | 15 | use crate::interrupt::typelevel::Interrupt; |
| 16 | use crate::{interrupt, Peripheral}; | 16 | use crate::{interrupt, Peripheral}; |
diff --git a/embassy-nrf/src/time_driver.rs b/embassy-nrf/src/time_driver.rs index 855d133df..0f31c5c9c 100644 --- a/embassy-nrf/src/time_driver.rs +++ b/embassy-nrf/src/time_driver.rs | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | use core::cell::Cell; | 1 | use core::cell::Cell; |
| 2 | use core::{mem, ptr}; | 2 | use core::{mem, ptr}; |
| 3 | use portable_atomic::{compiler_fence, AtomicU32, AtomicU8, Ordering}; | ||
| 4 | 3 | ||
| 5 | use critical_section::CriticalSection; | 4 | use critical_section::CriticalSection; |
| 6 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | 5 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; |
| 7 | use embassy_sync::blocking_mutex::CriticalSectionMutex as Mutex; | 6 | use embassy_sync::blocking_mutex::CriticalSectionMutex as Mutex; |
| 8 | use embassy_time_driver::{AlarmHandle, Driver}; | 7 | use embassy_time_driver::{AlarmHandle, Driver}; |
| 8 | use portable_atomic::{compiler_fence, AtomicU32, AtomicU8, Ordering}; | ||
| 9 | 9 | ||
| 10 | use crate::interrupt::InterruptExt; | 10 | use crate::interrupt::InterruptExt; |
| 11 | use crate::{interrupt, pac}; | 11 | use crate::{interrupt, pac}; |
