Zephyr API 3.6.99
Loading...
Searching...
No Matches
irq.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 Intel corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
11#ifndef ZEPHYR_INCLUDE_IRQ_H_
12#define ZEPHYR_INCLUDE_IRQ_H_
13
14/* Pull in the arch-specific implementations */
15#include <zephyr/arch/cpu.h>
16
17#ifndef _ASMLANGUAGE
18#include <zephyr/toolchain.h>
19#include <zephyr/types.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
48#define IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
49 ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p)
50
64static inline int
65irq_connect_dynamic(unsigned int irq, unsigned int priority,
66 void (*routine)(const void *parameter),
67 const void *parameter, uint32_t flags)
68{
69 return arch_irq_connect_dynamic(irq, priority, routine, parameter,
70 flags);
71}
72
89static inline int
90irq_disconnect_dynamic(unsigned int irq, unsigned int priority,
91 void (*routine)(const void *parameter),
92 const void *parameter, uint32_t flags)
93{
94 return arch_irq_disconnect_dynamic(irq, priority, routine,
95 parameter, flags);
96}
97
136#define IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p) \
137 ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p)
138
146#define ISR_DIRECT_HEADER() ARCH_ISR_DIRECT_HEADER()
147
163#define ISR_DIRECT_FOOTER(check_reschedule) \
164 ARCH_ISR_DIRECT_FOOTER(check_reschedule)
165
174#define ISR_DIRECT_PM() ARCH_ISR_DIRECT_PM()
175
205#define ISR_DIRECT_DECLARE(name) ARCH_ISR_DIRECT_DECLARE(name)
206
248#ifdef CONFIG_SMP
249unsigned int z_smp_global_lock(void);
250#define irq_lock() z_smp_global_lock()
251#else
252#define irq_lock() arch_irq_lock()
253#endif
254
276#ifdef CONFIG_SMP
277void z_smp_global_unlock(unsigned int key);
278#define irq_unlock(key) z_smp_global_unlock(key)
279#else
280#define irq_unlock(key) arch_irq_unlock(key)
281#endif
282
290#define irq_enable(irq) arch_irq_enable(irq)
291
299#define irq_disable(irq) arch_irq_disable(irq)
300
310#define irq_is_enabled(irq) arch_irq_is_enabled(irq)
311
316#ifdef __cplusplus
317}
318#endif
319
320#endif /* ASMLANGUAGE */
321#endif /* ZEPHYR_INCLUDE_IRQ_H_ */
int arch_irq_disconnect_dynamic(unsigned int irq, unsigned int priority, void(*routine)(const void *parameter), const void *parameter, uint32_t flags)
Arch-specific hook to dynamically uninstall a shared interrupt.
int arch_irq_connect_dynamic(unsigned int irq, unsigned int priority, void(*routine)(const void *parameter), const void *parameter, uint32_t flags)
Arch-specific hook to install a dynamic interrupt.
static int irq_connect_dynamic(unsigned int irq, unsigned int priority, void(*routine)(const void *parameter), const void *parameter, uint32_t flags)
Configure a dynamic interrupt.
Definition irq.h:65
static int irq_disconnect_dynamic(unsigned int irq, unsigned int priority, void(*routine)(const void *parameter), const void *parameter, uint32_t flags)
Disconnect a dynamic interrupt.
Definition irq.h:90
flags
Definition parser.h:96
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Macros to abstract toolchain specific capabilities.