firmware for my Touchscreen E-Paper Input Module for Framework Laptop 16
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

eepy: disable touch and clear event queue on exec

arthomnix a76b611f f9e05a57

+6 -2
+1 -1
eepy/Cargo.toml
··· 1 1 [package] 2 2 name = "eepy" 3 - version = "0.1.0" 3 + version = "0.1.1" 4 4 edition = "2024" 5 5 authors = ["arthomnix"] 6 6 license = "MIT"
+5 -1
eepy/src/syscall/exec.rs
··· 1 1 use core::arch::asm; 2 + use core::sync::atomic::Ordering; 2 3 use eepy_sys::exec::exec; 3 4 use eepy_sys::header::slot; 4 5 use crate::exception::StackFrame; 5 - use crate::SRAM_END; 6 + use crate::{EVENT_QUEUE, SRAM_END, TOUCH_ENABLED}; 6 7 7 8 pub(super) fn handle_exec(stack_values: &mut StackFrame, using_psp: bool) { 8 9 // cleanup previous program's USB 9 10 crate::usb::handle_uninit(); 10 11 crate::usb::handle_clear_handler(); 12 + // disable touch (programs should enable when needed) 13 + TOUCH_ENABLED.store(false, Ordering::Relaxed); 14 + critical_section::with(|cs| EVENT_QUEUE.borrow_ref_mut(cs).clear()); 11 15 12 16 // disable privileged mode 13 17 unsafe {