From c50a5b60014292ab8d4d5dc0bf318d363dd4a08a Mon Sep 17 00:00:00 2001 From: Nic0w Date: Sun, 25 Apr 2021 20:24:56 +0200 Subject: [PATCH] Cosmetics. --- rp2040-hal/src/uart.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/rp2040-hal/src/uart.rs b/rp2040-hal/src/uart.rs index 2f59c00..d04b054 100644 --- a/rp2040-hal/src/uart.rs +++ b/rp2040-hal/src/uart.rs @@ -7,19 +7,25 @@ use embedded_time::rate::Baud; use embedded_time::rate::Hertz; use embedded_time::fixed_point::FixedPoint; use nb::Error::WouldBlock; -use rp2040_pac::{ - uart0::uartlcr_h::W as UART_LCR_H_Writer -}; +use crate::pac::{ + uart0::{ + uartlcr_h::W as UART_LCR_H_Writer, + RegisterBlock + }, + UART0, + UART1 + +}; /// State of the UART Peripheral. pub trait State {} /// Trait to handle both underlying devices (UART0 & UART1) -pub trait UARTDevice: Deref {} +pub trait UARTDevice: Deref {} -impl UARTDevice for rp2040_pac::UART0 {} -impl UARTDevice for rp2040_pac::UART1 {} +impl UARTDevice for UART0 {} +impl UARTDevice for UART1 {} /// UART is enabled. pub struct Enabled;