MCPcopy Create free account
hub / github.com/chyyuu/os_kernel_lab / new

Method new

user/src/bin/gui_uart.rs:33–42  ·  view source on GitHub ↗
(size: Size, point: Point)

Source from the content-addressed store, hash-verified

31
32impl Display {
33 pub fn new(size: Size, point: Point) -> Self {
34 let fb_ptr = framebuffer() as *mut u8;
35 println!(
36 "Hello world from user mode program! 0x{:X} , len {}",
37 fb_ptr as usize, VIRTGPU_LEN
38 );
39 let fb =
40 unsafe { core::slice::from_raw_parts_mut(fb_ptr as *mut u8, VIRTGPU_LEN as usize) };
41 Self { size, point, fb }
42 }
43}
44
45impl OriginDimensions for Display {

Callers

nothing calls this directly

Calls 1

framebufferFunction · 0.85

Tested by

no test coverage detected