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.
Khalil Estell authored and kammce committed Aug 7, 2023
1 parent 1a538ca commit 09a095d
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
@@ -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"
26 changes: 26 additions & 0 deletions include/libhal-armcortex/interrupt.hpp
Original file line number Diff line number Diff line change
@@ -24,6 +24,32 @@ namespace hal::cortex_m {
/// Used specifically for defining an interrupt vector table of addresses.
using interrupt_pointer = void (*)();

/**
* @brief IRQ numbers for core processor interrupts
*
*/
enum class irq
{
top_of_stack = 0,
reset = 1,
/// @brief non-maskable interrupt
nmi = 2,
hard_fault = 3,
memory_management_fault = 4,
bus_fault = 5,
usage_fault = 6,
reserve7 = 7,
reserve8 = 8,
reserve9 = 9,
reserve10 = 10,
/// @brief Software initiated interrupt
sv_call = 11,
reserve12 = 12,
reserve13 = 13,
pend_sv = 14,
systick = 15,
};

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

0 comments on commit 09a095d

Please sign in to comment.