SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
interrupt.h
Go to the documentation of this file.
1
8/* SPDX-License-Identifier: GPL-2.0+ */
9
10#ifndef __INTERRUPT_H__
11#define __INTERRUPT_H__
12
19static inline void arm32_interrupt_enable(void) {
20 uint32_t tmp;
21
22 __asm__ __volatile__("mrs %0, cpsr\n"
23 "bic %0, %0, #(1<<7)\n"
24 "msr cpsr_cxsf, %0"
25 : "=r"(tmp)
26 :
27 : "memory");
28}
29
36static inline void arm32_interrupt_disable(void) {
37 uint32_t tmp;
38
39 __asm__ __volatile__("mrs %0, cpsr\n"
40 "orr %0, %0, #(1<<7)\n"
41 "msr cpsr_cxsf, %0"
42 : "=r"(tmp)
43 :
44 : "memory");
45}
46
47#endif /* __INTERRUPT_H__ */
static void arm32_interrupt_disable(void)
Disable interrupts in ARM32 mode.
Definition interrupt.h:36
static void arm32_interrupt_enable(void)
Enable interrupts in ARM32 mode.
Definition interrupt.h:19
u32_t uint32_t
Definition stdint.h:13