@@ -51,13 +51,6 @@ static inline void *remove_thumb_bit(void *addr) {
5151#endif 
5252}
5353
54- static  void  set_raw_irq_handler_and_unlock (uint  num , irq_handler_t  handler , uint32_t  save ) {
55-     // update vtable (vtable_handler may be same or updated depending on cases, but we do it anyway for compactness) 
56-     get_vtable ()[VTABLE_FIRST_IRQ  +  num ] =  handler ;
57-     __dmb ();
58-     spin_unlock (spin_lock_instance (PICO_SPINLOCK_ID_IRQ ), save );
59- }
60- 
6154void  irq_set_enabled (uint  num , bool  enabled ) {
6255    check_irq_param (num );
6356    // really should update irq_set_mask_enabled? 
@@ -129,7 +122,7 @@ void irq_set_pending(uint num) {
129122#endif 
130123}
131124
132- #if  !PICO_DISABLE_SHARED_IRQ_HANDLERS 
125+ #if  !PICO_DISABLE_SHARED_IRQ_HANDLERS   &&  ! PICO_NO_RAM_VECTOR_TABLE 
133126// limited by 8 bit relative links (and reality) 
134127static_assert (PICO_MAX_SHARED_IRQ_HANDLERS  >= 1  &&  PICO_MAX_SHARED_IRQ_HANDLERS  <  0x7f , "" );
135128
@@ -203,9 +196,17 @@ bool irq_has_shared_handler(uint irq_num) {
203196    return  handler  &&  is_shared_irq_raw_handler (handler );
204197}
205198
206- #else  // PICO_DISABLE_SHARED_IRQ_HANDLERS 
199+ static  void  set_raw_irq_handler_and_unlock (uint  num , irq_handler_t  handler , uint32_t  save ) {
200+     // update vtable (vtable_handler may be same or updated depending on cases, but we do it anyway for compactness) 
201+     get_vtable ()[VTABLE_FIRST_IRQ  +  num ] =  handler ;
202+     __dmb ();
203+     spin_unlock (spin_lock_instance (PICO_SPINLOCK_ID_IRQ ), save );
204+ }
205+ 
206+ #else  // PICO_DISABLE_SHARED_IRQ_HANDLERS && PICO_NO_RAM_VECTOR_TABLE 
207207#define  is_shared_irq_raw_handler (h ) false
208208bool  irq_has_shared_handler (uint  irq_num ) {
209+     ((void )irq_num );
209210    return  false;
210211}
211212#endif 
@@ -225,6 +226,7 @@ void irq_set_exclusive_handler(uint num, irq_handler_t handler) {
225226    hard_assert (current  ==  __unhandled_user_irq  ||  current  ==  handler );
226227    set_raw_irq_handler_and_unlock (num , handler , save );
227228#else 
229+     ((void )handler );
228230    panic_unsupported ();
229231#endif 
230232}
@@ -246,7 +248,7 @@ irq_handler_t irq_get_exclusive_handler(uint num) {
246248}
247249
248250
249- #if  !PICO_DISABLE_SHARED_IRQ_HANDLERS 
251+ #if  !PICO_DISABLE_SHARED_IRQ_HANDLERS   &&  ! PICO_NO_RAM_VECTOR_TABLE 
250252
251253#ifndef  __riscv 
252254
@@ -356,6 +358,8 @@ static inline int8_t get_slot_index(struct irq_handler_chain_slot *slot) {
356358void  irq_add_shared_handler (uint  num , irq_handler_t  handler , uint8_t  order_priority ) {
357359    check_irq_param (num );
358360#if  PICO_NO_RAM_VECTOR_TABLE 
361+     ((void )handler );
362+     ((void )order_priority );
359363    panic_unsupported ();
360364#elif  PICO_DISABLE_SHARED_IRQ_HANDLERS 
361365    irq_set_exclusive_handler (num , handler );
@@ -449,7 +453,7 @@ void irq_add_shared_handler(uint num, irq_handler_t handler, uint8_t order_prior
449453#endif  // !PICO_NO_RAM_VECTOR_TABLE && !PICO_DISABLE_SHARED_IRQ_HANDLERS 
450454}
451455
452- #if  !PICO_DISABLE_SHARED_IRQ_HANDLERS 
456+ #if  !PICO_DISABLE_SHARED_IRQ_HANDLERS   &&  ! PICO_NO_RAM_VECTOR_TABLE 
453457static  inline  irq_handler_t  handler_from_slot (struct  irq_handler_chain_slot  * slot ) {
454458#ifndef  __riscv 
455459    return  slot -> handler ;
@@ -574,6 +578,8 @@ void irq_remove_handler(uint num, irq_handler_t handler) {
574578    }
575579    set_raw_irq_handler_and_unlock (num , vtable_handler , save );
576580#else 
581+     ((void )num );
582+     ((void )handler );
577583    panic_unsupported ();
578584#endif 
579585}
@@ -614,7 +620,7 @@ uint irq_get_priority(uint num) {
614620#endif 
615621}
616622
617- #if  !PICO_DISABLE_SHARED_IRQ_HANDLERS 
623+ #if  !PICO_DISABLE_SHARED_IRQ_HANDLERS   &&  ! PICO_NO_RAM_VECTOR_TABLE 
618624// used by irq_handler_chain.S to remove the last link in a handler chain after it executes 
619625// note this must be called only with the last slot in a chain (and during the exception) 
620626void  irq_add_tail_to_free_list (struct  irq_handler_chain_slot  * slot ) {
0 commit comments