@@ -56,27 +56,14 @@ extern uint32_t __soc_get_irq(void);
56
56
void _arch_irq_enable (unsigned int irq );
57
57
void _arch_irq_disable (unsigned int irq );
58
58
int _arch_irq_is_enabled (unsigned int irq );
59
+ void _irq_spurious (void * unused );
59
60
60
61
61
62
/**
62
63
* Configure a static interrupt.
63
64
*
64
65
* All arguments must be computable by the compiler at build time.
65
66
*
66
- * Internally this function does a few things:
67
- *
68
- * 1. The enum statement has no effect but forces the compiler to only
69
- * accept constant values for the irq_p parameter, very important as the
70
- * numerical IRQ line is used to create a named section.
71
- *
72
- * 2. An instance of struct _isr_table_entry is created containing the ISR and
73
- * its parameter. If you look at how _sw_isr_table is created, each entry in
74
- * the array is in its own section named by the IRQ line number. What we are
75
- * doing here is to override one of the default entries (which points to the
76
- * spurious IRQ handler) with what was supplied here.
77
- *
78
- * 3. interrupt priority is not supported by pulpino core
79
- *
80
67
* @param irq_p IRQ line number
81
68
* @param priority_p Interrupt priority
82
69
* @param isr_p Interrupt service routine
@@ -87,11 +74,7 @@ int _arch_irq_is_enabled(unsigned int irq);
87
74
*/
88
75
#define _ARCH_IRQ_CONNECT (irq_p , priority_p , isr_p , isr_param_p , flags_p ) \
89
76
({ \
90
- enum { IRQ = irq_p }; \
91
- static struct _isr_table_entry _CONCAT(_isr_irq, irq_p) \
92
- __attribute__ ((used)) \
93
- __attribute__ ((section(STRINGIFY(_CONCAT(.gnu.linkonce.isr_irq, irq_p))))) = \
94
- {isr_param_p, isr_p}; \
77
+ _ISR_DECLARE(irq_p, 0, isr_p, isr_param_p); \
95
78
irq_p; \
96
79
})
97
80
0 commit comments