nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches

◆ BM_IRQ_DIRECT_CONNECT

#define BM_IRQ_DIRECT_CONNECT ( _irqn,
_prio,
_handler,
_flags )

#include <bm_irq.h>

Value:
IF_ENABLED(CONFIG_ZERO_LATENCY_IRQS, \
(BUILD_ASSERT(!IS_ZERO_LATENCY(_flags) || ((ZERO_LATENCY_LEVELS == 1) || \
((_prio) < ZERO_LATENCY_LEVELS)), \
"IRQ priority of " STRINGIFY(_handler) \
" is >= " STRINGIFY(ZERO_LATENCY_LEVELS) " and zero latency"))); \
BUILD_ASSERT(IS_ZERO_LATENCY(_flags) || ((_prio) >= BM_IRQ_OFFSET), \
"IRQ priority of " STRINGIFY(_handler) " is < " STRINGIFY(BM_IRQ_OFFSET)); \
IRQ_DIRECT_CONNECT(_irqn, (IS_ZERO_LATENCY(_flags) ? (_prio) : (_prio - BM_IRQ_OFFSET)), \
_handler, (_flags))
#define IS_ZERO_LATENCY(_flags)
Does a bitwise AND operation on _flags to check if IRQ_ZERO_LATENCY is set.
Definition bm_irq.h:35
#define BM_IRQ_OFFSET
Priority offset between Bare Metal and Zephyr interrupt priorities.
Definition bm_irq.h:29

Connect an IRQ to a handler with the specified priority.

Macro that uses the Zephyr IRQ_DIRECT_CONNECT macro but remaps the priority to match the NVIC range. The specified _prio value corresponds directly to the NVIC priority.

A build-time assertion verifies that _prio is within the valid range.

Parameters
_irqnIRQ number.
_prioNVIC interrupt priority.
_handlerInterrupt handler function.
_flagsFlags passed to IRQ_DIRECT_CONNECT.