irq: formalize external zephyr interrupt API
The app-facing interface for configuring interrupts was never formally defined, instead it was defined separately for each arch in their respective arch-specific header files. Occasionally these would go out of sync. Now there is a single irq.h header which defines this interface. To avoid runtime overhead, these map to _arch_* implementations of each that must be defined in headers pulled in by arch/cpu.h. Change-Id: I69afbeff31fd07f981b5b291f3c427296b00a4ef Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
5913dc0cd4
commit
e444825ee3
9 changed files with 166 additions and 32 deletions
|
@ -30,6 +30,7 @@
|
|||
#include <toolchain.h>
|
||||
#include <sections.h>
|
||||
#include <sw_isr_table.h>
|
||||
#include <irq.h>
|
||||
|
||||
extern void __reserved(void);
|
||||
|
||||
|
@ -44,7 +45,7 @@ extern void __reserved(void);
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void irq_enable(unsigned int irq)
|
||||
void _arch_irq_enable(unsigned int irq)
|
||||
{
|
||||
/* before enabling interrupts, ensure that interrupt is cleared */
|
||||
_NvicIrqUnpend(irq);
|
||||
|
@ -60,7 +61,7 @@ void irq_enable(unsigned int irq)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void irq_disable(unsigned int irq)
|
||||
void _arch_irq_disable(unsigned int irq)
|
||||
{
|
||||
_NvicIrqDisable(irq);
|
||||
}
|
||||
|
@ -160,7 +161,7 @@ void _irq_handler_set(unsigned int irq,
|
|||
*
|
||||
* @return the interrupt line number
|
||||
*/
|
||||
int irq_connect_dynamic(unsigned int irq,
|
||||
int _arch_irq_connect_dynamic(unsigned int irq,
|
||||
unsigned int prio,
|
||||
void (*isr)(void *arg),
|
||||
void *arg,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue