feature-out the quantum time

This commit is contained in:
bunnie 2024-12-02 01:22:18 +08:00
parent 147cfb8c97
commit 41078a71fe

View file

@ -13,8 +13,10 @@ use utralib::*;
#[cfg(feature = "swap")] #[cfg(feature = "swap")]
use xous::SWAPPER_PID; use xous::SWAPPER_PID;
use xous::sender::Sender; use xous::sender::Sender;
#[cfg(feature = "pio")]
use xous_pio::*; use xous_pio::*;
#[cfg(feature = "quantum-timer")]
struct PreemptionHw { struct PreemptionHw {
pub timer_sm: PioSm, pub timer_sm: PioSm,
pub irq_csr: CSR<u32>, pub irq_csr: CSR<u32>,
@ -169,6 +171,8 @@ fn main() {
// -------------------- begin timer workaround code // -------------------- begin timer workaround code
// This code should go away with NTO as we have a proper, private ticktimer unit. // This code should go away with NTO as we have a proper, private ticktimer unit.
#[cfg(feature = "pio")]
{
let mut pio_ss = xous_pio::PioSharedState::new(); let mut pio_ss = xous_pio::PioSharedState::new();
// map and enable the interrupt for the PIO system timer // map and enable the interrupt for the PIO system timer
let irq18_page = xous::syscall::map_memory( let irq18_page = xous::syscall::map_memory(
@ -215,6 +219,7 @@ fn main() {
ptimer.irq_csr.wfo(utra::irqarray18::EV_ENABLE_PIOIRQ0_DUPE, 1); ptimer.irq_csr.wfo(utra::irqarray18::EV_ENABLE_PIOIRQ0_DUPE, 1);
log::info!("Quantum timer setup!"); log::info!("Quantum timer setup!");
} }
}
// -------------------- end timer workaround code // -------------------- end timer workaround code
// start keyboard emulator service // start keyboard emulator service