1 //*****************************************************************************
\r
3 // hw_types.h - Common types and macros.
\r
5 // Copyright (c) 2005,2006 Luminary Micro, Inc. All rights reserved.
\r
7 // Software License Agreement
\r
9 // Luminary Micro, Inc. (LMI) is supplying this software for use solely and
\r
10 // exclusively on LMI's Stellaris Family of microcontroller products.
\r
12 // The software is owned by LMI and/or its suppliers, and is protected under
\r
13 // applicable copyright laws. All rights are reserved. Any use in violation
\r
14 // of the foregoing restrictions may subject the user to criminal sanctions
\r
15 // under applicable laws, as well as to civil liability for the breach of the
\r
16 // terms and conditions of this license.
\r
18 // THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
\r
19 // OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
\r
20 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
\r
21 // LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
\r
22 // CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
\r
24 // This is part of revision 523 of the Stellaris Driver Library.
\r
26 //*****************************************************************************
\r
28 #ifndef __HW_TYPES_H__
\r
29 #define __HW_TYPES_H__
\r
31 //*****************************************************************************
\r
33 // Define a boolean type, and values for true and false.
\r
35 //*****************************************************************************
\r
36 typedef unsigned char tBoolean;
\r
46 //*****************************************************************************
\r
48 // Macros for hardware access, both direct and via the bit-band region.
\r
50 //*****************************************************************************
\r
52 (*((volatile unsigned long *)(x)))
\r
53 #define HWREGBITW(x, b) \
\r
54 HWREG(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \
\r
55 (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2))
\r
56 #define HWREGBITH(x, b) \
\r
57 HWREG(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \
\r
58 (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2))
\r
59 #define HWREGBITB(x, b) \
\r
60 HWREG(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \
\r
61 (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2))
\r
63 #endif // __HW_TYPES_H__
\r