[UCPD] Add support for non-SOP packets

Allow capturing (and distinguishing) non-SOP packets as well. The
default configuration will just configure SOP packets. For ease of use
the default receive function signature is unchanged as for PD sinks
(which is likely the common usage) just SOP is enough so no need to
differentiate.
This commit is contained in:
Sjoerd Simons
2024-08-18 21:06:13 +02:00
parent d8459685fd
commit 1b0661ebb1
3 changed files with 76 additions and 7 deletions

View File

@@ -106,8 +106,8 @@ async fn main(_spawner: Spawner) {
info!("Hello World!");
// Wire between PD0 and PA8
let ucpd1 = Ucpd::new(p.UCPD1, Irqs {}, p.PA8, p.PB15);
let ucpd2 = Ucpd::new(p.UCPD2, Irqs {}, p.PD0, p.PD2);
let ucpd1 = Ucpd::new(p.UCPD1, Irqs {}, p.PA8, p.PB15, Default::default());
let ucpd2 = Ucpd::new(p.UCPD2, Irqs {}, p.PD0, p.PD2, Default::default());
join(
source(ucpd1, p.DMA1_CH1, p.DMA1_CH2),