5 /* Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
9 #ifndef _HW_REG_ACCESS_H_
10 #define _HW_REG_ACCESS_H_
12 //*****************************************************************************
14 // Macros for hardware access, both direct and via the bit-band region.
16 //*****************************************************************************
18 (*((volatile unsigned int *)(x)))
20 (*((volatile unsigned short *)(x)))
22 (*((volatile unsigned char *)(x)))
23 #define HWREGBITW(x, b) \
24 HWREG(((unsigned int)(x) & 0xF0000000) | 0x02000000 | \
25 (((unsigned int)(x) & 0x000FFFFF) << 5) | ((b) << 2))
26 #define HWREGBITH(x, b) \
27 HWREGH(((unsigned int)(x) & 0xF0000000) | 0x02000000 | \
28 (((unsigned int)(x) & 0x000FFFFF) << 5) | ((b) << 2))
29 #define HWREGBITB(x, b) \
30 HWREGB(((unsigned int)(x) & 0xF0000000) | 0x02000000 | \
31 (((unsigned int)(x) & 0x000FFFFF) << 5) | ((b) << 2))
35 #endif // __HW_TYPES_H__