mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 14:25:18 +01:00
make task.$T.enabled optional
and move the logic that differentiates interrupts from exceptions from the crate to the procedural macro logic
This commit is contained in:
parent
ad2a523cf9
commit
d396da5950
17 changed files with 112 additions and 92 deletions
22
src/lib.rs
22
src/lib.rs
|
|
@ -140,25 +140,3 @@ where
|
|||
let nvic = unsafe { &*cortex_m::peripheral::NVIC.get() };
|
||||
nvic.set_pending(interrupt);
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
#[doc(hidden)]
|
||||
pub enum Exception {
|
||||
/// System service call via SWI instruction
|
||||
SVCALL,
|
||||
/// Pendable request for system service
|
||||
PENDSV,
|
||||
/// System tick timer
|
||||
SYS_TICK,
|
||||
}
|
||||
|
||||
impl Exception {
|
||||
#[doc(hidden)]
|
||||
pub fn nr(&self) -> usize {
|
||||
match *self {
|
||||
Exception::SVCALL => 11,
|
||||
Exception::PENDSV => 14,
|
||||
Exception::SYS_TICK => 15,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue