rdif_def/
lib.rs

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