mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
commit
3027b895dc
3 changed files with 7 additions and 0 deletions
|
|
@ -589,7 +589,10 @@ impl MemoryManager {
|
|||
flags: MemoryFlags,
|
||||
kind: xous_kernel::MemoryType,
|
||||
) -> Result<xous_kernel::MemoryRange, xous_kernel::Error> {
|
||||
#[cfg(baremetal)]
|
||||
let mut phys = phys_ptr as usize;
|
||||
#[cfg(not(baremetal))]
|
||||
let phys = phys_ptr as usize;
|
||||
let virt = self.find_virtual_address(virt_ptr, size, kind)?;
|
||||
|
||||
// Determine if a contiguous chunk of RAM needs to be allocated for a device
|
||||
|
|
@ -602,6 +605,7 @@ impl MemoryManager {
|
|||
return self.reserve_range(virt, size, flags);
|
||||
}
|
||||
|
||||
#[cfg(baremetal)]
|
||||
if device_ram {
|
||||
// Device RAM allocation: search for contiguous block of physical RAM so we can share
|
||||
// the pages with e.g. DMA or other hardware resources.
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ const TX_FIFO_DEPTH: u32 = 128;
|
|||
const CLIFFORD_SIZE: usize = 128;
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
#[allow(dead_code)]
|
||||
pub enum MboxError {
|
||||
None,
|
||||
NotReady,
|
||||
|
|
@ -48,6 +49,7 @@ impl TryFrom<u16> for ToRvOp {
|
|||
|
||||
#[repr(u16)]
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
#[allow(dead_code)]
|
||||
pub enum ToCm7Op {
|
||||
Invalid = 0,
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ use std::fmt::Display;
|
|||
|
||||
pub const SERVER_NAME_KBD: &str = "_Matrix keyboard driver_";
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Default, Copy, Clone)]
|
||||
pub struct ScanCode {
|
||||
/// base key value
|
||||
|
|
|
|||
Loading…
Reference in a new issue