2024-01-03 03:22:36 +00:00
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
|
2023-12-25 07:27:41 +00:00
|
|
|
//! The framebuffer of Asterinas.
|
2023-03-25 09:24:34 +00:00
|
|
|
#![no_std]
|
2024-05-22 09:46:27 +00:00
|
|
|
#![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;
|
2025-11-28 02:03:02 +00:00
|
|
|
mod dummy_console;
|
2025-04-29 08:45:08 +00:00
|
|
|
mod framebuffer;
|
|
|
|
|
mod pixel;
|
2024-02-25 14:09:24 +00:00
|
|
|
|
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};
|
2025-11-28 02:03:02 +00:00
|
|
|
pub use dummy_console::DummyFramebufferConsole;
|
2025-11-22 14:37:39 +00:00
|
|
|
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(())
|
|
|
|
|
}
|