mirror of
https://github.com/LegitCamper/picocalc-os-rs.git
synced 2025-12-27 07:45:28 +00:00
PIE binaries & fix currupted framebuffer
This commit is contained in:
@@ -3,7 +3,11 @@ name = "abi_sys"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[features]
|
||||
defmt = ["dep:defmt"]
|
||||
|
||||
[dependencies]
|
||||
embedded-graphics = "0.8.1"
|
||||
strum = { version = "0.27.2", default-features = false, features = ["derive"] }
|
||||
defmt = { version = "0.3", optional = true }
|
||||
shared = { path = "../shared" }
|
||||
|
||||
@@ -9,16 +9,17 @@ use embedded_graphics::{
|
||||
pixelcolor::{Rgb565, RgbColor},
|
||||
};
|
||||
pub use shared::keyboard::{KeyCode, KeyEvent, KeyState, Modifiers};
|
||||
use strum::EnumIter;
|
||||
use strum::{EnumCount, EnumIter};
|
||||
|
||||
pub type EntryFn = fn();
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
#[unsafe(link_section = ".user_reloc")]
|
||||
#[unsafe(link_section = ".syscall_table")]
|
||||
pub static mut CALL_ABI_TABLE: [usize; CallAbiTable::COUNT] = [0; CallAbiTable::COUNT];
|
||||
|
||||
#[repr(usize)]
|
||||
#[derive(Clone, Copy, EnumIter)]
|
||||
#[derive(Clone, Copy, EnumIter, EnumCount)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub enum CallAbiTable {
|
||||
Print = 0,
|
||||
Sleep = 1,
|
||||
@@ -28,10 +29,6 @@ pub enum CallAbiTable {
|
||||
GenRand = 5,
|
||||
}
|
||||
|
||||
impl CallAbiTable {
|
||||
pub const COUNT: usize = 6;
|
||||
}
|
||||
|
||||
pub type PrintAbi = extern "Rust" fn(msg: &str);
|
||||
|
||||
#[allow(unused)]
|
||||
|
||||
Reference in New Issue
Block a user