Skip to main content

rdif_def/
lib.rs

1#![no_std]
2
3#[cfg(test)]
4extern crate alloc;
5
6#[macro_use]
7mod _macro;
8
9pub mod irq;
10
11/// Kernel error
12#[derive(thiserror::Error, Debug, Clone, PartialEq, Eq)]
13pub enum KError {
14    #[error("IO error")]
15    Io,
16    #[error("No memory")]
17    NoMem,
18    #[error("Try Again")]
19    Again,
20    #[error("Busy")]
21    Busy,
22    #[error("Bad Address: {0:#x}")]
23    BadAddr(usize),
24    #[error("Invalid Argument `{name}`")]
25    InvalidArg { name: &'static str },
26    #[error("Unknown: {0}")]
27    Unknown(&'static str),
28}
29
30custom_type!(
31    #[doc="CPU hardware ID"],
32    CpuId, usize, "{:#x}");