mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
add 'lib' side code for sending the API call to cramium_hal_service
this is the code that exists on the caller's side. It creates a message with the correct opcode and decodes the result.
This commit is contained in:
parent
2c99b32e5a
commit
f3e7eec6cf
1 changed files with 16 additions and 0 deletions
|
|
@ -86,4 +86,20 @@ impl UdmaGlobalConfig for UdmaGlobal {
|
|||
}
|
||||
|
||||
fn reset(&self, peripheral: PeriphId) { self.reset(peripheral); }
|
||||
|
||||
fn irq_status_bits(&self, bank: IrqBank) -> u32 {
|
||||
match xous::send_message(
|
||||
self.conn,
|
||||
xous::Message::new_blocking_scalar(
|
||||
HalOpcode::UdmaIrqStatusBits.to_usize().unwrap(),
|
||||
bank as u32 as usize,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
),
|
||||
) {
|
||||
Ok(xous::Result::Scalar5(_, value, _, _, _)) => value as u32,
|
||||
_ => panic!("Unhandled response on irq_status_bits"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue