@ -13,6 +13,10 @@
# define CONFIG_GEN_IRQ_START_VECTOR 0
# define CONFIG_GEN_IRQ_START_VECTOR 0
/**
* @ cond INTERNAL_HIDDEN
*/
/*
/*
* Call this function to enable the specified interrupts .
* Call this function to enable the specified interrupts .
*
*
@ -42,6 +46,7 @@ static inline void z_xt_ints_off(unsigned int mask)
__asm__ volatile ( " wsr.intenable %0; rsync " : : " r " ( val ) ) ;
__asm__ volatile ( " wsr.intenable %0; rsync " : : " r " ( val ) ) ;
}
}
/*
/*
* Call this function to set the specified ( s / w ) interrupt .
* Call this function to set the specified ( s / w ) interrupt .
*/
*/
@ -54,6 +59,10 @@ static inline void z_xt_set_intset(unsigned int arg)
# endif
# endif
}
}
/**
* INTERNAL_HIDDEN @ endcond
*/
# ifdef CONFIG_MULTI_LEVEL_INTERRUPTS
# ifdef CONFIG_MULTI_LEVEL_INTERRUPTS
/* for _soc_irq_*() */
/* for _soc_irq_*() */
@ -94,19 +103,29 @@ extern int z_soc_irq_connect_dynamic(unsigned int irq, unsigned int priority,
# define CONFIG_NUM_IRQS XCHAL_NUM_INTERRUPTS
# define CONFIG_NUM_IRQS XCHAL_NUM_INTERRUPTS
# define arch_irq_enable(irq) z_ xtensa_irq_enable(irq)
# define arch_irq_enable(irq) xtensa_irq_enable(irq)
# define arch_irq_disable(irq) z_ xtensa_irq_disable(irq)
# define arch_irq_disable(irq) xtensa_irq_disable(irq)
# define arch_irq_is_enabled(irq) z_ xtensa_irq_is_enabled(irq)
# define arch_irq_is_enabled(irq) xtensa_irq_is_enabled(irq)
# endif
# endif
static ALWAYS_INLINE void z_xtensa_irq_enable ( uint32_t irq )
/**
* @ brief Enable interrupt on Xtensa core .
*
* @ param irq Interrupt to be enabled .
*/
static ALWAYS_INLINE void xtensa_irq_enable ( uint32_t irq )
{
{
z_xt_ints_on ( 1 < < irq ) ;
z_xt_ints_on ( 1 < < irq ) ;
}
}
static ALWAYS_INLINE void z_xtensa_irq_disable ( uint32_t irq )
/**
* @ brief Disable interrupt on Xtensa core .
*
* @ param irq Interrupt to be disabled .
*/
static ALWAYS_INLINE void xtensa_irq_disable ( uint32_t irq )
{
{
z_xt_ints_off ( 1 < < irq ) ;
z_xt_ints_off ( 1 < < irq ) ;
}
}
@ -131,7 +150,14 @@ static ALWAYS_INLINE bool arch_irq_unlocked(unsigned int key)
return ( key & 0xf ) = = 0 ; /* INTLEVEL field */
return ( key & 0xf ) = = 0 ; /* INTLEVEL field */
}
}
extern int z_xtensa_irq_is_enabled ( unsigned int irq ) ;
/**
* @ brief Query if an interrupt is enabled on Xtensa core .
*
* @ param irq Interrupt to be queried .
*
* @ return True if interrupt is enabled , false otherwise .
*/
extern int xtensa_irq_is_enabled ( unsigned int irq ) ;
# include <zephyr/irq.h>
# include <zephyr/irq.h>