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

29 lines
680 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-06-04 15:53:51 +00:00
mod ansi_escape;
2025-04-29 08:45:08 +00:00
mod console;
2025-08-22 08:39:43 +00:00
mod console_input;
mod dummy_console;
2025-04-29 08:45:08 +00:00
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 dummy_console::DummyFramebufferConsole;
pub use framebuffer::{ColorMapEntry, FrameBuffer, FRAMEBUFFER, MAX_CMAP_SIZE};
2025-04-29 08:45:08 +00:00
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();
2025-08-22 08:39:43 +00:00
console_input::init();
2023-03-25 09:24:34 +00:00
Ok(())
}