Choco OS  V.0.16.9.0
Join to the chocolate world
RMaps - Register Maps module

Module for managing register maps definitions. More...

Macros

#define oC_RegisterOffset_(REGISTER_NAME)
 Macro for receiving name of register offset type. More...
 
#define oC_RegisterAccess_(REGISTER_NAME)
 Macro for receiving name of register access type. More...
 
#define oC_RegisterMap_(REGISTER_MAP_NAME)
 Macro for receiving name of register map type. More...
 
#define oC_Make_RegisterMapWithRegisters(REGISTER_MAP_NAME)
 Special macro for calling registers list from register map definition file with MAKE_REGISTER macro as argument. More...
 

Enumerations

Detailed Description

The module contains interface for accessing register maps data. Types in this module are created using definitions from the oc_rmaps_defs.h file. By using this module you can get information about access (Read/Write) and offset (from base address) of registers in registers maps. The register map is just a group of registers with the same base address - each register in register map should have different offset, that will be added to the base address, but it is not required for this implementation. You can also define more registers with the same offset. The only requirement is to use different names of registers - each register must have different name.
When you want to port the system to new architecture, you should start by define definitions in the oc_rmaps_defs.h file, that is connected to this interface.

Macro Definition Documentation

#define oC_Make_RegisterMapWithRegisters (   REGISTER_MAP_NAME)

The macro is helper for creating types with using definitions from the definition file. For example:

#define MAKE_REGISTER(REGISTER_NAME,OFFSET,ACCESS) #REGISTER_NAME ,
// The definition of names of registers from the FLASH register map
const char * FlashRegisterNames[] = {
};
#undefine MAKE_REGISTER

Definition at line 113 of file oc_rmaps.h.

#define oC_RegisterAccess_ (   REGISTER_NAME)

The macro helps to receive name of an enumerator in oC_RegisterAccess_t type.

Parameters
REGISTER_NAMEName of register from the register map definition file.

Definition at line 81 of file oc_rmaps.h.

#define oC_RegisterMap_ (   REGISTER_MAP_NAME)

The macro helps to receive name of an enumerator in oC_RegisterMap_t type.

Parameters
REGISTER_MAP_NAMEName of register map from the register map definition file.

Definition at line 93 of file oc_rmaps.h.

#define oC_RegisterOffset_ (   REGISTER_NAME)

The macro helps to receive name of an enumerator in oC_RegisterOffset_t type.

Parameters
REGISTER_NAMEName of register from the register map definition file.

Definition at line 69 of file oc_rmaps.h.

Enumeration Type Documentation

The type is for storing access of registers. It is created by macros using definitions from the oc_rmaps_defs.h file.

Definition at line 153 of file oc_rmaps.h.

The type is created according to definitions in oc_rmaps_defs.h file. It can be used for indexing register maps by their names.

Definition at line 167 of file oc_rmaps.h.

The type is for storing offset of registers. It is created by macros using definitions from the oc_rmaps_defs.h file.

This can be used for accessing to registers.

See also
oC_Register

Definition at line 138 of file oc_rmaps.h.