mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
commit checkpoint for xobs
This commit is contained in:
parent
fbad2e4391
commit
8646662804
1 changed files with 3 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ use log::{error, info};
|
|||
|
||||
use core::pin::Pin;
|
||||
use xous::buffer;
|
||||
use rkyv::{archived_value_mut, Unarchive};
|
||||
use rkyv::{archived_value, Unarchive};
|
||||
use rkyv::Write;
|
||||
|
||||
/// Compute the dvorak key mapping of row/col to key tuples
|
||||
|
|
@ -820,8 +820,9 @@ fn xmain() -> ! {
|
|||
info!("KBD: Message: {:?}", envelope);
|
||||
if let xous::Message::Borrow(m) = &envelope.body {
|
||||
let mut buf = unsafe { buffer::XousBuffer::from_memory_message(m) };
|
||||
let bytes = Pin::new(buf.as_ref());
|
||||
let value = unsafe {
|
||||
archived_value_mut::<api::Opcode>(Pin::new(buf.as_mut()), m.id as usize)
|
||||
archived_value::<api::Opcode>(&bytes, m.id as usize)
|
||||
};
|
||||
let new_value = match &*value {
|
||||
rkyv::Archived::<api::Opcode>::RegisterListener(registration) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue