nRF5 SDK v15.2.0
Modules | Data Structures | Macros | Functions
Section variables iterator

Modules

 Section iterator configuration
 

Data Structures

struct  nrf_section_t
 Single section description structure. More...
 
struct  nrf_section_set_t
 Set of the sections description structure. More...
 
struct  nrf_section_iter_t
 Section iterator structure. More...
 

Macros

#define NRF_SECTION_SET_DEF(_name, _type, _count)
 Create a set of sections. More...
 
#define NRF_SECTION_SET_ITEM_REGISTER(_name, _priority, _var)
 Macro to declare a variable and register it in the section set. More...
 

Functions

void nrf_section_iter_init (nrf_section_iter_t *p_iter, nrf_section_set_t const *p_set)
 Function for initializing the section set iterator. More...
 
void nrf_section_iter_next (nrf_section_iter_t *p_iter)
 Function for incrementing iterator. More...
 
static void * nrf_section_iter_get (nrf_section_iter_t const *p_iter)
 Function for getting the element pointed to by the iterator. More...
 

Detailed Description

Macro Definition Documentation

#define NRF_SECTION_SET_DEF (   _name,
  _type,
  _count 
)

Create a set of sections.

Note
This macro reserves memory for the given set of sections.

A set of sections, is an ordered collections of sections.

Parameters
[in]_nameName of the set.
[in]_typeType of the elements stored in the sections.
[in]_countNumber of the sections in the set. This parameter is ignored in case of GCC.
#define NRF_SECTION_SET_ITEM_REGISTER (   _name,
  _priority,
  _var 
)

Macro to declare a variable and register it in the section set.

Note
The order of the section in the set is based on the priority. The order with which variables are placed in a section is dependant on the order with which the linker encouters the variables during linking.
Parameters
[in]_nameName of the section set.
[in]_priorityPriority of the desired section.
[in]_varThe variable to register in the given section.

Function Documentation

static void* nrf_section_iter_get ( nrf_section_iter_t const *  p_iter)
inlinestatic

Function for getting the element pointed to by the iterator.

Parameters
[in]p_iterPointer to the iterator.
Return values
Pointerto the element or NULL if iterator points end of the set.
void nrf_section_iter_init ( nrf_section_iter_t p_iter,
nrf_section_set_t const *  p_set 
)

Function for initializing the section set iterator.

Parameters
[in]p_iterPointer to the iterator.
[in]p_setPointer to the sections set.
void nrf_section_iter_next ( nrf_section_iter_t p_iter)

Function for incrementing iterator.

Parameters
[in]p_iterPointer to the iterator.

Documentation feedback | Developer Zone | Subscribe | Updated