Skip to content

Commit

Permalink
✨ Add irq constants
Browse files Browse the repository at this point in the history
These constants can make it easier to ensure that the correct interrupt
handler was set to the correct interrupt handler.
  • Loading branch information
Khalil Estell committed Aug 7, 2023
1 parent 1a538ca commit 8c64577
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

class libhal_arm_cortex_conan(ConanFile):
name = "libhal-armcortex"
version = "2.0.3"
version = "2.1.0"
license = "Apache-2.0"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://libhal.github.io/libhal-armcortex"
Expand Down
20 changes: 20 additions & 0 deletions include/libhal-armcortex/interrupt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,26 @@ namespace hal::cortex_m {
/// Used specifically for defining an interrupt vector table of addresses.
using interrupt_pointer = void (*)();

enum class irq
{
top_of_stack = 0,
reset = 1,
non_maskable hard_fault = 2,
hard_fault = 3,
memory_management_fault = 4,
bus_fault = 5,
usage_fault = 6,
reserve7 = 7,
reserve8 = 8,
reserve9 = 9,
reserve10 = 10,
sv_call = 11,
reserve12 = 12,
reserve13 = 13,
pend_sv = 14,
systick = 15,
};

/**
* @brief Cortex M series interrupt controller
*
Expand Down

0 comments on commit 8c64577

Please sign in to comment.