aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgoueslati <[email protected]>2023-05-02 14:18:39 +0100
committergoueslati <[email protected]>2023-05-02 14:18:39 +0100
commit0c07eef3a98279d6beea22dfa8e29d4f28c8be72 (patch)
tree116892a5783ec09b5c215d4cc0995da216f9e63a
parent371a80e1a2fc08aa6c4cb98326df19725b14f502 (diff)
parent0107f83b53907be7c284c6a983433c9d55b593cd (diff)
Merge branch 'tl_mbox' of https://github.com/OueslatiGhaith/embassy into tl_mbox
merge
-rw-r--r--embassy-rp/src/uart/mod.rs8
-rw-r--r--tests/rp/src/bin/uart_dma.rs4
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 {
874 pub trait Instance { 874 pub trait Instance {
875 const TX_DREQ: u8; 875 const TX_DREQ: u8;
876 const RX_DREQ: u8; 876 const RX_DREQ: u8;
877 const ID: usize;
878 877
879 type Interrupt: crate::interrupt::Interrupt; 878 type Interrupt: crate::interrupt::Interrupt;
880 879
@@ -909,11 +908,10 @@ impl_mode!(Async);
909pub trait Instance: sealed::Instance {} 908pub trait Instance: sealed::Instance {}
910 909
911macro_rules! impl_instance { 910macro_rules! impl_instance {
912 ($inst:ident, $irq:ident, $id:expr, $tx_dreq:expr, $rx_dreq:expr) => { 911 ($inst:ident, $irq:ident, $tx_dreq:expr, $rx_dreq:expr) => {
913 impl sealed::Instance for peripherals::$inst { 912 impl sealed::Instance for peripherals::$inst {
914 const TX_DREQ: u8 = $tx_dreq; 913 const TX_DREQ: u8 = $tx_dreq;
915 const RX_DREQ: u8 = $rx_dreq; 914 const RX_DREQ: u8 = $rx_dreq;
916 const ID: usize = $id;
917 915
918 type Interrupt = crate::interrupt::$irq; 916 type Interrupt = crate::interrupt::$irq;
919 917
@@ -939,8 +937,8 @@ macro_rules! impl_instance {
939 }; 937 };
940} 938}
941 939
942impl_instance!(UART0, UART0_IRQ, 0, 20, 21); 940impl_instance!(UART0, UART0_IRQ, 20, 21);
943impl_instance!(UART1, UART1_IRQ, 1, 22, 23); 941impl_instance!(UART1, UART1_IRQ, 22, 23);
944 942
945pub trait TxPin<T: Instance>: sealed::TxPin<T> + crate::gpio::Pin {} 943pub trait TxPin<T: Instance>: sealed::TxPin<T> + crate::gpio::Pin {}
946pub trait RxPin<T: Instance>: sealed::RxPin<T> + crate::gpio::Pin {} 944pub trait RxPin<T: Instance>: sealed::RxPin<T> + 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) {
53 let (mut tx, mut rx, mut uart) = (p.PIN_0, p.PIN_1, p.UART0); 53 let (mut tx, mut rx, mut uart) = (p.PIN_0, p.PIN_1, p.UART0);
54 let mut irq = interrupt::take!(UART0_IRQ); 54 let mut irq = interrupt::take!(UART0_IRQ);
55 55
56 // TODO
57 // nuclear error reporting. just abort the entire transfer and invalidate the
58 // dma buffer, buffered buffer, fifo etc.
59
60 // We can't send too many bytes, they have to fit in the FIFO. 56 // We can't send too many bytes, they have to fit in the FIFO.
61 // This is because we aren't sending+receiving at the same time. 57 // This is because we aren't sending+receiving at the same time.
62 { 58 {