mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
better TRNG debug support
This commit is contained in:
parent
8aa538008d
commit
afb39f9a0c
1 changed files with 3 additions and 1 deletions
|
|
@ -794,7 +794,9 @@ fn main() -> ! {
|
|||
let mut error_cb_conns: [Option<ScalarCallback>; 32] = [None; 32];
|
||||
loop {
|
||||
let mut msg = xous::receive_message(trng_sid).unwrap();
|
||||
match FromPrimitive::from_usize(msg.body.id()) {
|
||||
let op: Option<api::Opcode> = FromPrimitive::from_usize(msg.body.id());
|
||||
log::debug!("{:?}", op);
|
||||
match op {
|
||||
Some(api::Opcode::GetTrng) => xous::msg_blocking_scalar_unpack!(msg, count, _, _, _, {
|
||||
let val: [u32; 2] = trng.get_trng(count);
|
||||
xous::return_scalar2(msg.sender, val[0] as _, val[1] as _)
|
||||
|
|
|
|||
Loading…
Reference in a new issue