File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
src/rp2_common/hardware_irq Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,15 @@ void irq_set_pending(uint num) {
128128#endif
129129}
130130
131+ #if !PICO_NO_RAM_VECTOR_TABLE
132+ static void set_raw_irq_handler_and_unlock (uint num , irq_handler_t handler , uint32_t save ) {
133+ // update vtable (vtable_handler may be same or updated depending on cases, but we do it anyway for compactness)
134+ get_vtable ()[VTABLE_FIRST_IRQ + num ] = handler ;
135+ __dmb ();
136+ spin_unlock (spin_lock_instance (PICO_SPINLOCK_ID_IRQ ), save );
137+ }
138+ #endif
139+
131140#if !PICO_DISABLE_SHARED_IRQ_HANDLERS && !PICO_NO_RAM_VECTOR_TABLE
132141// limited by 8 bit relative links (and reality)
133142static_assert (PICO_MAX_SHARED_IRQ_HANDLERS >= 1 && PICO_MAX_SHARED_IRQ_HANDLERS < 0x7f , "" );
@@ -202,13 +211,6 @@ bool irq_has_shared_handler(uint irq_num) {
202211 return is_shared_irq_raw_handler (handler );
203212}
204213
205- static void set_raw_irq_handler_and_unlock (uint num , irq_handler_t handler , uint32_t save ) {
206- // update vtable (vtable_handler may be same or updated depending on cases, but we do it anyway for compactness)
207- get_vtable ()[VTABLE_FIRST_IRQ + num ] = handler ;
208- __dmb ();
209- spin_unlock (spin_lock_instance (PICO_SPINLOCK_ID_IRQ ), save );
210- }
211-
212214#else // PICO_DISABLE_SHARED_IRQ_HANDLERS && PICO_NO_RAM_VECTOR_TABLE
213215#define is_shared_irq_raw_handler (h ) false
214216bool irq_has_shared_handler (uint irq_num ) {
You can’t perform that action at this time.
0 commit comments