aboutsummaryrefslogtreecommitdiff
path: root/src/exception.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2017-06-30 19:05:11 -0500
committerGravatar Jorge Aparicio <jorge@japaric.io> 2017-06-30 19:05:11 -0500
commit6c642b7f3efbe8806a2e6d12ba1beb04c83486d5 (patch)
treeeff01cd42f80b4688bee9e402091221c03535048 /src/exception.rs
parent45ec58c6bf16e5ea00eac9753de7f8acffa464f8 (diff)
downloadcortex-m-6c642b7f3efbe8806a2e6d12ba1beb04c83486d5.tar.gz
cortex-m-6c642b7f3efbe8806a2e6d12ba1beb04c83486d5.tar.zst
cortex-m-6c642b7f3efbe8806a2e6d12ba1beb04c83486d5.zip
update CHANGELOG
Diffstat (limited to 'src/exception.rs')
-rw-r--r--src/exception.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/exception.rs b/src/exception.rs
index 4195d67..3052f66 100644
--- a/src/exception.rs
+++ b/src/exception.rs
@@ -4,7 +4,7 @@
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum Exception {
/// Non-maskable interrupt
- Nmi,
+ NMI,
/// Other type of faults and unhandled faults
HardFault,
/// Memory protection related fault
@@ -14,9 +14,9 @@ pub enum Exception {
/// Fault due to undefined instruction or illegal state
UsageFault,
/// Supervisor call
- Svcall,
+ SVCall,
/// Pendable request for system-level service
- Pendsv,
+ PendSV,
/// System timer exception
SysTick,
/// An interrupt
@@ -36,13 +36,13 @@ impl Exception {
Some(match icsr as u8 {
0 => return None,
- 2 => Exception::Nmi,
+ 2 => Exception::NMI,
3 => Exception::HardFault,
4 => Exception::MenManage,
5 => Exception::BusFault,
6 => Exception::UsageFault,
- 11 => Exception::Svcall,
- 14 => Exception::Pendsv,
+ 11 => Exception::SVCall,
+ 14 => Exception::PendSV,
15 => Exception::SysTick,
n if n >= 16 => Exception::Interrupt(n - 16),
_ => Exception::Reserved,