#[repr(align(64))]pub struct KPrint {
lockable: IrqMutex<KPrintState>,
config: KPrintConfig,
}Expand description
A struct which goes into KSTATE and contains an IrqMutex
wrapped KPrintState and the current max_log_level and log_targets as [AtomicU8]s
Fields§
§lockable: IrqMutex<KPrintState>§config: KPrintConfigImplementations§
Source§impl KPrint
impl KPrint
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Constructor; creates a new KPrint instance with zeroed values.
Init needs to be called before using any values in this struct to set the proper default values
Sourcepub fn lock(&self) -> IrqMutexGuard<'_, KPrintState>
pub fn lock(&self) -> IrqMutexGuard<'_, KPrintState>
Locks and returns an IrqMutexGuard of KPrintState
Sourcepub fn config(&self) -> &KPrintConfig
pub fn config(&self) -> &KPrintConfig
Getter for self.config