From 03aecafc9d0a6de4bd79d76befe5e370fb2c3b60 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 12 Aug 2019 13:13:03 -0400 Subject: [PATCH] Enable UARTE1 for 52840 MCUs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is mentioned in the datasheet in ยง4.2 Table 3 (Instantiation Table). And exists in the PAC for this chipset. Tested with a nrf52840-mdk board. --- nrf52-hal-common/src/uarte.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nrf52-hal-common/src/uarte.rs b/nrf52-hal-common/src/uarte.rs index a2804f65..d078b38b 100644 --- a/nrf52-hal-common/src/uarte.rs +++ b/nrf52-hal-common/src/uarte.rs @@ -8,6 +8,9 @@ use core::ops::Deref; use core::sync::atomic::{compiler_fence, Ordering::SeqCst}; use core::fmt; +#[cfg(feature="52840")] +use crate::target::UARTE1; + #[cfg(feature="9160")] use crate::target::{ uarte0_ns as uarte0, @@ -393,5 +396,5 @@ pub trait Instance: Deref {} impl Instance for UARTE0 {} -#[cfg(feature="9160")] +#[cfg(any(feature="52840", feature="9160"))] impl Instance for UARTE1 {}