nrfx_glue.h

nRF5 SDK v15.0.0

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_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

Functions

static void _NRFX_IRQ_PRIORITY_SET (IRQn_Type irq_number, uint8_t priority)
static void _NRFX_IRQ_ENABLE (IRQn_Type irq_number)
static bool _NRFX_IRQ_IS_ENABLED (IRQn_Type irq_number)
static void _NRFX_IRQ_DISABLE (IRQn_Type irq_number)
static void _NRFX_IRQ_PENDING_SET (IRQn_Type irq_number)
static void _NRFX_IRQ_PENDING_CLEAR (IRQn_Type irq_number)
static bool _NRFX_IRQ_IS_PENDING (IRQn_Type irq_number)

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 )
Value:
((((pri) > 1) && ((pri) < 4)) || \
(((pri) > 4) && ((pri) < 8)))
#define NRFX_ASSERT ( expression ) ASSERT(expression)

Macro for placing a runtime assertion.

Parameters
expression Expression to evaluate.
#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.