Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
irq.h File Reference

Public interface for configuring interrupts. More...

#include <zephyr/arch/cpu.h>
#include <limits.h>
#include <stdbool.h>
#include <zephyr/toolchain.h>
#include <zephyr/types.h>

Go to the source code of this file.

Macros

#define IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p)
 Initialize an interrupt handler.
#define IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p)
 Initialize a 'direct' interrupt handler.
#define ISR_DIRECT_HEADER()
 Common tasks before executing the body of an ISR.
#define ISR_DIRECT_FOOTER(check_reschedule)
 Common tasks before exiting the body of an ISR.
#define ISR_DIRECT_PM()
 Perform power management idle exit logic.
#define ISR_DIRECT_DECLARE(name)
 Helper macro to declare a direct interrupt service routine.
#define irq_lock()
 Lock interrupts.
#define irq_unlock(key)
 Unlock interrupts.
#define irq_enable(irq)
 Enable an IRQ.
#define irq_disable(irq)
 Disable an IRQ.
#define irq_is_enabled(irq)
 Get IRQ enable state.
#define K_IRQ_ACTIVE_NONE   UINT_MAX
 Value returned by k_irq_get_active() outside interrupt context.

Functions

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.
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.
static ALWAYS_INLINE unsigned int k_irq_lock (void)
 Lock interrupts; namespaced equivalent of irq_lock().
static ALWAYS_INLINE void k_irq_unlock (unsigned int key)
 Unlock interrupts; namespaced equivalent of irq_unlock().
static ALWAYS_INLINE void k_irq_enable (unsigned int irq)
 Enable an IRQ; namespaced equivalent of irq_enable().
static ALWAYS_INLINE void k_irq_disable (unsigned int irq)
 Disable an IRQ; namespaced equivalent of irq_disable().
static ALWAYS_INLINE int k_irq_is_enabled (unsigned int irq)
 Get IRQ enable state; namespaced equivalent of irq_is_enabled().
static ALWAYS_INLINE int k_irq_connect_dynamic (unsigned int irq, unsigned int priority, void(*routine)(const void *parameter), const void *parameter, uint32_t flags)
 Configure a dynamic interrupt; namespaced equivalent of irq_connect_dynamic().
static ALWAYS_INLINE int k_irq_disconnect_dynamic (unsigned int irq, unsigned int priority, void(*routine)(const void *parameter), const void *parameter, uint32_t flags)
 Disconnect a dynamic interrupt; namespaced equivalent of irq_disconnect_dynamic().
static ALWAYS_INLINE void k_irq_clear_pending (unsigned int irq)
 Clear the pending state of an IRQ.
static ALWAYS_INLINE void k_irq_set_pending (unsigned int irq)
 Set the pending state of an IRQ.
static ALWAYS_INLINE bool k_irq_is_pending (unsigned int irq)
 Get IRQ pending state.
static ALWAYS_INLINE unsigned int k_irq_get_active (void)
 Get the IRQ currently being serviced on this CPU.

Detailed Description

Public interface for configuring interrupts.