7#ifndef _HARDWARE_IRQ_H_
8#define _HARDWARE_IRQ_H_
12#ifndef PICO_MAX_SHARED_IRQ_HANDLERS
13#define PICO_MAX_SHARED_IRQ_HANDLERS 4u
17#ifndef PICO_DISABLE_SHARED_IRQ_HANDLERS
18#define PICO_DISABLE_SHARED_IRQ_HANDLERS 0
25#include "hardware/regs/intctrl.h"
26#include "hardware/regs/m0plus.h"
94#ifndef PICO_DEFAULT_IRQ_PRIORITY
95#define PICO_DEFAULT_IRQ_PRIORITY 0x80
98#define PICO_LOWEST_IRQ_PRIORITY 0xff
99#define PICO_HIGHEST_IRQ_PRIORITY 0x00
102#ifndef PICO_SHARED_IRQ_HANDLER_DEFAULT_ORDER_PRIORITY
103#define PICO_SHARED_IRQ_HANDLER_DEFAULT_ORDER_PRIORITY 0x80
107#ifndef PARAM_ASSERTIONS_ENABLED_IRQ
108#define PARAM_ASSERTIONS_ENABLED_IRQ 0
122static inline void check_irq_param(__unused uint num) {
123 invalid_params_if(IRQ, num >= NUM_IRQS);
264 *((
volatile uint32_t *) (PPB_BASE + M0PLUS_NVIC_ICPR_OFFSET)) = (1u << ((uint32_t) (int_num & 0x1F)));
bool irq_is_enabled(uint num)
Determine if a specific interrupt is enabled on the executing core.
Definition: irq.c:41
static void irq_clear(uint int_num)
Clear a specific interrupt on the executing core.
Definition: irq.h:263
void irq_set_pending(uint num)
Force an interrupt to be pending on the executing core.
Definition: irq.c:57
irq_handler_t irq_get_exclusive_handler(uint num)
Get the exclusive interrupt handler for an interrupt on the executing core.
Definition: irq.c:117
irq_handler_t irq_get_vtable_handler(uint num)
Get the current IRQ handler for the specified IRQ from the currently installed hardware vector table ...
Definition: irq.c:99
uint irq_get_priority(uint num)
Get specified interrupt's priority.
Definition: irq.c:362
void irq_set_enabled(uint num, bool enabled)
Enable or disable a specific interrupt on the executing core.
Definition: irq.c:36
void(* irq_handler_t)(void)
Interrupt handler function type.
Definition: irq.h:120
void irq_set_priority(uint num, uint8_t hardware_priority)
Set specified interrupt's priority.
Definition: irq.c:354
void irq_remove_handler(uint num, irq_handler_t handler)
Remove a specific interrupt handler for the given irq number on the executing core.
Definition: irq.c:256
void irq_set_mask_enabled(uint32_t mask, bool enabled)
Enable/disable multiple interrupts on the executing core.
Definition: irq.c:46
void irq_add_shared_handler(uint num, irq_handler_t handler, uint8_t order_priority)
Add a shared interrupt handler for an interrupt on the executing core.
Definition: irq.c:182
void irq_set_exclusive_handler(uint num, irq_handler_t handler)
Set an exclusive interrupt handler for an interrupt on the executing core.
Definition: irq.c:104
void irq_init_priorities(void)
Perform IRQ priority initialization for the current core.
Definition: irq.c:404