can drawiter

This commit is contained in:
2025-08-26 20:08:50 -06:00
parent 535a99800d
commit 64254831e8
6 changed files with 44 additions and 26 deletions

View File

@@ -4,4 +4,5 @@ version = "0.1.0"
edition = "2024"
[dependencies]
embedded-graphics = "0.8.1"
shared = { path = "../shared" }

View File

@@ -1,11 +1,16 @@
#![no_std]
use core::ffi::c_void;
pub use embedded_graphics::{
Pixel,
geometry::Point,
pixelcolor::{Rgb565, RgbColor},
};
use shared::keyboard::{KeyCode, KeyEvent, KeyState, Modifiers};
// Instead of extern, declare a static pointer in a dedicated section
#[unsafe(no_mangle)]
#[unsafe(link_section = ".user_reloc")]
#[allow(non_upper_case_globals)]
pub static mut call_abi_ptr: usize = 0;
// Helper to call it
@@ -16,5 +21,8 @@ pub unsafe fn call_abi(call: *const Syscall) {
#[repr(C)]
pub enum Syscall {
DrawPixel { x: u32, y: u32, color: u16 },
DrawIter {
pixels: *const Pixel<Rgb565>,
len: usize,
},
}