nrfx 4.5.0
Loading...
Searching...
No Matches
Common module

Common module. More...

Macros

#define NRFX_RELEASE_VER_MAJOR   4
 Symbol specifying major number of the current nrfx version.
 
#define NRFX_RELEASE_VER_MINOR   5
 Symbol specifying minor number of the current nrfx version.
 
#define NRFX_RELEASE_VER_MICRO   0
 Symbol specifying micro number of the current nrfx version.
 

Typedefs

typedef void(* nrfx_irq_handler_t) (void *p_context)
 IRQ handler type.
 

Enumerations

enum  nrfx_drv_state_t {
  NRFX_DRV_STATE_UNINITIALIZED ,
  NRFX_DRV_STATE_INITIALIZED ,
  NRFX_DRV_STATE_POWERED_ON
}
 Driver state. More...
 

Functions

__STATIC_INLINE bool nrfx_is_in_ram (void const *p_object)
 Function for checking if an object is placed in the Data RAM region.
 
__STATIC_INLINE bool nrfx_is_word_aligned (void const *p_object)
 Function for checking if an object is aligned to a 32-bit word.
 
__STATIC_INLINE IRQn_Type nrfx_get_irq_number (void const *p_reg)
 Function for getting the interrupt number for the specified peripheral.
 
__STATIC_INLINE uint32_t nrfx_bitpos_to_event (uint32_t bit)
 Function for converting an INTEN register bit position to the corresponding event identifier.
 
__STATIC_INLINE uint32_t nrfx_event_to_bitpos (uint32_t event)
 Function for converting an event identifier to the corresponding INTEN register bit position.
 

Detailed Description

Common module.

Typedef Documentation

◆ nrfx_irq_handler_t

typedef void(* nrfx_irq_handler_t) (void *p_context)

IRQ handler type.

Parameters
[in]p_contextContext passed to the interrupt handler.

Enumeration Type Documentation

◆ nrfx_drv_state_t

Driver state.

Enumerator
NRFX_DRV_STATE_UNINITIALIZED 

Uninitialized.

NRFX_DRV_STATE_INITIALIZED 

Initialized but powered off.

NRFX_DRV_STATE_POWERED_ON 

Initialized and powered on.

Function Documentation

◆ nrfx_bitpos_to_event()

__STATIC_INLINE uint32_t nrfx_bitpos_to_event ( uint32_t bit)

Function for converting an INTEN register bit position to the corresponding event identifier.

The event identifier is the offset between the event register address and the peripheral base address, and is equal (thus, can be directly cast) to the corresponding value of the enumerated type from HAL (nrf_*_event_t).

Parameters
[in]bitINTEN register bit position.
Returns
Event identifier.
See also
nrfx_event_to_bitpos

◆ nrfx_event_to_bitpos()

__STATIC_INLINE uint32_t nrfx_event_to_bitpos ( uint32_t event)

Function for converting an event identifier to the corresponding INTEN register bit position.

The event identifier is the offset between the event register address and the peripheral base address, and is equal (thus, can be directly cast) to the corresponding value of the enumerated type from HAL (nrf_*_event_t).

Parameters
[in]eventEvent identifier.
Returns
INTEN register bit position.
See also
nrfx_bitpos_to_event

◆ nrfx_get_irq_number()

__STATIC_INLINE IRQn_Type nrfx_get_irq_number ( void const * p_reg)

Function for getting the interrupt number for the specified peripheral.

Warning
This function is valid only for peripherals with a single interrupt line.
Parameters
[in]p_regPeripheral base pointer.
Returns
Interrupt number associated with the pointed peripheral.

◆ nrfx_is_in_ram()

__STATIC_INLINE bool nrfx_is_in_ram ( void const * p_object)

Function for checking if an object is placed in the Data RAM region.

Several peripherals (the ones using EasyDMA) require the transfer buffers to be placed in the Data RAM region. This function can be used to check if this condition is met.

Parameters
[in]p_objectPointer to an object whose location is to be checked.
Return values
trueThe pointed object is located in the Data RAM region.
falseThe pointed object is not located in the Data RAM region.

◆ nrfx_is_word_aligned()

__STATIC_INLINE bool nrfx_is_word_aligned ( void const * p_object)

Function for checking if an object is aligned to a 32-bit word.

Several peripherals (the ones using EasyDMA) require the transfer buffers to be aligned to a 32-bit word. This function can be used to check if this condition is met.

Parameters
[in]p_objectPointer to an object whose location is to be checked.
Return values
trueThe pointed object is aligned to a 32-bit word.
falseThe pointed object is not aligned to a 32-bit word.