NMSIS-Core
Version 1.3.1
NMSIS-Core support for Nuclei processor-based devices
|
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... | |
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.
#define __I volatile const |
Defines 'read only' permissions.
Definition at line 56 of file nmsis_compiler.h.
#define __IM volatile const |
Defines 'read only' structure member permissions.
Definition at line 65 of file nmsis_compiler.h.
#define __IO volatile |
Defines 'read / write' permissions.
Definition at line 61 of file nmsis_compiler.h.
#define __IOM volatile |
Defines 'read/write' structure member permissions.
Definition at line 69 of file nmsis_compiler.h.
#define __O volatile |
Defines 'write only' permissions.
Definition at line 59 of file nmsis_compiler.h.
#define __OM volatile |
Defines 'write only' structure member permissions.
Definition at line 67 of file nmsis_compiler.h.
#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:
[in] | field | Name of the register bit field. |
[in] | value | Value of register. This parameter is interpreted as an uint32_t type. |
Definition at line 99 of file nmsis_compiler.h.
#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:
[in] | field | Name of the register bit field. |
[in] | value | Value of the bit field. This parameter is interpreted as an uint32_t type. |
Definition at line 84 of file nmsis_compiler.h.