优化设置中断模式api (#7359)
This commit is contained in:
parent
fec989a69f
commit
ac07f40670
|
@ -237,7 +237,7 @@ unsigned int rt_hw_interrupt_get_target_cpus(int vector)
|
|||
*/
|
||||
void rt_hw_interrupt_set_triger_mode(int vector, unsigned int mode)
|
||||
{
|
||||
arm_gic_set_configuration(0, vector, mode);
|
||||
arm_gic_set_configuration(0, vector, mode & IRQ_MODE_MASK);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#define IRQ_MODE_TRIG_LEVEL (0x00) /* Trigger: level triggered interrupt */
|
||||
#define IRQ_MODE_TRIG_EDGE (0x01) /* Trigger: edge triggered interrupt */
|
||||
#define IRQ_MODE_MASK (0x01)
|
||||
|
||||
void rt_hw_vector_init(void);
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ unsigned int rt_hw_interrupt_get_target_cpus(int vector)
|
|||
*/
|
||||
void rt_hw_interrupt_set_triger_mode(int vector, unsigned int mode)
|
||||
{
|
||||
arm_gic_set_configuration(0, vector, mode);
|
||||
arm_gic_set_configuration(0, vector, mode & IRQ_MODE_MASK);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#define IRQ_MODE_TRIG_LEVEL (0x00) /* Trigger: level triggered interrupt */
|
||||
#define IRQ_MODE_TRIG_EDGE (0x01) /* Trigger: edge triggered interrupt */
|
||||
#define IRQ_MODE_MASK (0x01)
|
||||
|
||||
void rt_hw_vector_init(void);
|
||||
|
||||
|
|
Loading…
Reference in New Issue