File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
drivers/interrupt_controller Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 12
12
#include <zephyr/init.h>
13
13
#include <zephyr/irq.h>
14
14
#include <zephyr/kernel.h>
15
+ #include <zephyr/sys/util.h>
15
16
16
- #define SEVONPEND (1 << 4)
17
- #define WFITOWFE (1 << 3)
17
+ #define SEVONPEND BIT( 4)
18
+ #define WFITOWFE BIT( 3)
18
19
19
20
void arch_irq_enable (unsigned int irq )
20
21
{
21
- PFIC -> IENR [irq / 32 ] = 1 << (irq % 32 );
22
+ PFIC -> IENR [irq / 32 ] = BIT (irq % 32 );
22
23
}
23
24
24
25
void arch_irq_disable (unsigned int irq )
25
26
{
26
- PFIC -> IRER [irq / 32 ] = 1 << (irq % 32 );
27
+ PFIC -> IRER [irq / 32 ] = BIT (irq % 32 );
27
28
}
28
29
29
30
int arch_irq_is_enabled (unsigned int irq )
30
31
{
31
- return ((PFIC -> ISR [irq >> 5 ] & ( 1 << ( irq & 0x1F ) )) != 0 );
32
+ return ((PFIC -> ISR [irq >> 5 ] & BIT ( irq & 0x1F )) != 0 );
32
33
}
33
34
34
35
static int pfic_init (void )
You can’t perform that action at this time.
0 commit comments