Loading...
Searching...
No Matches
nrfx_glue.h File Reference

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

Detailed Description

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

Author
Nordic Semiconductor ASA

Definition in file nrfx_glue.h.

Go to the source code of this file.

#define NRFX_ASSERT(expression)
 Macro for placing a runtime assertion.
 
#define NRFX_STATIC_ASSERT(expression)
 Macro for placing a compile time assertion.
 
#define NRFX_IRQ_PRIORITY_SET(irq_number, priority)
 Macro for setting the priority of a specific IRQ.
 
#define NRFX_IRQ_ENABLE(irq_number)
 Macro for enabling a specific IRQ.
 
#define NRFX_IRQ_IS_ENABLED(irq_number)
 Macro for checking if a specific IRQ is enabled.
 
#define NRFX_IRQ_DISABLE(irq_number)
 Macro for disabling a specific IRQ.
 
#define NRFX_IRQ_PENDING_SET(irq_number)
 Macro for setting a specific IRQ as pending.
 
#define NRFX_IRQ_PENDING_CLEAR(irq_number)
 Macro for clearing the pending status of a specific IRQ.
 
#define NRFX_IRQ_IS_PENDING(irq_number)
 Macro for checking the pending status of a specific IRQ.
 
#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.
 
#define NRFX_DELAY_US(us_time)
 Macro for delaying the code execution for at least the specified time.
 
#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.
 
#define NRFX_ATOMIC_FETCH_OR(p_data, value)
 Macro for running a bitwise OR operation on an atomic object and returning its previous value.
 
#define NRFX_ATOMIC_FETCH_AND(p_data, value)
 Macro for running a bitwise AND operation on an atomic object and returning its previous value.
 
#define NRFX_ATOMIC_FETCH_XOR(p_data, value)
 Macro for running a bitwise XOR operation on an atomic object and returning its previous value.
 
#define NRFX_ATOMIC_FETCH_ADD(p_data, value)
 Macro for running an addition operation on an atomic object and returning its previous value.
 
#define NRFX_ATOMIC_FETCH_SUB(p_data, value)
 Macro for running a subtraction operation on an atomic object and returning its previous value.
 
#define NRFX_ATOMIC_CAS(p_data, old_value, new_value)
 Macro for running compare and swap on an atomic object.
 
#define NRFX_CLZ(value)
 Macro for counting leading zeros.
 
#define NRFX_CTZ(value)
 Macro for counting trailing zeros.
 
#define NRFX_CUSTOM_ERROR_CODES   0
 When set to a non-zero value, this macro specifies that the nrfx_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.
 

Macro Definition Documentation

◆ NRFX_ASSERT

#define NRFX_ASSERT (   expression)

Macro for placing a runtime assertion.

Parameters
expressionExpression to be evaluated.

Definition at line 58 of file nrfx_glue.h.

◆ NRFX_ATOMIC_CAS

#define NRFX_ATOMIC_CAS (   p_data,
  old_value,
  new_value 
)

Macro for running compare and swap on an atomic object.

Value is updated to the new value only if it previously equaled old value.

Parameters
[in,out]p_dataAtomic memory pointer.
[in]old_valueExpected old value.
[in]new_valueNew value.
Return values
trueIf value was updated.
falseIf value was not updated because location was not equal to old_value.

Definition at line 221 of file nrfx_glue.h.

◆ 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.

Definition at line 196 of file nrfx_glue.h.

◆ 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.

Definition at line 174 of file nrfx_glue.h.

◆ 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.

Definition at line 163 of file nrfx_glue.h.

◆ 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.

Definition at line 153 of file nrfx_glue.h.

◆ 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.

Definition at line 207 of file nrfx_glue.h.

◆ 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.

Definition at line 185 of file nrfx_glue.h.

◆ nrfx_atomic_t

#define nrfx_atomic_t

Atomic 32-bit unsigned type.

Definition at line 143 of file nrfx_glue.h.

◆ NRFX_CLZ

#define NRFX_CLZ (   value)

Macro for counting leading zeros.

Parameters
[in]valueA word value.
Returns
Number of leading 0-bits in value, starting at the most significant bit position. If x is 0, the result is undefined.

Definition at line 231 of file nrfx_glue.h.

