From d396da59502ef67f624bb4d8927ff8697232f66c Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 27 Jul 2017 17:08:42 -0500 Subject: make task.$T.enabled optional and move the logic that differentiates interrupts from exceptions from the crate to the procedural macro logic --- src/lib.rs | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 802d5037..dc856596 100644 --- a/src/lib.rs +++ b/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, - } - } -} -- cgit v1.2.3