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.

at main 29 lines 669 B view raw
1use crate::critical_section::CsSyscall; 2use crate::syscall; 3use crate::syscall::SyscallNumber; 4 5struct EepyCs; 6critical_section::set_impl!(EepyCs); 7 8unsafe impl critical_section::Impl for EepyCs { 9 unsafe fn acquire() -> bool { 10 let mut state: usize; 11 unsafe { 12 syscall!( 13 SyscallNumber::CriticalSection, 14 out state in CsSyscall::Acquire, 15 ); 16 } 17 state != 0 18 } 19 20 unsafe fn release(state: bool) { 21 unsafe { 22 syscall!( 23 SyscallNumber::CriticalSection, 24 in CsSyscall::Release, 25 in state, 26 ); 27 } 28 } 29}