aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/uarte.rs
diff options
context:
space:
mode:
authorDion Dokter <[email protected]>2021-10-12 11:43:57 +0200
committerDion Dokter <[email protected]>2021-10-12 11:55:38 +0200
commit2c2c284482ee57595ad4eef542f4867f6f87bf12 (patch)
tree68a5fac20355ad7451a4e10d82f396573942e7f8 /embassy-nrf/src/uarte.rs
parent995cd01cbcb2470b9ecdd953daae0cfb3aaa2e99 (diff)
Undoing unnecessary changes
Diffstat (limited to 'embassy-nrf/src/uarte.rs')
-rw-r--r--embassy-nrf/src/uarte.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/embassy-nrf/src/uarte.rs b/embassy-nrf/src/uarte.rs
index 286e324b0..320426060 100644
--- a/embassy-nrf/src/uarte.rs
+++ b/embassy-nrf/src/uarte.rs
@@ -22,13 +22,8 @@ use crate::ppi::{AnyConfigurableChannel, ConfigurableChannel, Event, Ppi, Task};
22use crate::timer::Instance as TimerInstance; 22use crate::timer::Instance as TimerInstance;
23use crate::timer::{Frequency, Timer}; 23use crate::timer::{Frequency, Timer};
24 24
25#[cfg(not(feature = "nrf9160"))]
26pub(crate) use pac::uarte0;
27#[cfg(feature = "nrf9160")]
28pub(crate) use pac::uarte0_ns as uarte0;
29
30// Re-export SVD variants to allow user to directly set values. 25// Re-export SVD variants to allow user to directly set values.
31pub use uarte0::{baudrate::BAUDRATE_A as Baudrate, config::PARITY_A as Parity}; 26pub use pac::uarte0::{baudrate::BAUDRATE_A as Baudrate, config::PARITY_A as Parity};
32 27
33#[non_exhaustive] 28#[non_exhaustive]
34pub struct Config { 29pub struct Config {
@@ -463,7 +458,7 @@ pub(crate) mod sealed {
463 } 458 }
464 459
465 pub trait Instance { 460 pub trait Instance {
466 fn regs() -> &'static uarte0::RegisterBlock; 461 fn regs() -> &'static pac::uarte0::RegisterBlock;
467 fn state() -> &'static State; 462 fn state() -> &'static State;
468 } 463 }
469} 464}
@@ -475,7 +470,7 @@ pub trait Instance: Unborrow<Target = Self> + sealed::Instance + 'static + Send
475macro_rules! impl_uarte { 470macro_rules! impl_uarte {
476 ($type:ident, $pac_type:ident, $irq:ident) => { 471 ($type:ident, $pac_type:ident, $irq:ident) => {
477 impl crate::uarte::sealed::Instance for peripherals::$type { 472 impl crate::uarte::sealed::Instance for peripherals::$type {
478 fn regs() -> &'static crate::uarte::uarte0::RegisterBlock { 473 fn regs() -> &'static pac::uarte0::RegisterBlock {
479 unsafe { &*pac::$pac_type::ptr() } 474 unsafe { &*pac::$pac_type::ptr() }
480 } 475 }
481 fn state() -> &'static crate::uarte::sealed::State { 476 fn state() -> &'static crate::uarte::sealed::State {