◆ NRFX_CRITICAL_SECTION_ENTER

#define NRFX_CRITICAL_SECTION_ENTER ( )

Macro for entering into a critical section.

Definition at line 122 of file nrfx_glue.h.

◆ NRFX_CRITICAL_SECTION_EXIT

#define NRFX_CRITICAL_SECTION_EXIT ( )

Macro for exiting from a critical section.

Definition at line 125 of file nrfx_glue.h.

◆ NRFX_CTZ

#define NRFX_CTZ (   value)

Macro for counting trailing zeros.

Parameters
[in]valueA word value.
Returns
Number of trailing 0-bits in value, starting at the least significant bit position. If x is 0, the result is undefined.

Definition at line 241 of file nrfx_glue.h.

◆ NRFX_CUSTOM_ERROR_CODES

#define NRFX_CUSTOM_ERROR_CODES   0

When set to a non-zero value, this macro specifies that the nrfx_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.

Definition at line 249 of file nrfx_glue.h.

◆ NRFX_DELAY_DWT_BASED

#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.

Definition at line 133 of file nrfx_glue.h.

◆ 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.

Definition at line 140 of file nrfx_glue.h.

◆ NRFX_DPPI_CHANNELS_USED

#define NRFX_DPPI_CHANNELS_USED   0

Bitmask that defines DPPI channels that are reserved for use outside of the nrfx library.

Definition at line 259 of file nrfx_glue.h.

◆ NRFX_DPPI_GROUPS_USED

#define NRFX_DPPI_GROUPS_USED   0

Bitmask that defines DPPI groups that are reserved for use outside of the nrfx library.

Definition at line 262 of file nrfx_glue.h.

◆ NRFX_EGUS_USED

#define NRFX_EGUS_USED   0

Bitmask that defines EGU instances that are reserved for use outside of the nrfx library.

Definition at line 274 of file nrfx_glue.h.

◆ NRFX_EVENT_READBACK_ENABLED

#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.

Definition at line 256 of file nrfx_glue.h.

◆ NRFX_GPIOTE_CHANNELS_USED

#define NRFX_GPIOTE_CHANNELS_USED   0

Bitmask that defines GPIOTE channels that are reserved for use outside of the nrfx library.

Definition at line 271 of file nrfx_glue.h.

◆ NRFX_IRQ_DISABLE

#define NRFX_IRQ_DISABLE (   irq_number)

Macro for disabling a specific IRQ.

Parameters
irq_numberIRQ number.

Definition at line 97 of file nrfx_glue.h.

◆ NRFX_IRQ_ENABLE

#define NRFX_IRQ_ENABLE (   irq_number)

Macro for enabling a specific IRQ.

Parameters
irq_numberIRQ number.

Definition at line 80 of file nrfx_glue.h.

◆ 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.

Definition at line 90 of file nrfx_glue.h.

◆ 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.

Definition at line 119 of file nrfx_glue.h.

◆ 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.

Definition at line 111 of file nrfx_glue.h.

◆ NRFX_IRQ_PENDING_SET

#define NRFX_IRQ_PENDING_SET (   irq_number)

Macro for setting a specific IRQ as pending.

Parameters
irq_numberIRQ number.

Definition at line 104 of file nrfx_glue.h.

◆ 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.

Definition at line 73 of file nrfx_glue.h.

◆ NRFX_PPI_CHANNELS_USED

#define NRFX_PPI_CHANNELS_USED   0

Bitmask that defines PPI channels that are reserved for use outside of the nrfx library.

Definition at line 265 of file nrfx_glue.h.

◆ NRFX_PPI_GROUPS_USED

#define NRFX_PPI_GROUPS_USED   0

Bitmask that defines PPI groups that are reserved for use outside of the nrfx library.

Definition at line 268 of file nrfx_glue.h.

◆ NRFX_STATIC_ASSERT

#define NRFX_STATIC_ASSERT (   expression)

Macro for placing a compile time assertion.

Parameters
expressionExpression to be evaluated.

Definition at line 65 of file nrfx_glue.h.

◆ NRFX_TIMERS_USED

#define NRFX_TIMERS_USED   0

Bitmask that defines TIMER instances that are reserved for use outside of the nrfx library.

Definition at line 277 of file nrfx_glue.h.