From 60dc329cbc7f0b2a12ebb9bf8abbfcc13a4225c4 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 22 Jan 2024 23:24:47 +0800 Subject: [PATCH] ugrade unit tests to use the auto-generated irq names --- libs/xous-pl230/src/pl230_tests/units.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libs/xous-pl230/src/pl230_tests/units.rs b/libs/xous-pl230/src/pl230_tests/units.rs index 6cdfc0918..f286555e6 100644 --- a/libs/xous-pl230/src/pl230_tests/units.rs +++ b/libs/xous-pl230/src/pl230_tests/units.rs @@ -224,10 +224,11 @@ pub fn pio_test(pl230: &mut Pl230) -> bool { // setup EVC to route requests report_api("mdma_base", unsafe { pl230.mdma.base() } as u32); // select event number 83, which is PIO[0]. - // TODO: make this not hard-coded - // WTF: oddly enough, it actually maps to... channel 163??? weird. this probably indicates a bug of some - // sort. - pl230.mdma.wo(utra::mdma::SFR_EVSEL_CR_EVSEL0, 163); + // oddly enough, it actually maps to... channel 163, which is 16 more than what reads in the code + // turns out this is due to the lower 16 irqs being reserved for...something...causing everything + // to be shifted up by 16. oh well! + // MDMA EV offsets are now searchable in the utralib::generated::LITEX_IFSUB_EV_* series of constants. + pl230.mdma.wo(utra::mdma::SFR_EVSEL_CR_EVSEL0, utralib::generated::LITEX_IFSUB_EV_PIOIRQ0 as u32); // bit 0 - enable // bit 1 - mode: 1 is edge, 0 is level // bit 2 - enable dmareq