irq_arch.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Gunar Schorcht
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
21 #ifndef IRQ_ARCH_H
22 #define IRQ_ARCH_H
23 
24 #include "irq.h"
25 #include "sched.h"
26 #include "thread.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
37 extern volatile uint32_t irq_interrupt_nesting;
38 
48 #define CPU_INUM_GPIO 2
49 #define CPU_INUM_CAN 3
50 #define CPU_INUM_UART 5
51 #define CPU_INUM_RTC 9
52 #define CPU_INUM_I2C 12
53 #define CPU_INUM_WDT 13
54 #define CPU_INUM_SOFTWARE 17
55 #define CPU_INUM_ETH 18
56 #define CPU_INUM_TIMER 19
67 #define irq_isr_enter()
68 #define irq_isr_exit()
69 
78 #define critical_enter() int _irq_state = irq_disable()
79 #define critical_exit() irq_restore(_irq_state)
80 
86 #define critical_enter_var(m) m = irq_disable()
87 #define critical_exit_var(m) irq_restore(m)
88 
90 #ifdef __cplusplus
91 }
92 #endif
93 
94 #endif /* IRQ_ARCH_H */
volatile uint32_t irq_interrupt_nesting
Indicates the interrupt nesting depth.
Threading API.
Scheduler API definition.
IRQ driver interface.