mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
add code to the server
this is the actual handler inside the Xous service which, when receiving the opcode, dereferences its exclusive pointer to the IRQ bank and then returns the result to the caller.
This commit is contained in:
parent
f3e7eec6cf
commit
76a45ff47d
1 changed files with 8 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ use bitfield::*;
|
|||
use cramium_api::*;
|
||||
use cramium_hal::{iox::Iox, udma::GlobalConfig};
|
||||
use num_traits::*;
|
||||
use udma::UdmaGlobalConfig;
|
||||
use utralib::CSR;
|
||||
#[cfg(feature = "quantum-timer")]
|
||||
use utralib::utra;
|
||||
|
|
@ -526,6 +527,13 @@ fn main() {
|
|||
udma_global.map_event_with_offset(periph, event_offset, to_channel);
|
||||
}
|
||||
}
|
||||
HalOpcode::UdmaIrqStatusBits => {
|
||||
if let Some(scalar) = msg.body.scalar_message_mut() {
|
||||
let bank = num_traits::FromPrimitive::from_usize(scalar.arg1)
|
||||
.expect("Bad argument to UdmaIrqStatusBits");
|
||||
scalar.arg1 = udma_global.irq_status_bits(bank) as usize;
|
||||
}
|
||||
}
|
||||
HalOpcode::PeriphReset => {
|
||||
if let Some(scalar) = msg.body.scalar_message() {
|
||||
let periph: PeriphId = num_traits::FromPrimitive::from_usize(scalar.arg1).unwrap();
|
||||
|
|
|
|||
Loading…
Reference in a new issue