HPER_REG_FIELD_GET() – extracts the field from the register then right jus
tifies it
HPER_REG_FIELD_SET() – sets the field of the register to the given right jus-
tified value
Example Usage:
HDMA_PRICTL = 0x1234567;
HDMA_PRICTL_RSYNC_SET(HDMA_PRICTL0_ADDR,12);
X = HDMA_PRICTL_RSYNC_GET(HDMA_PRICTL0_ADDR);
X = HDMA_PRICTL_GET(HDMA_PRICTL0_ADDR);
HDMA_PRICTL_SET(HDMA_PRICTL0_ADDR,0x12345678);
HDMA_PRICTL_CFG(HDMA_PRICTL0_ADDR,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
);
In the reference that follows, only the symbolic identifiers for the registers and
fields are given. The macros and constants may be assumed as follows:
HPER_REG_ADDR – always exists
HPER_REG – always exists
HPER_REG_GET – exists if register is readable
HPER_REG_SET – exists if register is write–able
HPER_REG_CFG – exists if register is write–able, only
write-able fields are parameters to this macro
HPER_REG_FIELD_MASK – always exists
HPER_REG_FIELD_SHIFT – always exists
HPER_REG_FIELD_GET – exists if field is readable
HPER_REG_FIELD_SET – exists if field is write–able
The service layer source code uses the HAL extensively to perform its tasks.
One of the things the HAL does for the service layer is abstracts certain differ-
ences of registers between different devices. For example, if a field becomes
larger in a future device, the MASK/SHIFT macros will be adjusted accordingly
and hence, the GET/SET macros still work. It is a good idea to have the
TMS320C6000 Peripherals Reference Guide handy when viewing the HAL
reference.
HAL Reference Introduction
HAL Reference
5-3
Need help?
Do you have a question about the TMS320C6000 and is the answer not in the manual?