nrfx 2.5
Macros
nrfx_glue.h

This file contains macros that should be implemented according to the needs of the host environment into which nrfx is integrated. More...

Macros

#define NRFX_ASSERT(expression)
 Macro for placing a runtime assertion. More...
 
#define NRFX_STATIC_ASSERT(expression)
 Macro for placing a compile time assertion. More...
 
#define NRFX_IRQ_PRIORITY_SET(irq_number, priority)
 Macro for setting the priority of a specific IRQ. More...
 
#define NRFX_IRQ_ENABLE(irq_number)
 Macro for enabling a specific IRQ. More...
 
#define NRFX_IRQ_IS_ENABLED(irq_number)
 Macro for checking if a specific IRQ is enabled. More...
 
#define NRFX_IRQ_DISABLE(irq_number)
 Macro for disabling a specific IRQ. More...
 
#define NRFX_IRQ_PENDING_SET(irq_number)
 Macro for setting a specific IRQ as pending. More...
 
#define NRFX_IRQ_PENDING_CLEAR(irq_number)
 Macro for clearing the pending status of a specific IRQ. More...
 
#define NRFX_IRQ_IS_PENDING(irq_number)
 Macro for checking the pending status of a specific IRQ. More...
 
#define NRFX_CRITICAL_SECTION_ENTER()
 Macro for entering into a critical section.
 
#define NRFX_CRITICAL_SECTION_EXIT()
 Macro for exiting from a critical section.
 
#define NRFX_DELAY_DWT_BASED   0
 When set to a non-zero value, this macro specifies that nrfx_coredep_delay_us uses a precise DWT-based solution. A compilation error is generated if the DWT unit is not present in the SoC used.
 
#define NRFX_DELAY_US(us_time)
 Macro for delaying the code execution for at least the specified time. More...
 
#define nrfx_atomic_t
 Atomic 32-bit unsigned type.
 
#define NRFX_ATOMIC_FETCH_STORE(p_data, value)
 Macro for storing a value to an atomic object and returning its previous value. More...
 
#define NRFX_ATOMIC_FETCH_OR(p_data, value)
 Macro for running a bitwise OR operation on an atomic object and returning its previous value. More...
 
#define NRFX_ATOMIC_FETCH_AND(p_data, value)
 Macro for running a bitwise AND operation on an atomic object and returning its previous value. More...
 
#define NRFX_ATOMIC_FETCH_XOR(p_data, value)
 Macro for running a bitwise XOR operation on an atomic object and returning its previous value. More...
 
#define NRFX_ATOMIC_FETCH_ADD(p_data, value)
 Macro for running an addition operation on an atomic object and returning its previous value. More...
 
#define NRFX_ATOMIC_FETCH_SUB(p_data, value)
 Macro for running a subtraction operation on an atomic object and returning its previous value. More...
 
#define NRFX_CUSTOM_ERROR_CODES   0
 When set to a non-zero value, this macro specifies that the Global Error Codes and the nrfx_err_t type itself are defined in a customized way and the default definitions from <nrfx_error.h> should not be used.
 
#define NRFX_EVENT_READBACK_ENABLED   1
 When set to a non-zero value, this macro specifies that inside HALs the event registers are read back after clearing, on devices that otherwise could defer the actual register modification.
 
#define NRFX_DPPI_CHANNELS_USED   0
 Bitmask that defines DPPI channels that are reserved for use outside of the nrfx library.
 
#define NRFX_DPPI_GROUPS_USED   0
 Bitmask that defines DPPI groups that are reserved for use outside of the nrfx library.
 
#define NRFX_PPI_CHANNELS_USED   0
 Bitmask that defines PPI channels that are reserved for use outside of the nrfx library.
 
#define NRFX_PPI_GROUPS_USED   0
 Bitmask that defines PPI groups that are reserved for use outside of the nrfx library.
 
#define NRFX_GPIOTE_CHANNELS_USED   0
 Bitmask that defines GPIOTE channels that are reserved for use outside of the nrfx library.
 
#define NRFX_EGUS_USED   0
 Bitmask that defines EGU instances that are reserved for use outside of the nrfx library.
 
#define NRFX_TIMERS_USED   0
 Bitmask that defines TIMER instances that are reserved for use outside of the nrfx library.
 

Detailed Description

This file contains macros that should be implemented according to the needs of the host environment into which nrfx is integrated.

Macro Definition Documentation

