File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
rp2040/hardware_regs/include/hardware/regs Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,12 @@ typedef enum irq_num_rp2040 {
7171 I2C0_IRQ = 23 , ///< Select I2C0's IRQ output
7272 I2C1_IRQ = 24 , ///< Select I2C1's IRQ output
7373 RTC_IRQ = 25 , ///< Select RTC's IRQ output
74+ SPARE_IRQ_0 = 26 , ///< Select SPARE IRQ 0
75+ SPARE_IRQ_1 = 27 , ///< Select SPARE IRQ 1
76+ SPARE_IRQ_2 = 28 , ///< Select SPARE IRQ 2
77+ SPARE_IRQ_3 = 29 , ///< Select SPARE IRQ 3
78+ SPARE_IRQ_4 = 30 , ///< Select SPARE IRQ 4
79+ SPARE_IRQ_5 = 31 , ///< Select SPARE IRQ 5
7480 IRQ_COUNT
7581} irq_num_t ;
7682#endif
@@ -101,6 +107,12 @@ typedef enum irq_num_rp2040 {
101107#define isr_i2c0 isr_irq23
102108#define isr_i2c1 isr_irq24
103109#define isr_rtc isr_irq25
110+ #define isr_spare_0 isr_irq26
111+ #define isr_spare_1 isr_irq27
112+ #define isr_spare_2 isr_irq28
113+ #define isr_spare_3 isr_irq29
114+ #define isr_spare_4 isr_irq30
115+ #define isr_spare_5 isr_irq31
104116
105117#endif // _INTCTRL_H
106118
Original file line number Diff line number Diff line change 1515PICO_RUNTIME_INIT_FUNC_PER_CORE (runtime_init_per_core_irq_priorities , PICO_RUNTIME_INIT_PER_CORE_IRQ_PRIORITIES );
1616#endif
1717
18+ static_assert (IRQ_COUNT == NUM_IRQS , "" );
19+ // "USER IRQs" use the spare irq numbers
20+ #if NUM_USER_IRQS
21+ static_assert (IRQ_COUNT - NUM_USER_IRQS == SPARE_IRQ_0 , "" );
22+ #endif
23+
1824#if PICO_VTABLE_PER_CORE
1925static uint8_t user_irq_claimed [NUM_CORES ];
2026static inline uint8_t * user_irq_claimed_ptr (void ) {
You can’t perform that action at this time.
0 commit comments