arch/xtensa: Add z_arch_irq_is_enabled()
This function got dropped, and is needed for dynamic interrupt support Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
74d26094f8
commit
915739e724
|
@ -209,3 +209,11 @@ void *xtensa_excint1_c(int *interrupted_stack)
|
|||
return z_get_next_switch_handle(interrupted_stack);
|
||||
}
|
||||
|
||||
int z_arch_irq_is_enabled(unsigned int irq)
|
||||
{
|
||||
u32_t ie;
|
||||
|
||||
__asm__ volatile("rsr.intenable %0" : "=r"(ie));
|
||||
|
||||
return (ie & (1 << irq)) != 0;
|
||||
}
|
||||
|
|
|
@ -82,6 +82,8 @@ static ALWAYS_INLINE bool z_arch_irq_unlocked(unsigned int key)
|
|||
return (key & 0xf) == 0; /* INTLEVEL field */
|
||||
}
|
||||
|
||||
extern int z_arch_irq_is_enabled(unsigned int irq);
|
||||
|
||||
#include <irq.h>
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_ARCH_XTENSA_XTENSA_IRQ_H_ */
|
||||
|
|
Loading…
Reference in a new issue