mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +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")]
|
#[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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue