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::timer::Instance as TimerInstance;
|
||||
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
|
||||
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};
|
||||
|
||||
#[cfg(feature = "nrf9160")]
|
||||
use crate::pac::CLOCK_NS as CLOCK;
|
||||
#[cfg(not(feature = "nrf9160"))]
|
||||
use crate::pac::CLOCK;
|
||||
#[cfg(feature = "nrf9160")]
|
||||
use crate::pac::CLOCK_NS as CLOCK;
|
||||
|
||||
pub mod interrupt {
|
||||
pub use crate::chip::irqs::*;
|
||||
|
|
|
@ -18,10 +18,10 @@ use embassy_hal_common::{unborrow, unsafe_impl_unborrow};
|
|||
|
||||
use crate::{pac, peripherals};
|
||||
|
||||
#[cfg(not(feature = "nrf9160"))]
|
||||
pub(crate) use pac::PPI;
|
||||
#[cfg(feature = "nrf9160")]
|
||||
pub(crate) use pac::DPPIC_NS as PPI;
|
||||
#[cfg(not(feature = "nrf9160"))]
|
||||
pub(crate) use pac::PPI;
|
||||
|
||||
// ======================
|
||||
// driver
|
||||
|
|
|
@ -16,7 +16,6 @@ pub(crate) use pac::pwm0;
|
|||
#[cfg(feature = "nrf9160")]
|
||||
pub(crate) use pac::pwm0_ns as pwm0;
|
||||
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Copy)]
|
||||
pub enum Prescaler {
|
||||
Div1,
|
||||
|
|
|
@ -16,9 +16,13 @@ pub(crate) use pac::rtc0_ns as rtc0;
|
|||
|
||||
fn rtc() -> &'static rtc0::RegisterBlock {
|
||||
#[cfg(not(feature = "nrf9160"))]
|
||||
unsafe { &*pac::RTC1::ptr() }
|
||||
unsafe {
|
||||
&*pac::RTC1::ptr()
|
||||
}
|
||||
#[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
|
||||
|
|
|
@ -184,7 +184,7 @@ impl<'d, T: Instance> Twim<'d, T> {
|
|||
// The PTR field is a full 32 bits wide and accepts the full range
|
||||
// of values.
|
||||
w.ptr().bits(buffer.as_mut_ptr() as u32));
|
||||
r.rxd.maxcnt.write(|w|
|
||||
r.rxd.maxcnt.write(|w|
|
||||
// We're giving it the length of the buffer, so no danger of
|
||||
// accessing invalid memory. We have verified that the length of the
|
||||
// buffer fits in an `u8`, so the cast to the type of maxcnt
|
||||
|
|
Loading…
Reference in a new issue