This file contains macros that should be implemented according to the needs of the host environment into which nrfx is integrated. More...
This file contains macros that should be implemented according to the needs of the host environment into which nrfx is integrated.
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. | |
#define NRFX_ASSERT | ( | expression | ) |
Macro for placing a runtime assertion.
expression | Expression to be evaluated. |
Definition at line 58 of file nrfx_glue.h.
#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.
[in,out] | p_data | Atomic memory pointer. |
[in] | old_value | Expected old value. |
[in] | new_value | New value. |
true | If value was updated. |
false | If value was not updated because location was not equal to old_value . |
Definition at line 221 of file nrfx_glue.h.
#define NRFX_ATOMIC_FETCH_ADD | ( | p_data, | |
value | |||
) |
Macro for running an addition operation on an atomic object and returning its previous value.
[in] | p_data | Atomic memory pointer. |
[in] | value | Value of the second operand in the ADD operation. |
Definition at line 196 of file nrfx_glue.h.
#define NRFX_ATOMIC_FETCH_AND | ( | p_data, | |
value | |||
) |
Macro for running a bitwise AND operation on an atomic object and returning its previous value.
[in] | p_data | Atomic memory pointer. |
[in] | value | Value of the second operand in the AND operation. |
Definition at line 174 of file nrfx_glue.h.
#define NRFX_ATOMIC_FETCH_OR | ( | p_data, | |
value | |||
) |
Macro for running a bitwise OR operation on an atomic object and returning its previous value.
[in] | p_data | Atomic memory pointer. |
[in] | value | Value of the second operand in the OR operation. |
Definition at line 163 of file nrfx_glue.h.
#define NRFX_ATOMIC_FETCH_STORE | ( | p_data, | |
value | |||
) |
Macro for storing a value to an atomic object and returning its previous value.
[in] | p_data | Atomic memory pointer. |
[in] | value | Value to store. |
Definition at line 153 of file nrfx_glue.h.
#define NRFX_ATOMIC_FETCH_SUB | ( | p_data, | |
value | |||
) |
Macro for running a subtraction operation on an atomic object and returning its previous value.
[in] | p_data | Atomic memory pointer. |
[in] | value | Value of the second operand in the SUB operation. |
Definition at line 207 of file nrfx_glue.h.
#define NRFX_ATOMIC_FETCH_XOR | ( | p_data, | |
value | |||
) |
Macro for running a bitwise XOR operation on an atomic object and returning its previous value.
[in] | p_data | Atomic memory pointer. |
[in] | value | Value of the second operand in the XOR operation. |
Definition at line 185 of file nrfx_glue.h.
#define nrfx_atomic_t |
Atomic 32-bit unsigned type.
Definition at line 143 of file nrfx_glue.h.
#define NRFX_CLZ | ( | value | ) |
Macro for counting leading zeros.
[in] | value | A word value. |
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.
#define NRFX_CRITICAL_SECTION_ENTER | ( | ) |
Macro for entering into a critical section.
Definition at line 122 of file nrfx_glue.h.
#define NRFX_CRITICAL_SECTION_EXIT | ( | ) |
Macro for exiting from a critical section.
Definition at line 125 of file nrfx_glue.h.
#define NRFX_CTZ | ( | value | ) |
Macro for counting trailing zeros.
[in] | value | A word value. |
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.
#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.
#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.
#define NRFX_DELAY_US | ( | us_time | ) |
Macro for delaying the code execution for at least the specified time.
us_time | Number of microseconds to wait. |
Definition at line 140 of file nrfx_glue.h.
#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.
#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.
#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.
#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.
#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.
#define NRFX_IRQ_DISABLE | ( | irq_number | ) |
Macro for disabling a specific IRQ.
irq_number | IRQ number. |
Definition at line 97 of file nrfx_glue.h.
#define NRFX_IRQ_ENABLE | ( | irq_number | ) |
Macro for enabling a specific IRQ.
irq_number | IRQ number. |
Definition at line 80 of file nrfx_glue.h.
#define NRFX_IRQ_IS_ENABLED | ( | irq_number | ) |
Macro for checking if a specific IRQ is enabled.
irq_number | IRQ number. |
true | If the IRQ is enabled. |
false | Otherwise. |
Definition at line 90 of file nrfx_glue.h.
#define NRFX_IRQ_IS_PENDING | ( | irq_number | ) |
Macro for checking the pending status of a specific IRQ.
true | If the IRQ is pending. |
false | Otherwise. |
Definition at line 119 of file nrfx_glue.h.
#define NRFX_IRQ_PENDING_CLEAR | ( | irq_number | ) |
Macro for clearing the pending status of a specific IRQ.
irq_number | IRQ number. |
Definition at line 111 of file nrfx_glue.h.
#define NRFX_IRQ_PENDING_SET | ( | irq_number | ) |
Macro for setting a specific IRQ as pending.
irq_number | IRQ number. |
Definition at line 104 of file nrfx_glue.h.
#define NRFX_IRQ_PRIORITY_SET | ( | irq_number, | |
priority | |||
) |
Macro for setting the priority of a specific IRQ.
irq_number | IRQ number. |
priority | Priority to be set. |
Definition at line 73 of file nrfx_glue.h.
#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.
#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.
#define NRFX_STATIC_ASSERT | ( | expression | ) |
Macro for placing a compile time assertion.
expression | Expression to be evaluated. |
Definition at line 65 of file nrfx_glue.h.
#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.