mirror of
https://github.com/LegitCamper/picocalc-os-rs.git
synced 2025-12-27 07:45:28 +00:00
remvove lock_display
This commit is contained in:
@@ -13,7 +13,7 @@ use strum::{EnumCount, EnumIter};
|
||||
|
||||
pub type EntryFn = fn();
|
||||
|
||||
pub const ABI_CALL_TABLE_COUNT: usize = 12;
|
||||
pub const ABI_CALL_TABLE_COUNT: usize = 11;
|
||||
const _: () = assert!(ABI_CALL_TABLE_COUNT == CallTable::COUNT);
|
||||
|
||||
#[derive(Clone, Copy, EnumIter, EnumCount)]
|
||||
@@ -24,13 +24,12 @@ pub enum CallTable {
|
||||
PrintString = 2,
|
||||
SleepMs = 3,
|
||||
GetMs = 4,
|
||||
LockDisplay = 5,
|
||||
DrawIter = 6,
|
||||
GetKey = 7,
|
||||
GenRand = 8,
|
||||
ListDir = 9,
|
||||
ReadFile = 10,
|
||||
FileLen = 11,
|
||||
DrawIter = 5,
|
||||
GetKey = 6,
|
||||
GenRand = 7,
|
||||
ListDir = 8,
|
||||
ReadFile = 9,
|
||||
FileLen = 10,
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
@@ -104,15 +103,6 @@ pub extern "C" fn get_ms() -> u64 {
|
||||
f()
|
||||
}
|
||||
|
||||
pub type LockDisplay = extern "C" fn(lock: bool);
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn lock_display(lock: bool) {
|
||||
let f: LockDisplay =
|
||||
unsafe { core::mem::transmute(CALL_ABI_TABLE[CallTable::LockDisplay as usize]) };
|
||||
f(lock);
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct CPixel {
|
||||
|
||||
Reference in New Issue
Block a user