ran fmt
This commit is contained in:
parent
4643727fea
commit
995cd01cbc
6 changed files with 12 additions and 9 deletions
|
@ -17,7 +17,7 @@ use crate::gpio::{OptionalPin as GpioOptionalPin, Pin as GpioPin};
|
||||||
use crate::ppi::{AnyConfigurableChannel, ConfigurableChannel, Event, Ppi, Task};
|
use crate::ppi::{AnyConfigurableChannel, ConfigurableChannel, Event, Ppi, Task};
|
||||||
use crate::timer::Instance as TimerInstance;
|
use crate::timer::Instance as TimerInstance;
|
||||||
use crate::timer::{Frequency, Timer};
|
use crate::timer::{Frequency, Timer};
|
||||||
use crate::uarte::{Config, Instance as UarteInstance, uarte0};
|
use crate::uarte::{uarte0, Config, Instance as UarteInstance};
|
||||||
|
|
||||||
// Re-export SVD variants to allow user to directly set values
|
// Re-export SVD variants to allow user to directly set values
|
||||||
pub use uarte0::{baudrate::BAUDRATE_A as Baudrate, config::PARITY_A as Parity};
|
pub use uarte0::{baudrate::BAUDRATE_A as Baudrate, config::PARITY_A as Parity};
|
||||||
|
|
|
@ -79,10 +79,10 @@ pub(crate) use chip::pac;
|
||||||
|
|
||||||
pub use chip::{peripherals, Peripherals};
|
pub use chip::{peripherals, Peripherals};
|
||||||
|
|
||||||
#[cfg(feature = "nrf9160")]
|
|
||||||
use crate::pac::CLOCK_NS as CLOCK;
|
|
||||||
#[cfg(not(feature = "nrf9160"))]
|
#[cfg(not(feature = "nrf9160"))]
|
||||||
use crate::pac::CLOCK;
|
use crate::pac::CLOCK;
|
||||||
|
#[cfg(feature = "nrf9160")]
|
||||||
|
use crate::pac::CLOCK_NS as CLOCK;
|
||||||
|
|
||||||
pub mod interrupt {
|
pub mod interrupt {
|
||||||
pub use crate::chip::irqs::*;
|
pub use crate::chip::irqs::*;
|
||||||
|
|
|
@ -18,10 +18,10 @@ use embassy_hal_common::{unborrow, unsafe_impl_unborrow};
|
||||||
|
|
||||||
use crate::{pac, peripherals};
|
use crate::{pac, peripherals};
|
||||||
|
|
||||||
#[cfg(not(feature = "nrf9160"))]
|
|
||||||
pub(crate) use pac::PPI;
|
|
||||||
#[cfg(feature = "nrf9160")]
|
#[cfg(feature = "nrf9160")]
|
||||||
pub(crate) use pac::DPPIC_NS as PPI;
|
pub(crate) use pac::DPPIC_NS as PPI;
|
||||||
|
#[cfg(not(feature = "nrf9160"))]
|
||||||
|
pub(crate) use pac::PPI;
|
||||||
|
|
||||||
// ======================
|
// ======================
|
||||||
// driver
|
// driver
|
||||||
|
|
|
@ -16,7 +16,6 @@ pub(crate) use pac::pwm0;
|
||||||
#[cfg(feature = "nrf9160")]
|
#[cfg(feature = "nrf9160")]
|
||||||
pub(crate) use pac::pwm0_ns as pwm0;
|
pub(crate) use pac::pwm0_ns as pwm0;
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Clone, Copy)]
|
#[derive(Debug, Eq, PartialEq, Clone, Copy)]
|
||||||
pub enum Prescaler {
|
pub enum Prescaler {
|
||||||
Div1,
|
Div1,
|
||||||
|
|
|
@ -16,9 +16,13 @@ pub(crate) use pac::rtc0_ns as rtc0;
|
||||||
|
|
||||||
fn rtc() -> &'static rtc0::RegisterBlock {
|
fn rtc() -> &'static rtc0::RegisterBlock {
|
||||||
#[cfg(not(feature = "nrf9160"))]
|
#[cfg(not(feature = "nrf9160"))]
|
||||||
unsafe { &*pac::RTC1::ptr() }
|
unsafe {
|
||||||
|
&*pac::RTC1::ptr()
|
||||||
|
}
|
||||||
#[cfg(feature = "nrf9160")]
|
#[cfg(feature = "nrf9160")]
|
||||||
unsafe { &*pac::RTC1_NS::ptr() }
|
unsafe {
|
||||||
|
&*pac::RTC1_NS::ptr()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RTC timekeeping works with something we call "periods", which are time intervals
|
// RTC timekeeping works with something we call "periods", which are time intervals
|
||||||
|
|
Loading…
Reference in a new issue