123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- #ifndef ZEPHYR_INCLUDE_SW_ISR_TABLE_H_
- #define ZEPHYR_INCLUDE_SW_ISR_TABLE_H_
- #if !defined(_ASMLANGUAGE)
- #include <zephyr/types.h>
- #include <toolchain.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- struct _isr_table_entry {
- const void *arg;
- void (*isr)(const void *);
- #ifdef CONFIG_TRACING_IRQ_PROFILER
- uint32_t irq_cnt;
- uint32_t max_irq_cycles;
- uint32_t irq_total_us;
- #endif
- };
- extern struct _isr_table_entry _sw_isr_table[];
- struct _isr_list {
-
- int32_t irq;
-
- int32_t flags;
-
- void *func;
-
- const void *param;
- };
- #define ISR_FLAG_DIRECT BIT(0)
- #define _MK_ISR_NAME(x, y) __MK_ISR_NAME(x, y)
- #define __MK_ISR_NAME(x, y) __isr_ ## x ## _irq_ ## y
- #ifndef __UVISION_VERSION
- #define Z_ISR_DECLARE(irq, flags, func, param) \
- static Z_DECL_ALIGN(struct _isr_list) Z_GENERIC_SECTION(.intList) \
- __used _MK_ISR_NAME(func, __COUNTER__) = \
- {irq, flags, (void *)&func, (const void *)param}
- #else
- #define Z_ISR_DECLARE(irq, flags, func, param) \
- _sw_isr_table[irq].arg = (void *)param; \
- _sw_isr_table[irq].isr = (void (*)(const void *))func;
- #endif
- #define IRQ_TABLE_SIZE (CONFIG_NUM_IRQS - CONFIG_GEN_IRQ_START_VECTOR)
- #ifdef CONFIG_DYNAMIC_INTERRUPTS
- void z_isr_install(unsigned int irq, void (*routine)(const void *),
- const void *param);
- #endif
- #ifdef __cplusplus
- }
- #endif
- #endif
- #endif
|