From 3c31236c1050f98c870ec03b98bc746e6e2ab1b5 Mon Sep 17 00:00:00 2001 From: pennae Date: Tue, 2 May 2023 07:40:12 +0200 Subject: [PATCH] rp: remove leftovers from #1414 forgot to remove these when they were no longer necessary or useful. oops. --- embassy-rp/src/uart/mod.rs | 8 +++----- tests/rp/src/bin/uart_dma.rs | 4 ---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/embassy-rp/src/uart/mod.rs b/embassy-rp/src/uart/mod.rs index ebe32cc66..4084c158a 100644 --- a/embassy-rp/src/uart/mod.rs +++ b/embassy-rp/src/uart/mod.rs @@ -874,7 +874,6 @@ mod sealed { pub trait Instance { const TX_DREQ: u8; const RX_DREQ: u8; - const ID: usize; type Interrupt: crate::interrupt::Interrupt; @@ -909,11 +908,10 @@ impl_mode!(Async); pub trait Instance: sealed::Instance {} macro_rules! impl_instance { - ($inst:ident, $irq:ident, $id:expr, $tx_dreq:expr, $rx_dreq:expr) => { + ($inst:ident, $irq:ident, $tx_dreq:expr, $rx_dreq:expr) => { impl sealed::Instance for peripherals::$inst { const TX_DREQ: u8 = $tx_dreq; const RX_DREQ: u8 = $rx_dreq; - const ID: usize = $id; type Interrupt = crate::interrupt::$irq; @@ -939,8 +937,8 @@ macro_rules! impl_instance { }; } -impl_instance!(UART0, UART0_IRQ, 0, 20, 21); -impl_instance!(UART1, UART1_IRQ, 1, 22, 23); +impl_instance!(UART0, UART0_IRQ, 20, 21); +impl_instance!(UART1, UART1_IRQ, 22, 23); pub trait TxPin: sealed::TxPin + crate::gpio::Pin {} pub trait RxPin: sealed::RxPin + crate::gpio::Pin {} diff --git a/tests/rp/src/bin/uart_dma.rs b/tests/rp/src/bin/uart_dma.rs index 92aa205c9..52f42e582 100644 --- a/tests/rp/src/bin/uart_dma.rs +++ b/tests/rp/src/bin/uart_dma.rs @@ -53,10 +53,6 @@ async fn main(_spawner: Spawner) { let (mut tx, mut rx, mut uart) = (p.PIN_0, p.PIN_1, p.UART0); let mut irq = interrupt::take!(UART0_IRQ); - // TODO - // nuclear error reporting. just abort the entire transfer and invalidate the - // dma buffer, buffered buffer, fifo etc. - // We can't send too many bytes, they have to fit in the FIFO. // This is because we aren't sending+receiving at the same time. {