◆ NRFX_ASSERT

#define NRFX_ASSERT (   expression)

Macro for placing a runtime assertion.

Parameters
expressionExpression to be evaluated.

◆ NRFX_ATOMIC_FETCH_ADD

#define NRFX_ATOMIC_FETCH_ADD (   p_data,
  value 
)

Macro for running an addition operation on an atomic object and returning its previous value.

Parameters
[in]p_dataAtomic memory pointer.
[in]valueValue of the second operand in the ADD operation.
Returns
Previous value of the atomic object.

◆ NRFX_ATOMIC_FETCH_AND

#define NRFX_ATOMIC_FETCH_AND (   p_data,
  value 
)

Macro for running a bitwise AND operation on an atomic object and returning its previous value.

Parameters
[in]p_dataAtomic memory pointer.
[in]valueValue of the second operand in the AND operation.
Returns
Previous value of the atomic object.

◆ NRFX_ATOMIC_FETCH_OR

#define NRFX_ATOMIC_FETCH_OR (   p_data,
  value 
)

Macro for running a bitwise OR operation on an atomic object and returning its previous value.

Parameters
[in]p_dataAtomic memory pointer.
[in]valueValue of the second operand in the OR operation.
Returns
Previous value of the atomic object.

◆ NRFX_ATOMIC_FETCH_STORE

#define NRFX_ATOMIC_FETCH_STORE (   p_data,
  value 
)

Macro for storing a value to an atomic object and returning its previous value.

Parameters
[in]p_dataAtomic memory pointer.
[in]valueValue to store.
Returns
Previous value of the atomic object.

◆ NRFX_ATOMIC_FETCH_SUB

#define NRFX_ATOMIC_FETCH_SUB (   p_data,
  value 
)

Macro for running a subtraction operation on an atomic object and returning its previous value.

Parameters
[in]p_dataAtomic memory pointer.
[in]valueValue of the second operand in the SUB operation.
Returns
Previous value of the atomic object.

◆ NRFX_ATOMIC_FETCH_XOR

#define NRFX_ATOMIC_FETCH_XOR (   p_data,
  value 
)

Macro for running a bitwise XOR operation on an atomic object and returning its previous value.

Parameters
[in]p_dataAtomic memory pointer.
[in]valueValue of the second operand in the XOR operation.
Returns
Previous value of the atomic object.

◆ NRFX_DELAY_US

#define NRFX_DELAY_US (   us_time)

Macro for delaying the code execution for at least the specified time.

Parameters
us_timeNumber of microseconds to wait.

◆ NRFX_IRQ_DISABLE

#define NRFX_IRQ_DISABLE (   irq_number)

Macro for disabling a specific IRQ.

Parameters
irq_numberIRQ number.

◆ NRFX_IRQ_ENABLE

#define NRFX_IRQ_ENABLE (   irq_number)

Macro for enabling a specific IRQ.

Parameters
irq_numberIRQ number.

◆ NRFX_IRQ_IS_ENABLED

#define NRFX_IRQ_IS_ENABLED (   irq_number)

Macro for checking if a specific IRQ is enabled.

Parameters
irq_numberIRQ number.
Return values
trueIf the IRQ is enabled.
falseOtherwise.

◆ NRFX_IRQ_IS_PENDING

#define NRFX_IRQ_IS_PENDING (   irq_number)

Macro for checking the pending status of a specific IRQ.

Return values
trueIf the IRQ is pending.
falseOtherwise.

◆ NRFX_IRQ_PENDING_CLEAR

#define NRFX_IRQ_PENDING_CLEAR (   irq_number)

Macro for clearing the pending status of a specific IRQ.

Parameters
irq_numberIRQ number.

◆ NRFX_IRQ_PENDING_SET

#define NRFX_IRQ_PENDING_SET (   irq_number)

Macro for setting a specific IRQ as pending.

Parameters
irq_numberIRQ number.

◆ NRFX_IRQ_PRIORITY_SET

#define NRFX_IRQ_PRIORITY_SET (   irq_number,
  priority 
)

Macro for setting the priority of a specific IRQ.

Parameters
irq_numberIRQ number.
priorityPriority to be set.

◆ NRFX_STATIC_ASSERT

#define NRFX_STATIC_ASSERT (   expression)

Macro for placing a compile time assertion.

Parameters
expressionExpression to be evaluated.

Documentation feedback | Developer Zone | Subscribe | Updated