См. документацию.
33 #ifndef _ARCH_ARM_REG_MACROS_H_
34 #define _ARCH_ARM_REG_MACROS_H_ 1
51 #define REG8 volatile unsigned char
52 #define REG16 volatile unsigned short
53 #define REG32 volatile unsigned int
59 #define VBP_REG_PER_BASE_ADDRES(peripheral) LPC_##peripheral##_BASE
61 #define VBP_REG(APB_peripheral,reg_name) (VBP_REG_PER_BASE_ADDRES(APB_peripheral) + reg_name##_Off)
63 #define VBP_REG8(APB_peripheral,reg_name) (*(REG8*) (VBP_REG_PER_BASE_ADDRES(APB_peripheral) + reg_name##_Off))
65 #define VBP_REG16(APB_peripheral,reg_name) (*(REG16*) (VBP_REG_PER_BASE_ADDRES(APB_peripheral) + reg_name##_Off))
67 #define VBP_REG32(APB_peripheral,reg_name) (*(REG32*) (VBP_REG_PER_BASE_ADDRES(APB_peripheral) + reg_name##_Off))