Common module. More...
Macros |
|
| #define | NRFX_CHECK (module_enabled) (module_enabled) |
|
Macro for checking if the specified identifier is defined and it has a non-zero value.
More...
|
|
| #define | NRFX_CONCAT_2 (p1, p2) NRFX_CONCAT_2_ (p1, p2) |
|
Macro for concatenating two tokens in macro expansion.
More...
|
|
| #define | NRFX_CONCAT_2_ (p1, p2) p1 ## p2 |
|
Internal macro used by
NRFX_CONCAT_2
to perform the expansion in two steps.
|
|
| #define | NRFX_CONCAT_3 (p1, p2, p3) NRFX_CONCAT_3_ (p1, p2, p3) |
|
Macro for concatenating three tokens in macro expansion.
More...
|
|
| #define | NRFX_CONCAT_3_ (p1, p2, p3) p1 ## p2 ## p3 |
|
Internal macro used by
NRFX_CONCAT_3
to perform the expansion in two steps.
|
|
| #define | NRFX_ROUNDED_DIV (a, b) (((a) + ((b) / 2)) / (b)) |
|
Macro for performing rounded integer division (as opposed to truncating the result).
More...
|
|
| #define | NRFX_EASYDMA_LENGTH_VALIDATE (peripheral, length1, length2) |
|
Macro for checking if given lengths of EasyDMA transfers do not exceed the limit of the specified peripheral.
More...
|
|
| #define | NRFX_WAIT_FOR (condition, attempts, delay_us, result) |
|
Macro for waiting until condition is met.
More...
|
|
Typedefs |
|
| typedef void(* | nrfx_irq_handler_t )(void) |
|
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.
More...
|
|
| __STATIC_INLINE IRQn_Type | nrfx_get_irq_number (void const *p_reg) |
|
Function for getting the interrupt number for a specific peripheral.
More...
|
|
| __STATIC_INLINE uint32_t | nrfx_bitpos_to_event (uint32_t bit) |
|
Function for converting an INTEN register bit position to the corresponding event identifier.
More...
|
|
| __STATIC_INLINE uint32_t | nrfx_event_to_bitpos (uint32_t event) |
|
Function for converting an event identifier to the corresponding INTEN register bit position.
More...
|
|
Detailed Description
Common module.
Macro Definition Documentation
| #define NRFX_CHECK | ( | module_enabled | ) | (module_enabled) |
Macro for checking if the specified identifier is defined and it has a non-zero value.
Normally, preprocessors treat all undefined identifiers as having the value zero. However, some tools, like static code analyzers, may issue a warning when such identifier is evaluated. This macro gives the possibility to suppress such warnings only in places where this macro is used for evaluation, not in the whole analyzed code.
| #define NRFX_CONCAT_2 | ( | p1, | |
| p2 | |||
| ) | NRFX_CONCAT_2_ (p1, p2) |
Macro for concatenating two tokens in macro expansion.
- Note
- This macro is expanded in two steps so that tokens given as macros themselves are fully expanded before they are merged.
- Parameters
-
p1 First token. p2 Second token.
- Returns
- The two tokens merged into one, unless they cannot together form a valid token (in such case, the preprocessor issues a warning and does not perform the concatenation).
- See Also
- NRFX_CONCAT_3
| #define NRFX_CONCAT_3 | ( | p1, | |
| p2, | |||
| p3 | |||
| ) | NRFX_CONCAT_3_ (p1, p2, p3) |
Macro for concatenating three tokens in macro expansion.
- Note
- This macro is expanded in two steps so that tokens given as macros themselves are fully expanded before they are merged.
- Parameters
-
p1 First token. p2 Second token. p3 Third token.
- Returns
- The three tokens merged into one, unless they cannot together form a valid token (in such case, the preprocessor issues a warning and does not perform the concatenation).
- See Also
- NRFX_CONCAT_2
| #define NRFX_EASYDMA_LENGTH_VALIDATE | ( | peripheral, | |
| length1, | |||
| length2 | |||
| ) |
Macro for checking if given lengths of EasyDMA transfers do not exceed the limit of the specified peripheral.
- Parameters
-
peripheral Peripheral to check the lengths against. length1 First length to be checked. length2 Second length to be checked (pass 0 if not needed).
- Returns
| #define NRFX_ROUNDED_DIV | ( | a, | |
| b | |||
| ) | (((a) + ((b) / 2)) / (b)) |
Macro for performing rounded integer division (as opposed to truncating the result).
- Parameters
-
a Numerator. b Denominator.
- Returns
-
Rounded (integer) result of dividing
abyb.
| #define NRFX_WAIT_FOR | ( | condition, | |
| attempts, | |||
| delay_us, | |||
| result | |||
| ) |
Macro for waiting until condition is met.
- Parameters
-
[in] condition Condition to meet. [in] attempts Maximum number of condition checks. Must not be 0. [in] delay_us Delay between consecutive checks, in microseconds. [out] result Boolean variable to store the result of the wait process. Set to true if the condition is met or false otherwise.
Enumeration Type Documentation
| enum nrfx_drv_state_t |
Function Documentation
| __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
-
bit INTEN register bit position.
- Returns
- Event identifier.
- See Also
- 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
-
event Event identifier.
- Returns
- INTEN register bit position.
- See Also
- nrfx_bitpos_to_event
| __STATIC_INLINE IRQn_Type nrfx_get_irq_number | ( | void const * | p_reg | ) |
Function for getting the interrupt number for a specific peripheral.
- Parameters
-
[in] p_reg Peripheral base pointer.
- Returns
- Interrupt number associated with the pointed peripheral.
| __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_object Pointer to an object whose location is to be checked.
- Return values
-
true If the pointed object is located in the Data RAM region. false Otherwise.