diff --git a/eepy/Cargo.toml b/eepy/Cargo.toml index e9baecc..0ba03c2 100644 --- a/eepy/Cargo.toml +++ b/eepy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "eepy" -version = "0.1.0" +version = "0.1.1" edition = "2024" authors = ["arthomnix"] license = "MIT" diff --git a/eepy/src/syscall/exec.rs b/eepy/src/syscall/exec.rs index 213967c..d23b2d2 100644 --- a/eepy/src/syscall/exec.rs +++ b/eepy/src/syscall/exec.rs @@ -1,13 +1,17 @@ use core::arch::asm; +use core::sync::atomic::Ordering; use eepy_sys::exec::exec; use eepy_sys::header::slot; use crate::exception::StackFrame; -use crate::SRAM_END; +use crate::{EVENT_QUEUE, SRAM_END, TOUCH_ENABLED}; pub(super) fn handle_exec(stack_values: &mut StackFrame, using_psp: bool) { // cleanup previous program's USB crate::usb::handle_uninit(); crate::usb::handle_clear_handler(); + // disable touch (programs should enable when needed) + TOUCH_ENABLED.store(false, Ordering::Relaxed); + critical_section::with(|cs| EVENT_QUEUE.borrow_ref_mut(cs).clear()); // disable privileged mode unsafe {