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) ASSERT(expression) |
|
Macro for placing a runtime assertion.
More...
|
|
| #define | NRFX_STATIC_ASSERT (expression) STATIC_ASSERT (expression) |
|
Macro for placing a compile time assertion.
More...
|
|
| #define | INTERRUPT_PRIORITY_IS_VALID (pri) |
| #define | NRFX_IRQ_PRIORITY_SET (irq_number, priority) _NRFX_IRQ_PRIORITY_SET(irq_number, priority) |
|
Macro for setting the priority of a specific IRQ.
More...
|
|
| #define | NRFX_IRQ_ENABLE (irq_number) _NRFX_IRQ_ENABLE(irq_number) |
|
Macro for enabling a specific IRQ.
More...
|
|
| #define | NRFX_IRQ_IS_ENABLED (irq_number) _NRFX_IRQ_IS_ENABLED(irq_number) |
|
Macro for checking if a specific IRQ is enabled.
More...
|
|
| #define | NRFX_IRQ_DISABLE (irq_number) _NRFX_IRQ_DISABLE(irq_number) |
|
Macro for disabling a specific IRQ.
More...
|
|
| #define | NRFX_IRQ_PENDING_SET (irq_number) _NRFX_IRQ_PENDING_SET(irq_number) |
|
Macro for setting a specific IRQ as pending.
More...
|
|
| #define | NRFX_IRQ_PENDING_CLEAR (irq_number) _NRFX_IRQ_PENDING_CLEAR(irq_number) |
|
Macro for clearing the pending status of a specific IRQ.
More...
|
|
| #define | NRFX_IRQ_IS_PENDING (irq_number) _NRFX_IRQ_IS_PENDING(irq_number) |
|
Macro for checking the pending status of a specific IRQ.
More...
|
|
| #define | NRFX_CRITICAL_SECTION_ENTER () CRITICAL_REGION_ENTER () |
|
Macro for entering into a critical section.
|
|
| #define | NRFX_CRITICAL_SECTION_EXIT () CRITICAL_REGION_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) nrfx_coredep_delay_us (us_time) |
| #define | nrfx_atomic_t nrfx_atomic_u32_t |
|
Atomic 32 bit unsigned type.
|
|
| #define | NRFX_ATOMIC_FETCH_STORE (p_data, value) nrfx_atomic_u32_fetch_store (p_data, value) |
|
Stores value to an atomic object and returns previously stored value.
More...
|
|
| #define | NRFX_ATOMIC_FETCH_OR (p_data, value) nrfx_atomic_u32_fetch_or (p_data, value) |
|
Performs logical OR operation on an atomic object and returns previously stored value.
More...
|
|
| #define | NRFX_ATOMIC_FETCH_AND (p_data, value) nrfx_atomic_u32_fetch_and (p_data, value) |
|
Performs logical AND operation on an atomic object and returns previously stored value.
More...
|
|
| #define | NRFX_ATOMIC_FETCH_XOR (p_data, value) nrfx_atomic_u32_fetch_xor (p_data, value) |
|
Performs logical XOR operation on an atomic object and returns previously stored value.
More...
|
|
| #define | NRFX_ATOMIC_FETCH_ADD (p_data, value) nrfx_atomic_u32_fetch_add (p_data, value) |
|
Performs logical ADD operation on an atomic object and returns previously stored value.
More...
|
|
| #define | NRFX_ATOMIC_FETCH_SUB (p_data, value) nrfx_atomic_u32_fetch_sub (p_data, value) |
|
Performs logical SUB operation on an atomic object and returns previously stored value.
More...
|
|
| #define | NRFX_CUSTOM_ERROR_CODES 1 |
When set to a non-zero value, this macro specifies that the
Global Error Codes
and the
ret_code_t
type itself are defined in a customized way and the default definitions from
<nrfx_error.h>
should not be used.
|
|
| #define | NRFX_SUCCESS NRF_SUCCESS |
| #define | NRFX_ERROR_INTERNAL NRF_ERROR_INTERNAL |
| #define | NRFX_ERROR_NO_MEM NRF_ERROR_NO_MEM |
| #define | NRFX_ERROR_NOT_SUPPORTED NRF_ERROR_NOT_SUPPORTED |
| #define | NRFX_ERROR_INVALID_PARAM NRF_ERROR_INVALID_PARAM |
| #define | NRFX_ERROR_INVALID_STATE NRF_ERROR_INVALID_STATE |
| #define | NRFX_ERROR_INVALID_LENGTH NRF_ERROR_INVALID_LENGTH |
| #define | NRFX_ERROR_TIMEOUT NRF_ERROR_TIMEOUT |
| #define | NRFX_ERROR_FORBIDDEN NRF_ERROR_FORBIDDEN |
| #define | NRFX_ERROR_NULL NRF_ERROR_NULL |
| #define | NRFX_ERROR_INVALID_ADDR NRF_ERROR_INVALID_ADDR |
| #define | NRFX_ERROR_BUSY NRF_ERROR_BUSY |
| #define | NRFX_ERROR_ALREADY_INITIALIZED NRF_ERROR_MODULE_ALREADY_INITIALIZED |
| #define | NRFX_ERROR_DRV_TWI_ERR_OVERRUN NRF_ERROR_DRV_TWI_ERR_OVERRUN |
| #define | NRFX_ERROR_DRV_TWI_ERR_ANACK NRF_ERROR_DRV_TWI_ERR_ANACK |
| #define | NRFX_ERROR_DRV_TWI_ERR_DNACK NRF_ERROR_DRV_TWI_ERR_DNACK |
| #define | NRFX_PPI_CHANNELS_USED NRF_PPI_CHANNELS_USED |
|
Bitmask defining PPI channels reserved to be used outside of nrfx.
|
|
| #define | NRFX_PPI_GROUPS_USED NRF_PPI_GROUPS_USED |
|
Bitmask defining PPI groups reserved to be used outside of nrfx.
|
|
| #define | NRFX_SWI_USED NRF_SWI_USED |
|
Bitmask defining SWI instances reserved to be used outside of nrfx.
|
|
| #define | NRFX_TIMERS_USED NRF_TIMERS_USED |
|
Bitmask defining TIMER instances reserved to be used outside of nrfx.
|
|
Typedefs |
|
| typedef ret_code_t | nrfx_err_t |
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
| #define INTERRUPT_PRIORITY_IS_VALID | ( | pri | ) |
| #define NRFX_ASSERT | ( | expression | ) | ASSERT(expression) |
Macro for placing a runtime assertion.
- Parameters
-
expression Expression to evaluate.
| #define NRFX_ATOMIC_FETCH_ADD | ( | p_data, | |
| value | |||
| ) | nrfx_atomic_u32_fetch_add (p_data, value) |
Performs logical ADD operation on an atomic object and returns previously stored value.
- Parameters
-
[in] p_data Atomic memory pointer. [in] value Value of second operand of ADD operation.
- Returns
- Old value stored into atomic object.
| #define NRFX_ATOMIC_FETCH_AND | ( | p_data, | |
| value | |||
| ) | nrfx_atomic_u32_fetch_and (p_data, value) |
Performs logical AND operation on an atomic object and returns previously stored value.
- Parameters
-
[in] p_data Atomic memory pointer. [in] value Value of second operand of AND operation.
- Returns
- Old value stored into atomic object.
| #define NRFX_ATOMIC_FETCH_OR | ( | p_data, | |
| value | |||
| ) | nrfx_atomic_u32_fetch_or (p_data, value) |
Performs logical OR operation on an atomic object and returns previously stored value.
- Parameters
-
[in] p_data Atomic memory pointer. [in] value Value of second operand of OR operation.
- Returns
- Old value stored into atomic object.
| #define NRFX_ATOMIC_FETCH_STORE | ( | p_data, | |
| value | |||
| ) | nrfx_atomic_u32_fetch_store (p_data, value) |
Stores value to an atomic object and returns previously stored value.
- Parameters
-
[in] p_data Atomic memory pointer. [in] value Value to store.
- Returns
- Old value stored into atomic object.
| #define NRFX_ATOMIC_FETCH_SUB | ( | p_data, | |
| value | |||
| ) | nrfx_atomic_u32_fetch_sub (p_data, value) |
Performs logical SUB operation on an atomic object and returns previously stored value.
- Parameters
-
[in] p_data Atomic memory pointer. [in] value Value of second operand of SUB operation.
- Returns
- Old value stored into atomic object.
| #define NRFX_ATOMIC_FETCH_XOR | ( | p_data, | |
| value | |||
| ) | nrfx_atomic_u32_fetch_xor (p_data, value) |
Performs logical XOR operation on an atomic object and returns previously stored value.
- Parameters
-
[in] p_data Atomic memory pointer. [in] value Value of second operand of XOR operation.
- Returns
- Old value stored into atomic object.
| #define NRFX_IRQ_DISABLE | ( | irq_number | ) | _NRFX_IRQ_DISABLE(irq_number) |
Macro for disabling a specific IRQ.
- Parameters
-
irq_number IRQ number.
| #define NRFX_IRQ_ENABLE | ( | irq_number | ) | _NRFX_IRQ_ENABLE(irq_number) |
Macro for enabling a specific IRQ.
- Parameters
-
irq_number IRQ number.
| #define NRFX_IRQ_IS_ENABLED | ( | irq_number | ) | _NRFX_IRQ_IS_ENABLED(irq_number) |
Macro for checking if a specific IRQ is enabled.
- Parameters
-
irq_number IRQ number.
- Return values
-
true If the IRQ is enabled. false Otherwise.
| #define NRFX_IRQ_IS_PENDING | ( | irq_number | ) | _NRFX_IRQ_IS_PENDING(irq_number) |
Macro for checking the pending status of a specific IRQ.
- Return values
-
true If the IRQ is pending. false Otherwise.
| #define NRFX_IRQ_PENDING_CLEAR | ( | irq_number | ) | _NRFX_IRQ_PENDING_CLEAR(irq_number) |
Macro for clearing the pending status of a specific IRQ.
- Parameters
-
irq_number IRQ number.
| #define NRFX_IRQ_PENDING_SET | ( | irq_number | ) | _NRFX_IRQ_PENDING_SET(irq_number) |
Macro for setting a specific IRQ as pending.
- Parameters
-
irq_number IRQ number.
| #define NRFX_IRQ_PRIORITY_SET | ( | irq_number, | |
| priority | |||
| ) | _NRFX_IRQ_PRIORITY_SET(irq_number, priority) |
Macro for setting the priority of a specific IRQ.
- Parameters
-
irq_number IRQ number. priority Priority to set.
| #define NRFX_STATIC_ASSERT | ( | expression | ) | STATIC_ASSERT (expression) |
Macro for placing a compile time assertion.
- Parameters
-
expression Expression to evaluate.