NMSIS-Core  Version 1.2.0
NMSIS-Core support for Nuclei processor-based devices
Peripheral Access

Naming conventions and optional features for accessing peripherals. More...

Macros

#define __I   volatile const
 Defines 'read only' permissions. More...
 
#define __O   volatile
 Defines 'write only' permissions. More...
 
#define __IO   volatile
 Defines 'read / write' permissions. More...
 
#define __IM   volatile const
 Defines 'read only' structure member permissions. More...
 
#define __OM   volatile
 Defines 'write only' structure member permissions. More...
 
#define __IOM   volatile
 Defines 'read/write' structure member permissions. More...
 
#define _VAL2FLD(field, value)   (((uint32_t)(value) << field ## _Pos) & field ## _Msk)
 Mask and shift a bit field value for use in a register bit range. More...
 
#define _FLD2VAL(field, value)   (((uint32_t)(value) & field ## _Msk) >> field ## _Pos)
 Mask and shift a register value to extract a bit filed value. More...
 

Detailed Description

Naming conventions and optional features for accessing peripherals.

The section below describes the naming conventions, requirements, and optional features for accessing device specific peripherals. Most of the rules also apply to the core peripherals.

The Device Header File <device.h> contains typically these definition and also includes the core specific header files.

Macro Definition Documentation

◆ __I

#define __I   volatile const

Defines 'read only' permissions.

Definition at line 56 of file nmsis_compiler.h.

◆ __IM

#define __IM   volatile const

Defines 'read only' structure member permissions.

Definition at line 65 of file nmsis_compiler.h.

◆ __IO

#define __IO   volatile

Defines 'read / write' permissions.

Definition at line 61 of file nmsis_compiler.h.

◆ __IOM

#define __IOM   volatile

Defines 'read/write' structure member permissions.

Definition at line 69 of file nmsis_compiler.h.

◆ __O

#define __O   volatile

Defines 'write only' permissions.

Definition at line 59 of file nmsis_compiler.h.

◆ __OM

#define __OM   volatile

Defines 'write only' structure member permissions.

Definition at line 67 of file nmsis_compiler.h.

◆ _FLD2VAL

#define _FLD2VAL (   field,
  value 
)    (((uint32_t)(value) & field ## _Msk) >> field ## _Pos)

Mask and shift a register value to extract a bit filed value.

The macro _FLD2VAL uses the #define's _Pos and _Msk of the related bit field to extract the value of a bit field from a register.

Example:

nlbits = _FLD2VAL(CLIC_CLICCFG_NLBIT, ECLIC->CFG);
Parameters
[in]fieldName of the register bit field.
[in]valueValue of register. This parameter is interpreted as an uint32_t type.
Returns
Masked and shifted bit field value.

Definition at line 99 of file nmsis_compiler.h.

◆ _VAL2FLD

#define _VAL2FLD (   field,
  value 
)    (((uint32_t)(value) << field ## _Pos) & field ## _Msk)

Mask and shift a bit field value for use in a register bit range.

The macro _VAL2FLD uses the #define's _Pos and _Msk of the related bit field to shift bit-field values for assigning to a register.

Example:

ECLIC->CFG = _VAL2FLD(CLIC_CLICCFG_NLBIT, 3);
Parameters
[in]fieldName of the register bit field.
[in]valueValue of the bit field. This parameter is interpreted as an uint32_t type.
Returns
Masked and shifted value.

Definition at line 84 of file nmsis_compiler.h.

ECLIC
#define ECLIC
CLIC configuration struct.
Definition: core_feature_eclic.h:175
_FLD2VAL
#define _FLD2VAL(field, value)
Mask and shift a register value to extract a bit filed value.
Definition: nmsis_compiler.h:99
_VAL2FLD
#define _VAL2FLD(field, value)
Mask and shift a bit field value for use in a register bit range.
Definition: nmsis_compiler.h:84