mirror of
https://github.com/LegitCamper/picocalc-os-rs.git
synced 2025-12-27 07:45:28 +00:00
use strum for abicalltable
This commit is contained in:
@@ -5,4 +5,5 @@ edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
embedded-graphics = "0.8.1"
|
||||
strum = { version = "0.27.2", default-features = false, features = ["derive"] }
|
||||
shared = { path = "../shared" }
|
||||
|
||||
@@ -9,6 +9,7 @@ use embedded_graphics::{
|
||||
pixelcolor::{Rgb565, RgbColor},
|
||||
};
|
||||
pub use shared::keyboard::{KeyCode, KeyEvent, KeyState, Modifiers};
|
||||
use strum::EnumIter;
|
||||
|
||||
pub type EntryFn = fn();
|
||||
|
||||
@@ -17,7 +18,7 @@ pub type EntryFn = fn();
|
||||
pub static mut CALL_ABI_TABLE: [usize; CallAbiTable::COUNT] = [0; CallAbiTable::COUNT];
|
||||
|
||||
#[repr(usize)]
|
||||
#[derive(Clone, Copy)]
|
||||
#[derive(Clone, Copy, EnumIter)]
|
||||
pub enum CallAbiTable {
|
||||
Print = 0,
|
||||
Sleep = 1,
|
||||
|
||||
Reference in New Issue
Block a user