fully c ffi compat

This commit is contained in:
2025-10-05 15:43:57 -06:00
parent f73df7e0b8
commit f2a5801284
4 changed files with 90 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
#![no_std]
use abi_sys::{RngRequest, draw_iter, gen_rand};
pub use abi_sys::{file_len, get_key, list_dir, lock_display, print, read_file, sleep};
pub use abi_sys::{file_len, list_dir, lock_display, print, read_file, sleep};
use rand_core::RngCore;
pub use shared::keyboard::{KeyCode, KeyEvent, KeyState, Modifiers};
use talc::*;
@@ -13,6 +13,10 @@ static ALLOCATOR: Talck<spin::Mutex<()>, ClaimOnOom> =
Talc::new(unsafe { ClaimOnOom::new(Span::from_array(core::ptr::addr_of!(ARENA).cast_mut())) })
.lock();
pub fn get_key() -> KeyEvent {
abi_sys::get_key().into()
}
pub mod display {
use crate::draw_iter;
use embedded_graphics::{