asterinas/kernel/comps/framebuffer/src/lib.rs

24 lines
520 B
Rust
Raw Normal View History

2024-01-03 03:22:36 +00:00
// SPDX-License-Identifier: MPL-2.0
//! The framebuffer of Asterinas.
2023-03-25 09:24:34 +00:00
#![no_std]
#![deny(unsafe_code)]
2023-03-25 09:24:34 +00:00
extern crate alloc;
2025-04-29 08:45:08 +00:00
mod console;
mod framebuffer;
mod pixel;
2024-06-19 08:18:39 +00:00
use component::{init_component, ComponentInitError};
2025-04-29 08:45:08 +00:00
pub use console::{FramebufferConsole, CONSOLE_NAME, FRAMEBUFFER_CONSOLE};
pub use framebuffer::{FrameBuffer, FRAMEBUFFER};
pub use pixel::{Pixel, PixelFormat, RenderedPixel};
2023-03-25 09:24:34 +00:00
#[init_component]
2025-04-29 08:45:08 +00:00
fn init() -> Result<(), ComponentInitError> {
framebuffer::init();
console::init();
2023-03-25 09:24:34 +00:00
Ok(())
}