7#ifndef _HARDWARE_EXCEPTION_H
8#define _HARDWARE_EXCEPTION_H
27#ifndef PARAM_ASSERTIONS_ENABLED_HARDWARE_EXCEPTION
28#ifdef PARAM_ASSERTIONS_ENABLED_EXCEPTION
29#define PARAM_ASSERTIONS_ENABLED_HARDWARE_EXCEPTION PARAM_ASSERTIONS_ENABLED_EXCEPTION
31#define PARAM_ASSERTIONS_ENABLED_HARDWARE_EXCEPTION 0
79 MIN_EXCEPTION_NUM = 0,
80 INSTR_ALIGN_EXCEPTION = 0,
81 INSTR_FAULT_EXCEPTION = 1,
82 INSTR_ILLEGAL_EXCEPTION = 2,
84 LOAD_ALIGN_EXCEPTION = 4,
85 LOAD_FAULT_EXCEPTION = 5,
86 STORE_ALIGN_EXCEPTION = 6,
87 STORE_FAULT_EXCEPTION = 7,
88 ECALL_UMODE_EXCEPTION = 8,
89 ECALL_SMODE_EXCEPTION = 9,
90 ECALL_MMODE_EXCEPTION = 11,
91 MAX_EXCEPTION_NUM = 11
96 MIN_EXCEPTION_NUM = 2,
100 MEMMANAGE_EXCEPTION = 4,
101 BUSFAULT_EXCEPTION = 5,
102 USAGEFAULT_EXCEPTION = 6,
103 SECUREFAULT_EXCEPTION = 7,
108 MAX_EXCEPTION_NUM = 15
112#define PICO_LOWEST_EXCEPTION_PRIORITY 0xff
113#define PICO_HIGHEST_EXCEPTION_PRIORITY 0x00
exception_handler_t exception_set_exclusive_handler(enum exception_number num, exception_handler_t handler)
Set the exception handler for an exception on the executing core.
Definition exception.c:50
void(* exception_handler_t)(void)
Exception handler function type.
Definition exception.h:121
exception_number
Exception number definitions.
Definition exception.h:94
exception_handler_t exception_get_vtable_handler(enum exception_number num)
Get the current exception handler for the specified exception from the currently installed vector tab...
Definition exception.c:45
bool exception_set_priority(uint num, uint8_t hardware_priority)
Set specified exception's priority.
Definition exception.c:87
uint exception_get_priority(uint num)
Get specified exception's priority.
Definition exception.c:97
void exception_restore_handler(enum exception_number num, exception_handler_t original_handler)
Restore the original exception handler for an exception on this core.
Definition exception.c:63
@ SYSTICK_EXCEPTION
System Tick Interrupt.
Definition exception.h:107
@ SVCALL_EXCEPTION
SV Call Interrupt.
Definition exception.h:105
@ NMI_EXCEPTION
Non Maskable Interrupt.
Definition exception.h:97
@ HARDFAULT_EXCEPTION
HardFault Interrupt.
Definition exception.h:98
@ PENDSV_EXCEPTION
Pend SV Interrupt.
Definition exception.h:106