mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-21 09:14:34 +00:00
feature-out the quantum time
This commit is contained in:
parent
147cfb8c97
commit
41078a71fe
1 changed files with 49 additions and 44 deletions
|
|
@ -13,8 +13,10 @@ use utralib::*;
|
|||
#[cfg(feature = "swap")]
|
||||
use xous::SWAPPER_PID;
|
||||
use xous::sender::Sender;
|
||||
#[cfg(feature = "pio")]
|
||||
use xous_pio::*;
|
||||
|
||||
#[cfg(feature = "quantum-timer")]
|
||||
struct PreemptionHw {
|
||||
pub timer_sm: PioSm,
|
||||
pub irq_csr: CSR<u32>,
|
||||
|
|
@ -169,6 +171,8 @@ fn main() {
|
|||
|
||||
// -------------------- begin timer workaround code
|
||||
// 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();
|
||||
// map and enable the interrupt for the PIO system timer
|
||||
let irq18_page = xous::syscall::map_memory(
|
||||
|
|
@ -215,6 +219,7 @@ fn main() {
|
|||
ptimer.irq_csr.wfo(utra::irqarray18::EV_ENABLE_PIOIRQ0_DUPE, 1);
|
||||
log::info!("Quantum timer setup!");
|
||||
}
|
||||
}
|
||||
// -------------------- end timer workaround code
|
||||
|
||||
// start keyboard emulator service
|
||||
|
|
|
|||
Loading…
Reference in a new issue