Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2850 dpurdie 1
/********************************************************************
2
*
3
* Standard register and bit definitions for the Texas Instruments
4
* MSP430 microcontroller.
5
*
6
* This file supports assembler and C development for
7
* MSP430F6637 devices.
8
*
9
* Texas Instruments, Version 1.2
10
*
11
* Rev. 1.0, Setup
12
* Rev. 1.1  Changed access type of TimerA/B registers to word only
13
* Rev. 1.2  Fixed definition of RTCTEV__0000 and RTCTEV__1200
14
*           Removed not availabe bits RTCMODE and RTCSSELx
15
*
16
*
17
********************************************************************/
18
 
19
#ifndef __MSP430F6637
20
#define __MSP430F6637
21
 
22
#ifdef __cplusplus
23
extern "C" {
24
#endif
25
 
26
 
27
/*----------------------------------------------------------------------------*/
28
/* PERIPHERAL FILE MAP                                                        */
29
/*----------------------------------------------------------------------------*/
30
 
31
/* External references resolved by a device-specific linker command file */
32
#define SFR_8BIT(address)   extern volatile unsigned char address
33
#define SFR_16BIT(address)  extern volatile unsigned int address
34
//#define SFR_20BIT(address)  extern volatile unsigned int address
35
typedef void (* __SFR_FARPTR)();
36
#define SFR_20BIT(address) extern __SFR_FARPTR address
37
#define SFR_32BIT(address)  extern volatile unsigned long address
38
 
39
 
40
 
41
/************************************************************
42
* STANDARD BITS
43
************************************************************/
44
 
45
#define BIT0                   (0x0001)
46
#define BIT1                   (0x0002)
47
#define BIT2                   (0x0004)
48
#define BIT3                   (0x0008)
49
#define BIT4                   (0x0010)
50
#define BIT5                   (0x0020)
51
#define BIT6                   (0x0040)
52
#define BIT7                   (0x0080)
53
#define BIT8                   (0x0100)
54
#define BIT9                   (0x0200)
55
#define BITA                   (0x0400)
56
#define BITB                   (0x0800)
57
#define BITC                   (0x1000)
58
#define BITD                   (0x2000)
59
#define BITE                   (0x4000)
60
#define BITF                   (0x8000)
61
 
62
/************************************************************
63
* STATUS REGISTER BITS
64
************************************************************/
65
 
66
#define C                      (0x0001)
67
#define Z                      (0x0002)
68
#define N                      (0x0004)
69
#define V                      (0x0100)
70
#define GIE                    (0x0008)
71
#define CPUOFF                 (0x0010)
72
#define OSCOFF                 (0x0020)
73
#define SCG0                   (0x0040)
74
#define SCG1                   (0x0080)
75
 
76
/* Low Power Modes coded with Bits 4-7 in SR */
77
 
78
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
79
#define LPM0                   (CPUOFF)
80
#define LPM1                   (SCG0+CPUOFF)
81
#define LPM2                   (SCG1+CPUOFF)
82
#define LPM3                   (SCG1+SCG0+CPUOFF)
83
#define LPM4                   (SCG1+SCG0+OSCOFF+CPUOFF)
84
/* End #defines for assembler */
85
 
86
#else /* Begin #defines for C */
87
#define LPM0_bits              (CPUOFF)
88
#define LPM1_bits              (SCG0+CPUOFF)
89
#define LPM2_bits              (SCG1+CPUOFF)
90
#define LPM3_bits              (SCG1+SCG0+CPUOFF)
91
#define LPM4_bits              (SCG1+SCG0+OSCOFF+CPUOFF)
92
 
93
#include "in430.h"
94
 
95
#define LPM0         _bis_SR_register(LPM0_bits)         /* Enter Low Power Mode 0 */
96
#define LPM0_EXIT    _bic_SR_register_on_exit(LPM0_bits) /* Exit Low Power Mode 0 */
97
#define LPM1         _bis_SR_register(LPM1_bits)         /* Enter Low Power Mode 1 */
98
#define LPM1_EXIT    _bic_SR_register_on_exit(LPM1_bits) /* Exit Low Power Mode 1 */
99
#define LPM2         _bis_SR_register(LPM2_bits)         /* Enter Low Power Mode 2 */
100
#define LPM2_EXIT    _bic_SR_register_on_exit(LPM2_bits) /* Exit Low Power Mode 2 */
101
#define LPM3         _bis_SR_register(LPM3_bits)         /* Enter Low Power Mode 3 */
102
#define LPM3_EXIT    _bic_SR_register_on_exit(LPM3_bits) /* Exit Low Power Mode 3 */
103
#define LPM4         _bis_SR_register(LPM4_bits)         /* Enter Low Power Mode 4 */
104
#define LPM4_EXIT    _bic_SR_register_on_exit(LPM4_bits) /* Exit Low Power Mode 4 */
105
#endif /* End #defines for C */
106
 
107
/************************************************************
108
* CPU
109
************************************************************/
110
#define __MSP430_HAS_MSP430XV2_CPU__                /* Definition to show that it has MSP430XV2 CPU */
111
 
112
/************************************************************
113
* PERIPHERAL FILE MAP
114
************************************************************/
115
 
116
/************************************************************
117
* ADC12 PLUS
118
************************************************************/
119
#define __MSP430_HAS_ADC12_PLUS__                /* Definition to show that Module is available */
120
#define __MSP430_BASEADDRESS_ADC12_PLUS__ 0x0700
121
 
122
SFR_16BIT(ADC12CTL0);                         /* ADC12+ Control 0 */
123
SFR_8BIT(ADC12CTL0_L);                        /* ADC12+ Control 0 */
124
SFR_8BIT(ADC12CTL0_H);                        /* ADC12+ Control 0 */
125
SFR_16BIT(ADC12CTL1);                         /* ADC12+ Control 1 */
126
SFR_8BIT(ADC12CTL1_L);                        /* ADC12+ Control 1 */
127
SFR_8BIT(ADC12CTL1_H);                        /* ADC12+ Control 1 */
128
SFR_16BIT(ADC12CTL2);                         /* ADC12+ Control 2 */
129
SFR_8BIT(ADC12CTL2_L);                        /* ADC12+ Control 2 */
130
SFR_8BIT(ADC12CTL2_H);                        /* ADC12+ Control 2 */
131
SFR_16BIT(ADC12IFG);                          /* ADC12+ Interrupt Flag */
132
SFR_8BIT(ADC12IFG_L);                         /* ADC12+ Interrupt Flag */
133
SFR_8BIT(ADC12IFG_H);                         /* ADC12+ Interrupt Flag */
134
SFR_16BIT(ADC12IE);                           /* ADC12+ Interrupt Enable */
135
SFR_8BIT(ADC12IE_L);                          /* ADC12+ Interrupt Enable */
136
SFR_8BIT(ADC12IE_H);                          /* ADC12+ Interrupt Enable */
137
SFR_16BIT(ADC12IV);                           /* ADC12+ Interrupt Vector Word */
138
SFR_8BIT(ADC12IV_L);                          /* ADC12+ Interrupt Vector Word */
139
SFR_8BIT(ADC12IV_H);                          /* ADC12+ Interrupt Vector Word */
140
 
141
SFR_16BIT(ADC12MEM0);                         /* ADC12 Conversion Memory 0 */
142
SFR_8BIT(ADC12MEM0_L);                        /* ADC12 Conversion Memory 0 */
143
SFR_8BIT(ADC12MEM0_H);                        /* ADC12 Conversion Memory 0 */
144
SFR_16BIT(ADC12MEM1);                         /* ADC12 Conversion Memory 1 */
145
SFR_8BIT(ADC12MEM1_L);                        /* ADC12 Conversion Memory 1 */
146
SFR_8BIT(ADC12MEM1_H);                        /* ADC12 Conversion Memory 1 */
147
SFR_16BIT(ADC12MEM2);                         /* ADC12 Conversion Memory 2 */
148
SFR_8BIT(ADC12MEM2_L);                        /* ADC12 Conversion Memory 2 */
149
SFR_8BIT(ADC12MEM2_H);                        /* ADC12 Conversion Memory 2 */
150
SFR_16BIT(ADC12MEM3);                         /* ADC12 Conversion Memory 3 */
151
SFR_8BIT(ADC12MEM3_L);                        /* ADC12 Conversion Memory 3 */
152
SFR_8BIT(ADC12MEM3_H);                        /* ADC12 Conversion Memory 3 */
153
SFR_16BIT(ADC12MEM4);                         /* ADC12 Conversion Memory 4 */
154
SFR_8BIT(ADC12MEM4_L);                        /* ADC12 Conversion Memory 4 */
155
SFR_8BIT(ADC12MEM4_H);                        /* ADC12 Conversion Memory 4 */
156
SFR_16BIT(ADC12MEM5);                         /* ADC12 Conversion Memory 5 */
157
SFR_8BIT(ADC12MEM5_L);                        /* ADC12 Conversion Memory 5 */
158
SFR_8BIT(ADC12MEM5_H);                        /* ADC12 Conversion Memory 5 */
159
SFR_16BIT(ADC12MEM6);                         /* ADC12 Conversion Memory 6 */
160
SFR_8BIT(ADC12MEM6_L);                        /* ADC12 Conversion Memory 6 */
161
SFR_8BIT(ADC12MEM6_H);                        /* ADC12 Conversion Memory 6 */
162
SFR_16BIT(ADC12MEM7);                         /* ADC12 Conversion Memory 7 */
163
SFR_8BIT(ADC12MEM7_L);                        /* ADC12 Conversion Memory 7 */
164
SFR_8BIT(ADC12MEM7_H);                        /* ADC12 Conversion Memory 7 */
165
SFR_16BIT(ADC12MEM8);                         /* ADC12 Conversion Memory 8 */
166
SFR_8BIT(ADC12MEM8_L);                        /* ADC12 Conversion Memory 8 */
167
SFR_8BIT(ADC12MEM8_H);                        /* ADC12 Conversion Memory 8 */
168
SFR_16BIT(ADC12MEM9);                         /* ADC12 Conversion Memory 9 */
169
SFR_8BIT(ADC12MEM9_L);                        /* ADC12 Conversion Memory 9 */
170
SFR_8BIT(ADC12MEM9_H);                        /* ADC12 Conversion Memory 9 */
171
SFR_16BIT(ADC12MEM10);                        /* ADC12 Conversion Memory 10 */
172
SFR_8BIT(ADC12MEM10_L);                       /* ADC12 Conversion Memory 10 */
173
SFR_8BIT(ADC12MEM10_H);                       /* ADC12 Conversion Memory 10 */
174
SFR_16BIT(ADC12MEM11);                        /* ADC12 Conversion Memory 11 */
175
SFR_8BIT(ADC12MEM11_L);                       /* ADC12 Conversion Memory 11 */
176
SFR_8BIT(ADC12MEM11_H);                       /* ADC12 Conversion Memory 11 */
177
SFR_16BIT(ADC12MEM12);                        /* ADC12 Conversion Memory 12 */
178
SFR_8BIT(ADC12MEM12_L);                       /* ADC12 Conversion Memory 12 */
179
SFR_8BIT(ADC12MEM12_H);                       /* ADC12 Conversion Memory 12 */
180
SFR_16BIT(ADC12MEM13);                        /* ADC12 Conversion Memory 13 */
181
SFR_8BIT(ADC12MEM13_L);                       /* ADC12 Conversion Memory 13 */
182
SFR_8BIT(ADC12MEM13_H);                       /* ADC12 Conversion Memory 13 */
183
SFR_16BIT(ADC12MEM14);                        /* ADC12 Conversion Memory 14 */
184
SFR_8BIT(ADC12MEM14_L);                       /* ADC12 Conversion Memory 14 */
185
SFR_8BIT(ADC12MEM14_H);                       /* ADC12 Conversion Memory 14 */
186
SFR_16BIT(ADC12MEM15);                        /* ADC12 Conversion Memory 15 */
187
SFR_8BIT(ADC12MEM15_L);                       /* ADC12 Conversion Memory 15 */
188
SFR_8BIT(ADC12MEM15_H);                       /* ADC12 Conversion Memory 15 */
189
#define ADC12MEM_              ADC12MEM       /* ADC12 Conversion Memory */
190
#ifdef __ASM_HEADER__
191
#define ADC12MEM               ADC12MEM0      /* ADC12 Conversion Memory (for assembler) */
192
#else
193
#define ADC12MEM               ((int*)        &ADC12MEM0) /* ADC12 Conversion Memory (for C) */
194
#endif
195
 
196
SFR_8BIT(ADC12MCTL0);                         /* ADC12 Memory Control 0 */
197
SFR_8BIT(ADC12MCTL1);                         /* ADC12 Memory Control 1 */
198
SFR_8BIT(ADC12MCTL2);                         /* ADC12 Memory Control 2 */
199
SFR_8BIT(ADC12MCTL3);                         /* ADC12 Memory Control 3 */
200
SFR_8BIT(ADC12MCTL4);                         /* ADC12 Memory Control 4 */
201
SFR_8BIT(ADC12MCTL5);                         /* ADC12 Memory Control 5 */
202
SFR_8BIT(ADC12MCTL6);                         /* ADC12 Memory Control 6 */
203
SFR_8BIT(ADC12MCTL7);                         /* ADC12 Memory Control 7 */
204
SFR_8BIT(ADC12MCTL8);                         /* ADC12 Memory Control 8 */
205
SFR_8BIT(ADC12MCTL9);                         /* ADC12 Memory Control 9 */
206
SFR_8BIT(ADC12MCTL10);                        /* ADC12 Memory Control 10 */
207
SFR_8BIT(ADC12MCTL11);                        /* ADC12 Memory Control 11 */
208
SFR_8BIT(ADC12MCTL12);                        /* ADC12 Memory Control 12 */
209
SFR_8BIT(ADC12MCTL13);                        /* ADC12 Memory Control 13 */
210
SFR_8BIT(ADC12MCTL14);                        /* ADC12 Memory Control 14 */
211
SFR_8BIT(ADC12MCTL15);                        /* ADC12 Memory Control 15 */
212
#define ADC12MCTL_             ADC12MCTL      /* ADC12 Memory Control */
213
#ifdef __ASM_HEADER__
214
#define ADC12MCTL              ADC12MCTL0     /* ADC12 Memory Control (for assembler) */
215
#else
216
#define ADC12MCTL              ((char*)       &ADC12MCTL0) /* ADC12 Memory Control (for C) */
217
#endif
218
 
219
/* ADC12CTL0 Control Bits */
220
#define ADC12SC                (0x0001)       /* ADC12 Start Conversion */
221
#define ADC12ENC               (0x0002)       /* ADC12 Enable Conversion */
222
#define ADC12TOVIE             (0x0004)       /* ADC12 Timer Overflow interrupt enable */
223
#define ADC12OVIE              (0x0008)       /* ADC12 Overflow interrupt enable */
224
#define ADC12ON                (0x0010)       /* ADC12 On/enable */
225
#define ADC12REFON             (0x0020)       /* ADC12 Reference on */
226
#define ADC12REF2_5V           (0x0040)       /* ADC12 Ref 0:1.5V / 1:2.5V */
227
#define ADC12MSC               (0x0080)       /* ADC12 Multiple SampleConversion */
228
#define ADC12SHT00             (0x0100)       /* ADC12 Sample Hold 0 Select Bit: 0 */
229
#define ADC12SHT01             (0x0200)       /* ADC12 Sample Hold 0 Select Bit: 1 */
230
#define ADC12SHT02             (0x0400)       /* ADC12 Sample Hold 0 Select Bit: 2 */
231
#define ADC12SHT03             (0x0800)       /* ADC12 Sample Hold 0 Select Bit: 3 */
232
#define ADC12SHT10             (0x1000)       /* ADC12 Sample Hold 1 Select Bit: 0 */
233
#define ADC12SHT11             (0x2000)       /* ADC12 Sample Hold 1 Select Bit: 1 */
234
#define ADC12SHT12             (0x4000)       /* ADC12 Sample Hold 1 Select Bit: 2 */
235
#define ADC12SHT13             (0x8000)       /* ADC12 Sample Hold 1 Select Bit: 3 */
236
 
237
/* ADC12CTL0 Control Bits */
238
#define ADC12SC_L              (0x0001)       /* ADC12 Start Conversion */
239
#define ADC12ENC_L             (0x0002)       /* ADC12 Enable Conversion */
240
#define ADC12TOVIE_L           (0x0004)       /* ADC12 Timer Overflow interrupt enable */
241
#define ADC12OVIE_L            (0x0008)       /* ADC12 Overflow interrupt enable */
242
#define ADC12ON_L              (0x0010)       /* ADC12 On/enable */
243
#define ADC12REFON_L           (0x0020)       /* ADC12 Reference on */
244
#define ADC12REF2_5V_L         (0x0040)       /* ADC12 Ref 0:1.5V / 1:2.5V */
245
#define ADC12MSC_L             (0x0080)       /* ADC12 Multiple SampleConversion */
246
 
247
/* ADC12CTL0 Control Bits */
248
#define ADC12SHT00_H           (0x0001)       /* ADC12 Sample Hold 0 Select Bit: 0 */
249
#define ADC12SHT01_H           (0x0002)       /* ADC12 Sample Hold 0 Select Bit: 1 */
250
#define ADC12SHT02_H           (0x0004)       /* ADC12 Sample Hold 0 Select Bit: 2 */
251
#define ADC12SHT03_H           (0x0008)       /* ADC12 Sample Hold 0 Select Bit: 3 */
252
#define ADC12SHT10_H           (0x0010)       /* ADC12 Sample Hold 1 Select Bit: 0 */
253
#define ADC12SHT11_H           (0x0020)       /* ADC12 Sample Hold 1 Select Bit: 1 */
254
#define ADC12SHT12_H           (0x0040)       /* ADC12 Sample Hold 1 Select Bit: 2 */
255
#define ADC12SHT13_H           (0x0080)       /* ADC12 Sample Hold 1 Select Bit: 3 */
256
 
257
#define ADC12SHT0_0            (0*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 0 */
258
#define ADC12SHT0_1            (1*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 1 */
259
#define ADC12SHT0_2            (2*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 2 */
260
#define ADC12SHT0_3            (3*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 3 */
261
#define ADC12SHT0_4            (4*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 4 */
262
#define ADC12SHT0_5            (5*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 5 */
263
#define ADC12SHT0_6            (6*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 6 */
264
#define ADC12SHT0_7            (7*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 7 */
265
#define ADC12SHT0_8            (8*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 8 */
266
#define ADC12SHT0_9            (9*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 9 */
267
#define ADC12SHT0_10           (10*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 10 */
268
#define ADC12SHT0_11           (11*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 11 */
269
#define ADC12SHT0_12           (12*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 12 */
270
#define ADC12SHT0_13           (13*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 13 */
271
#define ADC12SHT0_14           (14*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 14 */
272
#define ADC12SHT0_15           (15*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 15 */
273
 
274
#define ADC12SHT1_0            (0*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 0 */
275
#define ADC12SHT1_1            (1*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 1 */
276
#define ADC12SHT1_2            (2*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 2 */
277
#define ADC12SHT1_3            (3*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 3 */
278
#define ADC12SHT1_4            (4*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 4 */
279
#define ADC12SHT1_5            (5*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 5 */
280
#define ADC12SHT1_6            (6*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 6 */
281
#define ADC12SHT1_7            (7*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 7 */
282
#define ADC12SHT1_8            (8*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 8 */
283
#define ADC12SHT1_9            (9*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 9 */
284
#define ADC12SHT1_10           (10*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 10 */
285
#define ADC12SHT1_11           (11*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 11 */
286
#define ADC12SHT1_12           (12*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 12 */
287
#define ADC12SHT1_13           (13*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 13 */
288
#define ADC12SHT1_14           (14*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 14 */
289
#define ADC12SHT1_15           (15*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 15 */
290
 
291
/* ADC12CTL1 Control Bits */
292
#define ADC12BUSY              (0x0001)       /* ADC12 Busy */
293
#define ADC12CONSEQ0           (0x0002)       /* ADC12 Conversion Sequence Select Bit: 0 */
294
#define ADC12CONSEQ1           (0x0004)       /* ADC12 Conversion Sequence Select Bit: 1 */
295
#define ADC12SSEL0             (0x0008)       /* ADC12 Clock Source Select Bit: 0 */
296
#define ADC12SSEL1             (0x0010)       /* ADC12 Clock Source Select Bit: 1 */
297
#define ADC12DIV0              (0x0020)       /* ADC12 Clock Divider Select Bit: 0 */
298
#define ADC12DIV1              (0x0040)       /* ADC12 Clock Divider Select Bit: 1 */
299
#define ADC12DIV2              (0x0080)       /* ADC12 Clock Divider Select Bit: 2 */
300
#define ADC12ISSH              (0x0100)       /* ADC12 Invert Sample Hold Signal */
301
#define ADC12SHP               (0x0200)       /* ADC12 Sample/Hold Pulse Mode */
302
#define ADC12SHS0              (0x0400)       /* ADC12 Sample/Hold Source Bit: 0 */
303
#define ADC12SHS1              (0x0800)       /* ADC12 Sample/Hold Source Bit: 1 */
304
#define ADC12CSTARTADD0        (0x1000)       /* ADC12 Conversion Start Address Bit: 0 */
305
#define ADC12CSTARTADD1        (0x2000)       /* ADC12 Conversion Start Address Bit: 1 */
306
#define ADC12CSTARTADD2        (0x4000)       /* ADC12 Conversion Start Address Bit: 2 */
307
#define ADC12CSTARTADD3        (0x8000)       /* ADC12 Conversion Start Address Bit: 3 */
308
 
309
/* ADC12CTL1 Control Bits */
310
#define ADC12BUSY_L            (0x0001)       /* ADC12 Busy */
311
#define ADC12CONSEQ0_L         (0x0002)       /* ADC12 Conversion Sequence Select Bit: 0 */
312
#define ADC12CONSEQ1_L         (0x0004)       /* ADC12 Conversion Sequence Select Bit: 1 */
313
#define ADC12SSEL0_L           (0x0008)       /* ADC12 Clock Source Select Bit: 0 */
314
#define ADC12SSEL1_L           (0x0010)       /* ADC12 Clock Source Select Bit: 1 */
315
#define ADC12DIV0_L            (0x0020)       /* ADC12 Clock Divider Select Bit: 0 */
316
#define ADC12DIV1_L            (0x0040)       /* ADC12 Clock Divider Select Bit: 1 */
317
#define ADC12DIV2_L            (0x0080)       /* ADC12 Clock Divider Select Bit: 2 */
318
 
319
/* ADC12CTL1 Control Bits */
320
#define ADC12ISSH_H            (0x0001)       /* ADC12 Invert Sample Hold Signal */
321
#define ADC12SHP_H             (0x0002)       /* ADC12 Sample/Hold Pulse Mode */
322
#define ADC12SHS0_H            (0x0004)       /* ADC12 Sample/Hold Source Bit: 0 */
323
#define ADC12SHS1_H            (0x0008)       /* ADC12 Sample/Hold Source Bit: 1 */
324
#define ADC12CSTARTADD0_H      (0x0010)       /* ADC12 Conversion Start Address Bit: 0 */
325
#define ADC12CSTARTADD1_H      (0x0020)       /* ADC12 Conversion Start Address Bit: 1 */
326
#define ADC12CSTARTADD2_H      (0x0040)       /* ADC12 Conversion Start Address Bit: 2 */
327
#define ADC12CSTARTADD3_H      (0x0080)       /* ADC12 Conversion Start Address Bit: 3 */
328
 
329
#define ADC12CONSEQ_0          (0*2u)         /* ADC12 Conversion Sequence Select: 0 */
330
#define ADC12CONSEQ_1          (1*2u)         /* ADC12 Conversion Sequence Select: 1 */
331
#define ADC12CONSEQ_2          (2*2u)         /* ADC12 Conversion Sequence Select: 2 */
332
#define ADC12CONSEQ_3          (3*2u)         /* ADC12 Conversion Sequence Select: 3 */
333
 
334
#define ADC12SSEL_0            (0*8u)         /* ADC12 Clock Source Select: 0 */
335
#define ADC12SSEL_1            (1*8u)         /* ADC12 Clock Source Select: 1 */
336
#define ADC12SSEL_2            (2*8u)         /* ADC12 Clock Source Select: 2 */
337
#define ADC12SSEL_3            (3*8u)         /* ADC12 Clock Source Select: 3 */
338
 
339
#define ADC12DIV_0             (0*0x20u)      /* ADC12 Clock Divider Select: 0 */
340
#define ADC12DIV_1             (1*0x20u)      /* ADC12 Clock Divider Select: 1 */
341
#define ADC12DIV_2             (2*0x20u)      /* ADC12 Clock Divider Select: 2 */
342
#define ADC12DIV_3             (3*0x20u)      /* ADC12 Clock Divider Select: 3 */
343
#define ADC12DIV_4             (4*0x20u)      /* ADC12 Clock Divider Select: 4 */
344
#define ADC12DIV_5             (5*0x20u)      /* ADC12 Clock Divider Select: 5 */
345
#define ADC12DIV_6             (6*0x20u)      /* ADC12 Clock Divider Select: 6 */
346
#define ADC12DIV_7             (7*0x20u)      /* ADC12 Clock Divider Select: 7 */
347
 
348
#define ADC12SHS_0             (0*0x400u)     /* ADC12 Sample/Hold Source: 0 */
349
#define ADC12SHS_1             (1*0x400u)     /* ADC12 Sample/Hold Source: 1 */
350
#define ADC12SHS_2             (2*0x400u)     /* ADC12 Sample/Hold Source: 2 */
351
#define ADC12SHS_3             (3*0x400u)     /* ADC12 Sample/Hold Source: 3 */
352
 
353
#define ADC12CSTARTADD_0       (0*0x1000u)    /* ADC12 Conversion Start Address: 0 */
354
#define ADC12CSTARTADD_1       (1*0x1000u)    /* ADC12 Conversion Start Address: 1 */
355
#define ADC12CSTARTADD_2       (2*0x1000u)    /* ADC12 Conversion Start Address: 2 */
356
#define ADC12CSTARTADD_3       (3*0x1000u)    /* ADC12 Conversion Start Address: 3 */
357
#define ADC12CSTARTADD_4       (4*0x1000u)    /* ADC12 Conversion Start Address: 4 */
358
#define ADC12CSTARTADD_5       (5*0x1000u)    /* ADC12 Conversion Start Address: 5 */
359
#define ADC12CSTARTADD_6       (6*0x1000u)    /* ADC12 Conversion Start Address: 6 */
360
#define ADC12CSTARTADD_7       (7*0x1000u)    /* ADC12 Conversion Start Address: 7 */
361
#define ADC12CSTARTADD_8       (8*0x1000u)    /* ADC12 Conversion Start Address: 8 */
362
#define ADC12CSTARTADD_9       (9*0x1000u)    /* ADC12 Conversion Start Address: 9 */
363
#define ADC12CSTARTADD_10      (10*0x1000u)   /* ADC12 Conversion Start Address: 10 */
364
#define ADC12CSTARTADD_11      (11*0x1000u)   /* ADC12 Conversion Start Address: 11 */
365
#define ADC12CSTARTADD_12      (12*0x1000u)   /* ADC12 Conversion Start Address: 12 */
366
#define ADC12CSTARTADD_13      (13*0x1000u)   /* ADC12 Conversion Start Address: 13 */
367
#define ADC12CSTARTADD_14      (14*0x1000u)   /* ADC12 Conversion Start Address: 14 */
368
#define ADC12CSTARTADD_15      (15*0x1000u)   /* ADC12 Conversion Start Address: 15 */
369
 
370
/* ADC12CTL2 Control Bits */
371
#define ADC12REFBURST          (0x0001)       /* ADC12+ Reference Burst */
372
#define ADC12REFOUT            (0x0002)       /* ADC12+ Reference Out */
373
#define ADC12SR                (0x0004)       /* ADC12+ Sampling Rate */
374
#define ADC12DF                (0x0008)       /* ADC12+ Data Format */
375
#define ADC12RES0              (0x0010)       /* ADC12+ Resolution Bit: 0 */
376
#define ADC12RES1              (0x0020)       /* ADC12+ Resolution Bit: 1 */
377
#define ADC12TCOFF             (0x0080)       /* ADC12+ Temperature Sensor Off */
378
#define ADC12PDIV              (0x0100)       /* ADC12+ predivider 0:/1   1:/4 */
379
 
380
/* ADC12CTL2 Control Bits */
381
#define ADC12REFBURST_L        (0x0001)       /* ADC12+ Reference Burst */
382
#define ADC12REFOUT_L          (0x0002)       /* ADC12+ Reference Out */
383
#define ADC12SR_L              (0x0004)       /* ADC12+ Sampling Rate */
384
#define ADC12DF_L              (0x0008)       /* ADC12+ Data Format */
385
#define ADC12RES0_L            (0x0010)       /* ADC12+ Resolution Bit: 0 */
386
#define ADC12RES1_L            (0x0020)       /* ADC12+ Resolution Bit: 1 */
387
#define ADC12TCOFF_L           (0x0080)       /* ADC12+ Temperature Sensor Off */
388
 
389
/* ADC12CTL2 Control Bits */
390
#define ADC12PDIV_H            (0x0001)       /* ADC12+ predivider 0:/1   1:/4 */
391
 
392
#define ADC12RES_0             (0x0000)       /* ADC12+ Resolution : 8 Bit */
393
#define ADC12RES_1             (0x0010)       /* ADC12+ Resolution : 10 Bit */
394
#define ADC12RES_2             (0x0020)       /* ADC12+ Resolution : 12 Bit */
395
#define ADC12RES_3             (0x0030)       /* ADC12+ Resolution : reserved */
396
 
397
/* ADC12MCTLx Control Bits */
398
#define ADC12INCH0             (0x0001)       /* ADC12 Input Channel Select Bit 0 */
399
#define ADC12INCH1             (0x0002)       /* ADC12 Input Channel Select Bit 1 */
400
#define ADC12INCH2             (0x0004)       /* ADC12 Input Channel Select Bit 2 */
401
#define ADC12INCH3             (0x0008)       /* ADC12 Input Channel Select Bit 3 */
402
#define ADC12SREF0             (0x0010)       /* ADC12 Select Reference Bit 0 */
403
#define ADC12SREF1             (0x0020)       /* ADC12 Select Reference Bit 1 */
404
#define ADC12SREF2             (0x0040)       /* ADC12 Select Reference Bit 2 */
405
#define ADC12EOS               (0x0080)       /* ADC12 End of Sequence */
406
 
407
#define ADC12INCH_0            (0x0000)       /* ADC12 Input Channel 0 */
408
#define ADC12INCH_1            (0x0001)       /* ADC12 Input Channel 1 */
409
#define ADC12INCH_2            (0x0002)       /* ADC12 Input Channel 2 */
410
#define ADC12INCH_3            (0x0003)       /* ADC12 Input Channel 3 */
411
#define ADC12INCH_4            (0x0004)       /* ADC12 Input Channel 4 */
412
#define ADC12INCH_5            (0x0005)       /* ADC12 Input Channel 5 */
413
#define ADC12INCH_6            (0x0006)       /* ADC12 Input Channel 6 */
414
#define ADC12INCH_7            (0x0007)       /* ADC12 Input Channel 7 */
415
#define ADC12INCH_8            (0x0008)       /* ADC12 Input Channel 8 */
416
#define ADC12INCH_9            (0x0009)       /* ADC12 Input Channel 9 */
417
#define ADC12INCH_10           (0x000A)       /* ADC12 Input Channel 10 */
418
#define ADC12INCH_11           (0x000B)       /* ADC12 Input Channel 11 */
419
#define ADC12INCH_12           (0x000C)       /* ADC12 Input Channel 12 */
420
#define ADC12INCH_13           (0x000D)       /* ADC12 Input Channel 13 */
421
#define ADC12INCH_14           (0x000E)       /* ADC12 Input Channel 14 */
422
#define ADC12INCH_15           (0x000F)       /* ADC12 Input Channel 15 */
423
 
424
#define ADC12SREF_0            (0*0x10u)      /* ADC12 Select Reference 0 */
425
#define ADC12SREF_1            (1*0x10u)      /* ADC12 Select Reference 1 */
426
#define ADC12SREF_2            (2*0x10u)      /* ADC12 Select Reference 2 */
427
#define ADC12SREF_3            (3*0x10u)      /* ADC12 Select Reference 3 */
428
#define ADC12SREF_4            (4*0x10u)      /* ADC12 Select Reference 4 */
429
#define ADC12SREF_5            (5*0x10u)      /* ADC12 Select Reference 5 */
430
#define ADC12SREF_6            (6*0x10u)      /* ADC12 Select Reference 6 */
431
#define ADC12SREF_7            (7*0x10u)      /* ADC12 Select Reference 7 */
432
 
433
#define ADC12IE0               (0x0001)       /* ADC12 Memory 0      Interrupt Enable */
434
#define ADC12IE1               (0x0002)       /* ADC12 Memory 1      Interrupt Enable */
435
#define ADC12IE2               (0x0004)       /* ADC12 Memory 2      Interrupt Enable */
436
#define ADC12IE3               (0x0008)       /* ADC12 Memory 3      Interrupt Enable */
437
#define ADC12IE4               (0x0010)       /* ADC12 Memory 4      Interrupt Enable */
438
#define ADC12IE5               (0x0020)       /* ADC12 Memory 5      Interrupt Enable */
439
#define ADC12IE6               (0x0040)       /* ADC12 Memory 6      Interrupt Enable */
440
#define ADC12IE7               (0x0080)       /* ADC12 Memory 7      Interrupt Enable */
441
#define ADC12IE8               (0x0100)       /* ADC12 Memory 8      Interrupt Enable */
442
#define ADC12IE9               (0x0200)       /* ADC12 Memory 9      Interrupt Enable */
443
#define ADC12IE10              (0x0400)       /* ADC12 Memory 10      Interrupt Enable */
444
#define ADC12IE11              (0x0800)       /* ADC12 Memory 11      Interrupt Enable */
445
#define ADC12IE12              (0x1000)       /* ADC12 Memory 12      Interrupt Enable */
446
#define ADC12IE13              (0x2000)       /* ADC12 Memory 13      Interrupt Enable */
447
#define ADC12IE14              (0x4000)       /* ADC12 Memory 14      Interrupt Enable */
448
#define ADC12IE15              (0x8000)       /* ADC12 Memory 15      Interrupt Enable */
449
 
450
#define ADC12IE0_L             (0x0001)       /* ADC12 Memory 0      Interrupt Enable */
451
#define ADC12IE1_L             (0x0002)       /* ADC12 Memory 1      Interrupt Enable */
452
#define ADC12IE2_L             (0x0004)       /* ADC12 Memory 2      Interrupt Enable */
453
#define ADC12IE3_L             (0x0008)       /* ADC12 Memory 3      Interrupt Enable */
454
#define ADC12IE4_L             (0x0010)       /* ADC12 Memory 4      Interrupt Enable */
455
#define ADC12IE5_L             (0x0020)       /* ADC12 Memory 5      Interrupt Enable */
456
#define ADC12IE6_L             (0x0040)       /* ADC12 Memory 6      Interrupt Enable */
457
#define ADC12IE7_L             (0x0080)       /* ADC12 Memory 7      Interrupt Enable */
458
 
459
#define ADC12IE8_H             (0x0001)       /* ADC12 Memory 8      Interrupt Enable */
460
#define ADC12IE9_H             (0x0002)       /* ADC12 Memory 9      Interrupt Enable */
461
#define ADC12IE10_H            (0x0004)       /* ADC12 Memory 10      Interrupt Enable */
462
#define ADC12IE11_H            (0x0008)       /* ADC12 Memory 11      Interrupt Enable */
463
#define ADC12IE12_H            (0x0010)       /* ADC12 Memory 12      Interrupt Enable */
464
#define ADC12IE13_H            (0x0020)       /* ADC12 Memory 13      Interrupt Enable */
465
#define ADC12IE14_H            (0x0040)       /* ADC12 Memory 14      Interrupt Enable */
466
#define ADC12IE15_H            (0x0080)       /* ADC12 Memory 15      Interrupt Enable */
467
 
468
#define ADC12IFG0              (0x0001)       /* ADC12 Memory 0      Interrupt Flag */
469
#define ADC12IFG1              (0x0002)       /* ADC12 Memory 1      Interrupt Flag */
470
#define ADC12IFG2              (0x0004)       /* ADC12 Memory 2      Interrupt Flag */
471
#define ADC12IFG3              (0x0008)       /* ADC12 Memory 3      Interrupt Flag */
472
#define ADC12IFG4              (0x0010)       /* ADC12 Memory 4      Interrupt Flag */
473
#define ADC12IFG5              (0x0020)       /* ADC12 Memory 5      Interrupt Flag */
474
#define ADC12IFG6              (0x0040)       /* ADC12 Memory 6      Interrupt Flag */
475
#define ADC12IFG7              (0x0080)       /* ADC12 Memory 7      Interrupt Flag */
476
#define ADC12IFG8              (0x0100)       /* ADC12 Memory 8      Interrupt Flag */
477
#define ADC12IFG9              (0x0200)       /* ADC12 Memory 9      Interrupt Flag */
478
#define ADC12IFG10             (0x0400)       /* ADC12 Memory 10      Interrupt Flag */
479
#define ADC12IFG11             (0x0800)       /* ADC12 Memory 11      Interrupt Flag */
480
#define ADC12IFG12             (0x1000)       /* ADC12 Memory 12      Interrupt Flag */
481
#define ADC12IFG13             (0x2000)       /* ADC12 Memory 13      Interrupt Flag */
482
#define ADC12IFG14             (0x4000)       /* ADC12 Memory 14      Interrupt Flag */
483
#define ADC12IFG15             (0x8000)       /* ADC12 Memory 15      Interrupt Flag */
484
 
485
#define ADC12IFG0_L            (0x0001)       /* ADC12 Memory 0      Interrupt Flag */
486
#define ADC12IFG1_L            (0x0002)       /* ADC12 Memory 1      Interrupt Flag */
487
#define ADC12IFG2_L            (0x0004)       /* ADC12 Memory 2      Interrupt Flag */
488
#define ADC12IFG3_L            (0x0008)       /* ADC12 Memory 3      Interrupt Flag */
489
#define ADC12IFG4_L            (0x0010)       /* ADC12 Memory 4      Interrupt Flag */
490
#define ADC12IFG5_L            (0x0020)       /* ADC12 Memory 5      Interrupt Flag */
491
#define ADC12IFG6_L            (0x0040)       /* ADC12 Memory 6      Interrupt Flag */
492
#define ADC12IFG7_L            (0x0080)       /* ADC12 Memory 7      Interrupt Flag */
493
 
494
#define ADC12IFG8_H            (0x0001)       /* ADC12 Memory 8      Interrupt Flag */
495
#define ADC12IFG9_H            (0x0002)       /* ADC12 Memory 9      Interrupt Flag */
496
#define ADC12IFG10_H           (0x0004)       /* ADC12 Memory 10      Interrupt Flag */
497
#define ADC12IFG11_H           (0x0008)       /* ADC12 Memory 11      Interrupt Flag */
498
#define ADC12IFG12_H           (0x0010)       /* ADC12 Memory 12      Interrupt Flag */
499
#define ADC12IFG13_H           (0x0020)       /* ADC12 Memory 13      Interrupt Flag */
500
#define ADC12IFG14_H           (0x0040)       /* ADC12 Memory 14      Interrupt Flag */
501
#define ADC12IFG15_H           (0x0080)       /* ADC12 Memory 15      Interrupt Flag */
502
 
503
/* ADC12IV Definitions */
504
#define ADC12IV_NONE           (0x0000)       /* No Interrupt pending */
505
#define ADC12IV_ADC12OVIFG     (0x0002)       /* ADC12OVIFG */
506
#define ADC12IV_ADC12TOVIFG    (0x0004)       /* ADC12TOVIFG */
507
#define ADC12IV_ADC12IFG0      (0x0006)       /* ADC12IFG0 */
508
#define ADC12IV_ADC12IFG1      (0x0008)       /* ADC12IFG1 */
509
#define ADC12IV_ADC12IFG2      (0x000A)       /* ADC12IFG2 */
510
#define ADC12IV_ADC12IFG3      (0x000C)       /* ADC12IFG3 */
511
#define ADC12IV_ADC12IFG4      (0x000E)       /* ADC12IFG4 */
512
#define ADC12IV_ADC12IFG5      (0x0010)       /* ADC12IFG5 */
513
#define ADC12IV_ADC12IFG6      (0x0012)       /* ADC12IFG6 */
514
#define ADC12IV_ADC12IFG7      (0x0014)       /* ADC12IFG7 */
515
#define ADC12IV_ADC12IFG8      (0x0016)       /* ADC12IFG8 */
516
#define ADC12IV_ADC12IFG9      (0x0018)       /* ADC12IFG9 */
517
#define ADC12IV_ADC12IFG10     (0x001A)       /* ADC12IFG10 */
518
#define ADC12IV_ADC12IFG11     (0x001C)       /* ADC12IFG11 */
519
#define ADC12IV_ADC12IFG12     (0x001E)       /* ADC12IFG12 */
520
#define ADC12IV_ADC12IFG13     (0x0020)       /* ADC12IFG13 */
521
#define ADC12IV_ADC12IFG14     (0x0022)       /* ADC12IFG14 */
522
#define ADC12IV_ADC12IFG15     (0x0024)       /* ADC12IFG15 */
523
 
524
/*************************************************************
525
* Backup RAM Module
526
*************************************************************/
527
#define __MSP430_HAS_BACKUP_RAM__                /* Definition to show that Module is available */
528
#define __MSP430_BASEADDRESS_BACKUP_RAM__ 0x0480
529
 
530
SFR_16BIT(BAKMEM0);                           /* Battery Backup Memory 0 */
531
SFR_8BIT(BAKMEM0_L);                          /* Battery Backup Memory 0 */
532
SFR_8BIT(BAKMEM0_H);                          /* Battery Backup Memory 0 */
533
SFR_16BIT(BAKMEM1);                           /* Battery Backup Memory 0 */
534
SFR_8BIT(BAKMEM1_L);                          /* Battery Backup Memory 0 */
535
SFR_8BIT(BAKMEM1_H);                          /* Battery Backup Memory 0 */
536
SFR_16BIT(BAKMEM2);                           /* Battery Backup Memory 0 */
537
SFR_8BIT(BAKMEM2_L);                          /* Battery Backup Memory 0 */
538
SFR_8BIT(BAKMEM2_H);                          /* Battery Backup Memory 0 */
539
SFR_16BIT(BAKMEM3);                           /* Battery Backup Memory 0 */
540
SFR_8BIT(BAKMEM3_L);                          /* Battery Backup Memory 0 */
541
SFR_8BIT(BAKMEM3_H);                          /* Battery Backup Memory 0 */
542
 
543
/*************************************************************
544
* Battery Charger Module
545
*************************************************************/
546
#define __MSP430_HAS_BATTERY_CHARGER__                /* Definition to show that Module is available */
547
#define __MSP430_BASEADDRESS_BATTERY_CHARGER__ 0x049C
548
 
549
SFR_16BIT(BAKCTL);                            /* Battery Backup Control */
550
SFR_8BIT(BAKCTL_L);                           /* Battery Backup Control */
551
SFR_8BIT(BAKCTL_H);                           /* Battery Backup Control */
552
SFR_16BIT(BAKCHCTL);                          /* Battery Charger Control */
553
SFR_8BIT(BAKCHCTL_L);                         /* Battery Charger Control */
554
SFR_8BIT(BAKCHCTL_H);                         /* Battery Charger Control */
555
 
556
/* BAKCTL Control Bits */
557
#define LOCKBAK                (0x0001)       /* Lock backup sub-system */
558
#define BAKSW                  (0x0002)       /* Manual switch to battery backup supply */
559
#define BAKADC                 (0x0004)       /* Battery backup supply to ADC. */
560
#define BAKDIS                 (0x0008)       /* Disable backup supply switching. */
561
 
562
/* BAKCTL Control Bits */
563
#define LOCKBAK_L              (0x0001)       /* Lock backup sub-system */
564
#define BAKSW_L                (0x0002)       /* Manual switch to battery backup supply */
565
#define BAKADC_L               (0x0004)       /* Battery backup supply to ADC. */
566
#define BAKDIS_L               (0x0008)       /* Disable backup supply switching. */
567
 
568
/* BAKCTL Control Bits */
569
 
570
/* BAKCHCTL Control Bits */
571
#define CHEN                   (0x0001)       /* Charger enable */
572
#define CHC0                   (0x0002)       /* Charger charge current Bit 0 */
573
#define CHC1                   (0x0004)       /* Charger charge current Bit 1 */
574
#define CHV0                   (0x0010)       /* Charger end voltage Bit 0 */
575
#define CHV1                   (0x0020)       /* Charger end voltage Bit 1 */
576
 
577
/* BAKCHCTL Control Bits */
578
#define CHEN_L                 (0x0001)       /* Charger enable */
579
#define CHC0_L                 (0x0002)       /* Charger charge current Bit 0 */
580
#define CHC1_L                 (0x0004)       /* Charger charge current Bit 1 */
581
#define CHV0_L                 (0x0010)       /* Charger end voltage Bit 0 */
582
#define CHV1_L                 (0x0020)       /* Charger end voltage Bit 1 */
583
 
584
/* BAKCHCTL Control Bits */
585
 
586
#define CHPWD                  (0x6900)       /* Charger write password. */
587
 
588
/************************************************************
589
* Comparator B
590
************************************************************/
591
#define __MSP430_HAS_COMPB__                  /* Definition to show that Module is available */
592
#define __MSP430_BASEADDRESS_COMPB__ 0x08C0
593
 
594
SFR_16BIT(CBCTL0);                            /* Comparator B Control Register 0 */
595
SFR_8BIT(CBCTL0_L);                           /* Comparator B Control Register 0 */
596
SFR_8BIT(CBCTL0_H);                           /* Comparator B Control Register 0 */
597
SFR_16BIT(CBCTL1);                            /* Comparator B Control Register 1 */
598
SFR_8BIT(CBCTL1_L);                           /* Comparator B Control Register 1 */
599
SFR_8BIT(CBCTL1_H);                           /* Comparator B Control Register 1 */
600
SFR_16BIT(CBCTL2);                            /* Comparator B Control Register 2 */
601
SFR_8BIT(CBCTL2_L);                           /* Comparator B Control Register 2 */
602
SFR_8BIT(CBCTL2_H);                           /* Comparator B Control Register 2 */
603
SFR_16BIT(CBCTL3);                            /* Comparator B Control Register 3 */
604
SFR_8BIT(CBCTL3_L);                           /* Comparator B Control Register 3 */
605
SFR_8BIT(CBCTL3_H);                           /* Comparator B Control Register 3 */
606
SFR_16BIT(CBINT);                             /* Comparator B Interrupt Register */
607
SFR_8BIT(CBINT_L);                            /* Comparator B Interrupt Register */
608
SFR_8BIT(CBINT_H);                            /* Comparator B Interrupt Register */
609
SFR_16BIT(CBIV);                              /* Comparator B Interrupt Vector Word */
610
 
611
/* CBCTL0 Control Bits */
612
#define CBIPSEL0               (0x0001)       /* Comp. B Pos. Channel Input Select 0 */
613
#define CBIPSEL1               (0x0002)       /* Comp. B Pos. Channel Input Select 1 */
614
#define CBIPSEL2               (0x0004)       /* Comp. B Pos. Channel Input Select 2 */
615
#define CBIPSEL3               (0x0008)       /* Comp. B Pos. Channel Input Select 3 */
616
//#define RESERVED            (0x0010)  /* Comp. B */
617
//#define RESERVED            (0x0020)  /* Comp. B */
618
//#define RESERVED            (0x0040)  /* Comp. B */
619
#define CBIPEN                 (0x0080)       /* Comp. B Pos. Channel Input Enable */
620
#define CBIMSEL0               (0x0100)       /* Comp. B Neg. Channel Input Select 0 */
621
#define CBIMSEL1               (0x0200)       /* Comp. B Neg. Channel Input Select 1 */
622
#define CBIMSEL2               (0x0400)       /* Comp. B Neg. Channel Input Select 2 */
623
#define CBIMSEL3               (0x0800)       /* Comp. B Neg. Channel Input Select 3 */
624
//#define RESERVED            (0x1000)  /* Comp. B */
625
//#define RESERVED            (0x2000)  /* Comp. B */
626
//#define RESERVED            (0x4000)  /* Comp. B */
627
#define CBIMEN                 (0x8000)       /* Comp. B Neg. Channel Input Enable */
628
 
629
/* CBCTL0 Control Bits */
630
#define CBIPSEL0_L             (0x0001)       /* Comp. B Pos. Channel Input Select 0 */
631
#define CBIPSEL1_L             (0x0002)       /* Comp. B Pos. Channel Input Select 1 */
632
#define CBIPSEL2_L             (0x0004)       /* Comp. B Pos. Channel Input Select 2 */
633
#define CBIPSEL3_L             (0x0008)       /* Comp. B Pos. Channel Input Select 3 */
634
//#define RESERVED            (0x0010)  /* Comp. B */
635
//#define RESERVED            (0x0020)  /* Comp. B */
636
//#define RESERVED            (0x0040)  /* Comp. B */
637
#define CBIPEN_L               (0x0080)       /* Comp. B Pos. Channel Input Enable */
638
//#define RESERVED            (0x1000)  /* Comp. B */
639
//#define RESERVED            (0x2000)  /* Comp. B */
640
//#define RESERVED            (0x4000)  /* Comp. B */
641
 
642
/* CBCTL0 Control Bits */
643
//#define RESERVED            (0x0010)  /* Comp. B */
644
//#define RESERVED            (0x0020)  /* Comp. B */
645
//#define RESERVED            (0x0040)  /* Comp. B */
646
#define CBIMSEL0_H             (0x0001)       /* Comp. B Neg. Channel Input Select 0 */
647
#define CBIMSEL1_H             (0x0002)       /* Comp. B Neg. Channel Input Select 1 */
648
#define CBIMSEL2_H             (0x0004)       /* Comp. B Neg. Channel Input Select 2 */
649
#define CBIMSEL3_H             (0x0008)       /* Comp. B Neg. Channel Input Select 3 */
650
//#define RESERVED            (0x1000)  /* Comp. B */
651
//#define RESERVED            (0x2000)  /* Comp. B */
652
//#define RESERVED            (0x4000)  /* Comp. B */
653
#define CBIMEN_H               (0x0080)       /* Comp. B Neg. Channel Input Enable */
654
 
655
#define CBIPSEL_0              (0x0000)       /* Comp. B V+ terminal Input Select: Channel 0 */
656
#define CBIPSEL_1              (0x0001)       /* Comp. B V+ terminal Input Select: Channel 1 */
657
#define CBIPSEL_2              (0x0002)       /* Comp. B V+ terminal Input Select: Channel 2 */
658
#define CBIPSEL_3              (0x0003)       /* Comp. B V+ terminal Input Select: Channel 3 */
659
#define CBIPSEL_4              (0x0004)       /* Comp. B V+ terminal Input Select: Channel 4 */
660
#define CBIPSEL_5              (0x0005)       /* Comp. B V+ terminal Input Select: Channel 5 */
661
#define CBIPSEL_6              (0x0006)       /* Comp. B V+ terminal Input Select: Channel 6 */
662
#define CBIPSEL_7              (0x0007)       /* Comp. B V+ terminal Input Select: Channel 7 */
663
#define CBIPSEL_8              (0x0008)       /* Comp. B V+ terminal Input Select: Channel 8 */
664
#define CBIPSEL_9              (0x0009)       /* Comp. B V+ terminal Input Select: Channel 9 */
665
#define CBIPSEL_10             (0x000A)       /* Comp. B V+ terminal Input Select: Channel 10 */
666
#define CBIPSEL_11             (0x000B)       /* Comp. B V+ terminal Input Select: Channel 11 */
667
#define CBIPSEL_12             (0x000C)       /* Comp. B V+ terminal Input Select: Channel 12 */
668
#define CBIPSEL_13             (0x000D)       /* Comp. B V+ terminal Input Select: Channel 13 */
669
#define CBIPSEL_14             (0x000E)       /* Comp. B V+ terminal Input Select: Channel 14 */
670
#define CBIPSEL_15             (0x000F)       /* Comp. B V+ terminal Input Select: Channel 15 */
671
 
672
#define CBIMSEL_0              (0x0000)       /* Comp. B V- Terminal Input Select: Channel 0 */
673
#define CBIMSEL_1              (0x0100)       /* Comp. B V- Terminal Input Select: Channel 1 */
674
#define CBIMSEL_2              (0x0200)       /* Comp. B V- Terminal Input Select: Channel 2 */
675
#define CBIMSEL_3              (0x0300)       /* Comp. B V- Terminal Input Select: Channel 3 */
676
#define CBIMSEL_4              (0x0400)       /* Comp. B V- Terminal Input Select: Channel 4 */
677
#define CBIMSEL_5              (0x0500)       /* Comp. B V- Terminal Input Select: Channel 5 */
678
#define CBIMSEL_6              (0x0600)       /* Comp. B V- Terminal Input Select: Channel 6 */
679
#define CBIMSEL_7              (0x0700)       /* Comp. B V- Terminal Input Select: Channel 7 */
680
#define CBIMSEL_8              (0x0800)       /* Comp. B V- terminal Input Select: Channel 8 */
681
#define CBIMSEL_9              (0x0900)       /* Comp. B V- terminal Input Select: Channel 9 */
682
#define CBIMSEL_10             (0x0A00)       /* Comp. B V- terminal Input Select: Channel 10 */
683
#define CBIMSEL_11             (0x0B00)       /* Comp. B V- terminal Input Select: Channel 11 */
684
#define CBIMSEL_12             (0x0C00)       /* Comp. B V- terminal Input Select: Channel 12 */
685
#define CBIMSEL_13             (0x0D00)       /* Comp. B V- terminal Input Select: Channel 13 */
686
#define CBIMSEL_14             (0x0E00)       /* Comp. B V- terminal Input Select: Channel 14 */
687
#define CBIMSEL_15             (0x0F00)       /* Comp. B V- terminal Input Select: Channel 15 */
688
 
689
/* CBCTL1 Control Bits */
690
#define CBOUT                  (0x0001)       /* Comp. B Output */
691
#define CBOUTPOL               (0x0002)       /* Comp. B Output Polarity */
692
#define CBF                    (0x0004)       /* Comp. B Enable Output Filter */
693
#define CBIES                  (0x0008)       /* Comp. B Interrupt Edge Select */
694
#define CBSHORT                (0x0010)       /* Comp. B Input Short */
695
#define CBEX                   (0x0020)       /* Comp. B Exchange Inputs */
696
#define CBFDLY0                (0x0040)       /* Comp. B Filter delay Bit 0 */
697
#define CBFDLY1                (0x0080)       /* Comp. B Filter delay Bit 1 */
698
#define CBPWRMD0               (0x0100)       /* Comp. B Power Mode Bit 0 */
699
#define CBPWRMD1               (0x0200)       /* Comp. B Power Mode Bit 1 */
700
#define CBON                   (0x0400)       /* Comp. B enable */
701
#define CBMRVL                 (0x0800)       /* Comp. B CBMRV Level */
702
#define CBMRVS                 (0x1000)       /* Comp. B Output selects between VREF0 or VREF1*/
703
//#define RESERVED            (0x2000)  /* Comp. B */
704
//#define RESERVED            (0x4000)  /* Comp. B */
705
//#define RESERVED            (0x8000)  /* Comp. B */
706
 
707
/* CBCTL1 Control Bits */
708
#define CBOUT_L                (0x0001)       /* Comp. B Output */
709
#define CBOUTPOL_L             (0x0002)       /* Comp. B Output Polarity */
710
#define CBF_L                  (0x0004)       /* Comp. B Enable Output Filter */
711
#define CBIES_L                (0x0008)       /* Comp. B Interrupt Edge Select */
712
#define CBSHORT_L              (0x0010)       /* Comp. B Input Short */
713
#define CBEX_L                 (0x0020)       /* Comp. B Exchange Inputs */
714
#define CBFDLY0_L              (0x0040)       /* Comp. B Filter delay Bit 0 */
715
#define CBFDLY1_L              (0x0080)       /* Comp. B Filter delay Bit 1 */
716
//#define RESERVED            (0x2000)  /* Comp. B */
717
//#define RESERVED            (0x4000)  /* Comp. B */
718
//#define RESERVED            (0x8000)  /* Comp. B */
719
 
720
/* CBCTL1 Control Bits */
721
#define CBPWRMD0_H             (0x0001)       /* Comp. B Power Mode Bit 0 */
722
#define CBPWRMD1_H             (0x0002)       /* Comp. B Power Mode Bit 1 */
723
#define CBON_H                 (0x0004)       /* Comp. B enable */
724
#define CBMRVL_H               (0x0008)       /* Comp. B CBMRV Level */
725
#define CBMRVS_H               (0x0010)       /* Comp. B Output selects between VREF0 or VREF1*/
726
//#define RESERVED            (0x2000)  /* Comp. B */
727
//#define RESERVED            (0x4000)  /* Comp. B */
728
//#define RESERVED            (0x8000)  /* Comp. B */
729
 
730
#define CBFDLY_0               (0x0000)       /* Comp. B Filter delay 0 : 450ns */
731
#define CBFDLY_1               (0x0040)       /* Comp. B Filter delay 1 : 900ns */
732
#define CBFDLY_2               (0x0080)       /* Comp. B Filter delay 2 : 1800ns */
733
#define CBFDLY_3               (0x00C0)       /* Comp. B Filter delay 3 : 3600ns */
734
 
735
#define CBPWRMD_0              (0x0000)       /* Comp. B Power Mode 0 : High speed */
736
#define CBPWRMD_1              (0x0100)       /* Comp. B Power Mode 1 : Normal */
737
#define CBPWRMD_2              (0x0200)       /* Comp. B Power Mode 2 : Ultra-Low*/
738
#define CBPWRMD_3              (0x0300)       /* Comp. B Power Mode 3 : Reserved */
739
 
740
/* CBCTL2 Control Bits */
741
#define CBREF00                (0x0001)       /* Comp. B Reference 0 Resistor Select Bit : 0 */
742
#define CBREF01                (0x0002)       /* Comp. B Reference 0 Resistor Select Bit : 1 */
743
#define CBREF02                (0x0004)       /* Comp. B Reference 0 Resistor Select Bit : 2 */
744
#define CBREF03                (0x0008)       /* Comp. B Reference 0 Resistor Select Bit : 3 */
745
#define CBREF04                (0x0010)       /* Comp. B Reference 0 Resistor Select Bit : 4 */
746
#define CBRSEL                 (0x0020)       /* Comp. B Reference select */
747
#define CBRS0                  (0x0040)       /* Comp. B Reference Source Bit : 0 */
748
#define CBRS1                  (0x0080)       /* Comp. B Reference Source Bit : 1 */
749
#define CBREF10                (0x0100)       /* Comp. B Reference 1 Resistor Select Bit : 0 */
750
#define CBREF11                (0x0200)       /* Comp. B Reference 1 Resistor Select Bit : 1 */
751
#define CBREF12                (0x0400)       /* Comp. B Reference 1 Resistor Select Bit : 2 */
752
#define CBREF13                (0x0800)       /* Comp. B Reference 1 Resistor Select Bit : 3 */
753
#define CBREF14                (0x1000)       /* Comp. B Reference 1 Resistor Select Bit : 4 */
754
#define CBREFL0                (0x2000)       /* Comp. B Reference voltage level Bit : 0 */
755
#define CBREFL1                (0x4000)       /* Comp. B Reference voltage level Bit : 1 */
756
#define CBREFACC               (0x8000)       /* Comp. B Reference Accuracy */
757
 
758
/* CBCTL2 Control Bits */
759
#define CBREF00_L              (0x0001)       /* Comp. B Reference 0 Resistor Select Bit : 0 */
760
#define CBREF01_L              (0x0002)       /* Comp. B Reference 0 Resistor Select Bit : 1 */
761
#define CBREF02_L              (0x0004)       /* Comp. B Reference 0 Resistor Select Bit : 2 */
762
#define CBREF03_L              (0x0008)       /* Comp. B Reference 0 Resistor Select Bit : 3 */
763
#define CBREF04_L              (0x0010)       /* Comp. B Reference 0 Resistor Select Bit : 4 */
764
#define CBRSEL_L               (0x0020)       /* Comp. B Reference select */
765
#define CBRS0_L                (0x0040)       /* Comp. B Reference Source Bit : 0 */
766
#define CBRS1_L                (0x0080)       /* Comp. B Reference Source Bit : 1 */
767
 
768
/* CBCTL2 Control Bits */
769
#define CBREF10_H              (0x0001)       /* Comp. B Reference 1 Resistor Select Bit : 0 */
770
#define CBREF11_H              (0x0002)       /* Comp. B Reference 1 Resistor Select Bit : 1 */
771
#define CBREF12_H              (0x0004)       /* Comp. B Reference 1 Resistor Select Bit : 2 */
772
#define CBREF13_H              (0x0008)       /* Comp. B Reference 1 Resistor Select Bit : 3 */
773
#define CBREF14_H              (0x0010)       /* Comp. B Reference 1 Resistor Select Bit : 4 */
774
#define CBREFL0_H              (0x0020)       /* Comp. B Reference voltage level Bit : 0 */
775
#define CBREFL1_H              (0x0040)       /* Comp. B Reference voltage level Bit : 1 */
776
#define CBREFACC_H             (0x0080)       /* Comp. B Reference Accuracy */
777
 
778
#define CBREF0_0               (0x0000)       /* Comp. B Int. Ref.0 Select 0 : 1/32 */
779
#define CBREF0_1               (0x0001)       /* Comp. B Int. Ref.0 Select 1 : 2/32 */
780
#define CBREF0_2               (0x0002)       /* Comp. B Int. Ref.0 Select 2 : 3/32 */
781
#define CBREF0_3               (0x0003)       /* Comp. B Int. Ref.0 Select 3 : 4/32 */
782
#define CBREF0_4               (0x0004)       /* Comp. B Int. Ref.0 Select 4 : 5/32 */
783
#define CBREF0_5               (0x0005)       /* Comp. B Int. Ref.0 Select 5 : 6/32 */
784
#define CBREF0_6               (0x0006)       /* Comp. B Int. Ref.0 Select 6 : 7/32 */
785
#define CBREF0_7               (0x0007)       /* Comp. B Int. Ref.0 Select 7 : 8/32 */
786
#define CBREF0_8               (0x0008)       /* Comp. B Int. Ref.0 Select 0 : 9/32 */
787
#define CBREF0_9               (0x0009)       /* Comp. B Int. Ref.0 Select 1 : 10/32 */
788
#define CBREF0_10              (0x000A)       /* Comp. B Int. Ref.0 Select 2 : 11/32 */
789
#define CBREF0_11              (0x000B)       /* Comp. B Int. Ref.0 Select 3 : 12/32 */
790
#define CBREF0_12              (0x000C)       /* Comp. B Int. Ref.0 Select 4 : 13/32 */
791
#define CBREF0_13              (0x000D)       /* Comp. B Int. Ref.0 Select 5 : 14/32 */
792
#define CBREF0_14              (0x000E)       /* Comp. B Int. Ref.0 Select 6 : 15/32 */
793
#define CBREF0_15              (0x000F)       /* Comp. B Int. Ref.0 Select 7 : 16/32 */
794
#define CBREF0_16              (0x0010)       /* Comp. B Int. Ref.0 Select 0 : 17/32 */
795
#define CBREF0_17              (0x0011)       /* Comp. B Int. Ref.0 Select 1 : 18/32 */
796
#define CBREF0_18              (0x0012)       /* Comp. B Int. Ref.0 Select 2 : 19/32 */
797
#define CBREF0_19              (0x0013)       /* Comp. B Int. Ref.0 Select 3 : 20/32 */
798
#define CBREF0_20              (0x0014)       /* Comp. B Int. Ref.0 Select 4 : 21/32 */
799
#define CBREF0_21              (0x0015)       /* Comp. B Int. Ref.0 Select 5 : 22/32 */
800
#define CBREF0_22              (0x0016)       /* Comp. B Int. Ref.0 Select 6 : 23/32 */
801
#define CBREF0_23              (0x0017)       /* Comp. B Int. Ref.0 Select 7 : 24/32 */
802
#define CBREF0_24              (0x0018)       /* Comp. B Int. Ref.0 Select 0 : 25/32 */
803
#define CBREF0_25              (0x0019)       /* Comp. B Int. Ref.0 Select 1 : 26/32 */
804
#define CBREF0_26              (0x001A)       /* Comp. B Int. Ref.0 Select 2 : 27/32 */
805
#define CBREF0_27              (0x001B)       /* Comp. B Int. Ref.0 Select 3 : 28/32 */
806
#define CBREF0_28              (0x001C)       /* Comp. B Int. Ref.0 Select 4 : 29/32 */
807
#define CBREF0_29              (0x001D)       /* Comp. B Int. Ref.0 Select 5 : 30/32 */
808
#define CBREF0_30              (0x001E)       /* Comp. B Int. Ref.0 Select 6 : 31/32 */
809
#define CBREF0_31              (0x001F)       /* Comp. B Int. Ref.0 Select 7 : 32/32 */
810
 
811
#define CBRS_0                 (0x0000)       /* Comp. B Reference Source 0 : Off */
812
#define CBRS_1                 (0x0040)       /* Comp. B Reference Source 1 : Vcc */
813
#define CBRS_2                 (0x0080)       /* Comp. B Reference Source 2 : Shared Ref. */
814
#define CBRS_3                 (0x00C0)       /* Comp. B Reference Source 3 : Shared Ref. / Off */
815
 
816
#define CBREF1_0               (0x0000)       /* Comp. B Int. Ref.1 Select 0 : 1/32 */
817
#define CBREF1_1               (0x0100)       /* Comp. B Int. Ref.1 Select 1 : 2/32 */
818
#define CBREF1_2               (0x0200)       /* Comp. B Int. Ref.1 Select 2 : 3/32 */
819
#define CBREF1_3               (0x0300)       /* Comp. B Int. Ref.1 Select 3 : 4/32 */
820
#define CBREF1_4               (0x0400)       /* Comp. B Int. Ref.1 Select 4 : 5/32 */
821
#define CBREF1_5               (0x0500)       /* Comp. B Int. Ref.1 Select 5 : 6/32 */
822
#define CBREF1_6               (0x0600)       /* Comp. B Int. Ref.1 Select 6 : 7/32 */
823
#define CBREF1_7               (0x0700)       /* Comp. B Int. Ref.1 Select 7 : 8/32 */
824
#define CBREF1_8               (0x0800)       /* Comp. B Int. Ref.1 Select 0 : 9/32 */
825
#define CBREF1_9               (0x0900)       /* Comp. B Int. Ref.1 Select 1 : 10/32 */
826
#define CBREF1_10              (0x0A00)       /* Comp. B Int. Ref.1 Select 2 : 11/32 */
827
#define CBREF1_11              (0x0B00)       /* Comp. B Int. Ref.1 Select 3 : 12/32 */
828
#define CBREF1_12              (0x0C00)       /* Comp. B Int. Ref.1 Select 4 : 13/32 */
829
#define CBREF1_13              (0x0D00)       /* Comp. B Int. Ref.1 Select 5 : 14/32 */
830
#define CBREF1_14              (0x0E00)       /* Comp. B Int. Ref.1 Select 6 : 15/32 */
831
#define CBREF1_15              (0x0F00)       /* Comp. B Int. Ref.1 Select 7 : 16/32 */
832
#define CBREF1_16              (0x1000)       /* Comp. B Int. Ref.1 Select 0 : 17/32 */
833
#define CBREF1_17              (0x1100)       /* Comp. B Int. Ref.1 Select 1 : 18/32 */
834
#define CBREF1_18              (0x1200)       /* Comp. B Int. Ref.1 Select 2 : 19/32 */
835
#define CBREF1_19              (0x1300)       /* Comp. B Int. Ref.1 Select 3 : 20/32 */
836
#define CBREF1_20              (0x1400)       /* Comp. B Int. Ref.1 Select 4 : 21/32 */
837
#define CBREF1_21              (0x1500)       /* Comp. B Int. Ref.1 Select 5 : 22/32 */
838
#define CBREF1_22              (0x1600)       /* Comp. B Int. Ref.1 Select 6 : 23/32 */
839
#define CBREF1_23              (0x1700)       /* Comp. B Int. Ref.1 Select 7 : 24/32 */
840
#define CBREF1_24              (0x1800)       /* Comp. B Int. Ref.1 Select 0 : 25/32 */
841
#define CBREF1_25              (0x1900)       /* Comp. B Int. Ref.1 Select 1 : 26/32 */
842
#define CBREF1_26              (0x1A00)       /* Comp. B Int. Ref.1 Select 2 : 27/32 */
843
#define CBREF1_27              (0x1B00)       /* Comp. B Int. Ref.1 Select 3 : 28/32 */
844
#define CBREF1_28              (0x1C00)       /* Comp. B Int. Ref.1 Select 4 : 29/32 */
845
#define CBREF1_29              (0x1D00)       /* Comp. B Int. Ref.1 Select 5 : 30/32 */
846
#define CBREF1_30              (0x1E00)       /* Comp. B Int. Ref.1 Select 6 : 31/32 */
847
#define CBREF1_31              (0x1F00)       /* Comp. B Int. Ref.1 Select 7 : 32/32 */
848
 
849
#define CBREFL_0               (0x0000)       /* Comp. B Reference voltage level 0 : None */
850
#define CBREFL_1               (0x2000)       /* Comp. B Reference voltage level 1 : 1.5V */
851
#define CBREFL_2               (0x4000)       /* Comp. B Reference voltage level 2 : 2.0V  */
852
#define CBREFL_3               (0x6000)       /* Comp. B Reference voltage level 3 : 2.5V  */
853
 
854
#define CBPD0                  (0x0001)       /* Comp. B Disable Input Buffer of Port Register .0 */
855
#define CBPD1                  (0x0002)       /* Comp. B Disable Input Buffer of Port Register .1 */
856
#define CBPD2                  (0x0004)       /* Comp. B Disable Input Buffer of Port Register .2 */
857
#define CBPD3                  (0x0008)       /* Comp. B Disable Input Buffer of Port Register .3 */
858
#define CBPD4                  (0x0010)       /* Comp. B Disable Input Buffer of Port Register .4 */
859
#define CBPD5                  (0x0020)       /* Comp. B Disable Input Buffer of Port Register .5 */
860
#define CBPD6                  (0x0040)       /* Comp. B Disable Input Buffer of Port Register .6 */
861
#define CBPD7                  (0x0080)       /* Comp. B Disable Input Buffer of Port Register .7 */
862
#define CBPD8                  (0x0100)       /* Comp. B Disable Input Buffer of Port Register .8 */
863
#define CBPD9                  (0x0200)       /* Comp. B Disable Input Buffer of Port Register .9 */
864
#define CBPD10                 (0x0400)       /* Comp. B Disable Input Buffer of Port Register .10 */
865
#define CBPD11                 (0x0800)       /* Comp. B Disable Input Buffer of Port Register .11 */
866
#define CBPD12                 (0x1000)       /* Comp. B Disable Input Buffer of Port Register .12 */
867
#define CBPD13                 (0x2000)       /* Comp. B Disable Input Buffer of Port Register .13 */
868
#define CBPD14                 (0x4000)       /* Comp. B Disable Input Buffer of Port Register .14 */
869
#define CBPD15                 (0x8000)       /* Comp. B Disable Input Buffer of Port Register .15 */
870
 
871
#define CBPD0_L                (0x0001)       /* Comp. B Disable Input Buffer of Port Register .0 */
872
#define CBPD1_L                (0x0002)       /* Comp. B Disable Input Buffer of Port Register .1 */
873
#define CBPD2_L                (0x0004)       /* Comp. B Disable Input Buffer of Port Register .2 */
874
#define CBPD3_L                (0x0008)       /* Comp. B Disable Input Buffer of Port Register .3 */
875
#define CBPD4_L                (0x0010)       /* Comp. B Disable Input Buffer of Port Register .4 */
876
#define CBPD5_L                (0x0020)       /* Comp. B Disable Input Buffer of Port Register .5 */
877
#define CBPD6_L                (0x0040)       /* Comp. B Disable Input Buffer of Port Register .6 */
878
#define CBPD7_L                (0x0080)       /* Comp. B Disable Input Buffer of Port Register .7 */
879
 
880
#define CBPD8_H                (0x0001)       /* Comp. B Disable Input Buffer of Port Register .8 */
881
#define CBPD9_H                (0x0002)       /* Comp. B Disable Input Buffer of Port Register .9 */
882
#define CBPD10_H               (0x0004)       /* Comp. B Disable Input Buffer of Port Register .10 */
883
#define CBPD11_H               (0x0008)       /* Comp. B Disable Input Buffer of Port Register .11 */
884
#define CBPD12_H               (0x0010)       /* Comp. B Disable Input Buffer of Port Register .12 */
885
#define CBPD13_H               (0x0020)       /* Comp. B Disable Input Buffer of Port Register .13 */
886
#define CBPD14_H               (0x0040)       /* Comp. B Disable Input Buffer of Port Register .14 */
887
#define CBPD15_H               (0x0080)       /* Comp. B Disable Input Buffer of Port Register .15 */
888
 
889
/* CBINT Control Bits */
890
#define CBIFG                  (0x0001)       /* Comp. B Interrupt Flag */
891
#define CBIIFG                 (0x0002)       /* Comp. B Interrupt Flag Inverted Polarity */
892
//#define RESERVED             (0x0004)  /* Comp. B */
893
//#define RESERVED             (0x0008)  /* Comp. B */
894
//#define RESERVED             (0x0010)  /* Comp. B */
895
//#define RESERVED             (0x0020)  /* Comp. B */
896
//#define RESERVED             (0x0040)  /* Comp. B */
897
//#define RESERVED             (0x0080)  /* Comp. B */
898
#define CBIE                   (0x0100)       /* Comp. B Interrupt Enable */
899
#define CBIIE                  (0x0200)       /* Comp. B Interrupt Enable Inverted Polarity */
900
//#define RESERVED             (0x0400)  /* Comp. B */
901
//#define RESERVED             (0x0800)  /* Comp. B */
902
//#define RESERVED             (0x1000)  /* Comp. B */
903
//#define RESERVED             (0x2000)  /* Comp. B */
904
//#define RESERVED             (0x4000)  /* Comp. B */
905
//#define RESERVED             (0x8000)  /* Comp. B */
906
 
907
/* CBINT Control Bits */
908
#define CBIFG_L                (0x0001)       /* Comp. B Interrupt Flag */
909
#define CBIIFG_L               (0x0002)       /* Comp. B Interrupt Flag Inverted Polarity */
910
//#define RESERVED             (0x0004)  /* Comp. B */
911
//#define RESERVED             (0x0008)  /* Comp. B */
912
//#define RESERVED             (0x0010)  /* Comp. B */
913
//#define RESERVED             (0x0020)  /* Comp. B */
914
//#define RESERVED             (0x0040)  /* Comp. B */
915
//#define RESERVED             (0x0080)  /* Comp. B */
916
//#define RESERVED             (0x0400)  /* Comp. B */
917
//#define RESERVED             (0x0800)  /* Comp. B */
918
//#define RESERVED             (0x1000)  /* Comp. B */
919
//#define RESERVED             (0x2000)  /* Comp. B */
920
//#define RESERVED             (0x4000)  /* Comp. B */
921
//#define RESERVED             (0x8000)  /* Comp. B */
922
 
923
/* CBINT Control Bits */
924
//#define RESERVED             (0x0004)  /* Comp. B */
925
//#define RESERVED             (0x0008)  /* Comp. B */
926
//#define RESERVED             (0x0010)  /* Comp. B */
927
//#define RESERVED             (0x0020)  /* Comp. B */
928
//#define RESERVED             (0x0040)  /* Comp. B */
929
//#define RESERVED             (0x0080)  /* Comp. B */
930
#define CBIE_H                 (0x0001)       /* Comp. B Interrupt Enable */
931
#define CBIIE_H                (0x0002)       /* Comp. B Interrupt Enable Inverted Polarity */
932
//#define RESERVED             (0x0400)  /* Comp. B */
933
//#define RESERVED             (0x0800)  /* Comp. B */
934
//#define RESERVED             (0x1000)  /* Comp. B */
935
//#define RESERVED             (0x2000)  /* Comp. B */
936
//#define RESERVED             (0x4000)  /* Comp. B */
937
//#define RESERVED             (0x8000)  /* Comp. B */
938
 
939
/* CBIV Definitions */
940
#define CBIV_NONE              (0x0000)       /* No Interrupt pending */
941
#define CBIV_CBIFG             (0x0002)       /* CBIFG */
942
#define CBIV_CBIIFG            (0x0004)       /* CBIIFG */
943
 
944
/*************************************************************
945
* CRC Module
946
*************************************************************/
947
#define __MSP430_HAS_CRC__                    /* Definition to show that Module is available */
948
#define __MSP430_BASEADDRESS_CRC__ 0x0150
949
 
950
SFR_16BIT(CRCDI);                             /* CRC Data In Register */
951
SFR_8BIT(CRCDI_L);                            /* CRC Data In Register */
952
SFR_8BIT(CRCDI_H);                            /* CRC Data In Register */
953
SFR_16BIT(CRCDIRB);                           /* CRC data in reverse byte Register */
954
SFR_8BIT(CRCDIRB_L);                          /* CRC data in reverse byte Register */
955
SFR_8BIT(CRCDIRB_H);                          /* CRC data in reverse byte Register */
956
SFR_16BIT(CRCINIRES);                         /* CRC Initialisation Register and Result Register */
957
SFR_8BIT(CRCINIRES_L);                        /* CRC Initialisation Register and Result Register */
958
SFR_8BIT(CRCINIRES_H);                        /* CRC Initialisation Register and Result Register */
959
SFR_16BIT(CRCRESR);                           /* CRC reverse result Register */
960
SFR_8BIT(CRCRESR_L);                          /* CRC reverse result Register */
961
SFR_8BIT(CRCRESR_H);                          /* CRC reverse result Register */
962
 
963
/************************************************************
964
* DAC12
965
************************************************************/
966
#define __MSP430_HAS_DAC12_2__                /* Definition to show that Module is available */
967
#define __MSP430_BASEADDRESS_DAC12_2__ 0x0780
968
 
969
SFR_16BIT(DAC12_0CTL0);                       /* DAC12_0 Control Register 0 */
970
SFR_16BIT(DAC12_0CTL1);                       /* DAC12_0 Control Register 1 */
971
SFR_16BIT(DAC12_0DAT);                        /* DAC12_0 Data */
972
SFR_16BIT(DAC12_0CALCTL);                     /* DAC12_0 Calibration Control Register */
973
SFR_16BIT(DAC12_0CALDAT);                     /* DAC12_0 Calibration Data Register */
974
SFR_16BIT(DAC12_1CTL0);                       /* DAC12_1 Control Register 0 */
975
SFR_16BIT(DAC12_1CTL1);                       /* DAC12_1 Control Register 1 */
976
SFR_16BIT(DAC12_1DAT);                        /* DAC12_1 Data */
977
SFR_16BIT(DAC12_1CALCTL);                     /* DAC12_1 Calibration Control Register */
978
SFR_16BIT(DAC12_1CALDAT);                     /* DAC12_1 Calibration Data Register */
979
SFR_16BIT(DAC12_IV);                          /* DAC12   Interrupt Vector Word */
980
 
981
/* DAC12_xCTL0 Control Bits */
982
#define DAC12GRP               (0x0001)       /* DAC12 group */
983
#define DAC12ENC               (0x0002)       /* DAC12 enable conversion */
984
#define DAC12IFG               (0x0004)       /* DAC12 interrupt flag */
985
#define DAC12IE                (0x0008)       /* DAC12 interrupt enable */
986
#define DAC12DF                (0x0010)       /* DAC12 data format */
987
#define DAC12AMP0              (0x0020)       /* DAC12 amplifier bit 0 */
988
#define DAC12AMP1              (0x0040)       /* DAC12 amplifier bit 1 */
989
#define DAC12AMP2              (0x0080)       /* DAC12 amplifier bit 2 */
990
#define DAC12IR                (0x0100)       /* DAC12 input reference and output range */
991
#define DAC12CALON             (0x0200)       /* DAC12 calibration */
992
#define DAC12LSEL0             (0x0400)       /* DAC12 load select bit 0 */
993
#define DAC12LSEL1             (0x0800)       /* DAC12 load select bit 1 */
994
#define DAC12RES               (0x1000)       /* DAC12 resolution */
995
#define DAC12SREF0             (0x2000)       /* DAC12 reference bit 0 */
996
#define DAC12SREF1             (0x4000)       /* DAC12 reference bit 1 */
997
#define DAC12OPS               (0x8000)       /* DAC12 Operation Amp. */
998
 
999
#define DAC12AMP_0             (0*0x0020u)    /* DAC12 amplifier 0: off,    3-state */
1000
#define DAC12AMP_1             (1*0x0020u)    /* DAC12 amplifier 1: off,    off */
1001
#define DAC12AMP_2             (2*0x0020u)    /* DAC12 amplifier 2: low,    low */
1002
#define DAC12AMP_3             (3*0x0020u)    /* DAC12 amplifier 3: low,    medium */
1003
#define DAC12AMP_4             (4*0x0020u)    /* DAC12 amplifier 4: low,    high */
1004
#define DAC12AMP_5             (5*0x0020u)    /* DAC12 amplifier 5: medium, medium */
1005
#define DAC12AMP_6             (6*0x0020u)    /* DAC12 amplifier 6: medium, high */
1006
#define DAC12AMP_7             (7*0x0020u)    /* DAC12 amplifier 7: high,   high */
1007
 
1008
#define DAC12LSEL_0            (0*0x0400u)    /* DAC12 load select 0: direct */
1009
#define DAC12LSEL_1            (1*0x0400u)    /* DAC12 load select 1: latched with DAT */
1010
#define DAC12LSEL_2            (2*0x0400u)    /* DAC12 load select 2: latched with pos. Timer_A3.OUT1 */
1011
#define DAC12LSEL_3            (3*0x0400u)    /* DAC12 load select 3: latched with pos. Timer_B7.OUT1 */
1012
 
1013
#define DAC12SREF_0            (0*0x2000u)    /* DAC12 reference 0: Vref+ */
1014
#define DAC12SREF_1            (1*0x2000u)    /* DAC12 reference 1: Vref+ */
1015
#define DAC12SREF_2            (2*0x2000u)    /* DAC12 reference 2: Veref+ */
1016
#define DAC12SREF_3            (3*0x2000u)    /* DAC12 reference 3: Veref+ */
1017
 
1018
/* DAC12_xCTL1 Control Bits */
1019
#define DAC12DFJ               (0x0001)       /* DAC12 Data Format Justification */
1020
#define DAC12OG                (0x0002)       /* DAC12 output buffer gain: 0: 3x gain / 1: 2x gain */
1021
 
1022
/* DAC12_xCALCTL Control Bits */
1023
#define DAC12LOCK              (0x0001)       /* DAC12 Calibration Lock */
1024
 
1025
#define DAC12PW                (0xA500)       /* DAC12 Calibration Register write Password */
1026
 
1027
/* DACIV Definitions */
1028
#define DACIV_NONE             (0x0000)       /* No Interrupt pending */
1029
#define DACIV_DAC12IFG_0       (0x0002)       /* DAC12IFG_0 */
1030
#define DACIV_DAC12IFG_1       (0x0004)       /* DAC12IFG_1 */
1031
 
1032
/************************************************************
1033
* DMA_X
1034
************************************************************/
1035
#define __MSP430_HAS_DMAX_6__                 /* Definition to show that Module is available */
1036
#define __MSP430_BASEADDRESS_DMAX_6__ 0x0500
1037
 
1038
SFR_16BIT(DMACTL0);                           /* DMA Module Control 0 */
1039
SFR_8BIT(DMACTL0_L);                          /* DMA Module Control 0 */
1040
SFR_8BIT(DMACTL0_H);                          /* DMA Module Control 0 */
1041
SFR_16BIT(DMACTL1);                           /* DMA Module Control 1 */
1042
SFR_8BIT(DMACTL1_L);                          /* DMA Module Control 1 */
1043
SFR_8BIT(DMACTL1_H);                          /* DMA Module Control 1 */
1044
SFR_16BIT(DMACTL2);                           /* DMA Module Control 2 */
1045
SFR_8BIT(DMACTL2_L);                          /* DMA Module Control 2 */
1046
SFR_8BIT(DMACTL2_H);                          /* DMA Module Control 2 */
1047
SFR_16BIT(DMACTL3);                           /* DMA Module Control 3 */
1048
SFR_8BIT(DMACTL3_L);                          /* DMA Module Control 3 */
1049
SFR_8BIT(DMACTL3_H);                          /* DMA Module Control 3 */
1050
SFR_16BIT(DMACTL4);                           /* DMA Module Control 4 */
1051
SFR_8BIT(DMACTL4_L);                          /* DMA Module Control 4 */
1052
SFR_8BIT(DMACTL4_H);                          /* DMA Module Control 4 */
1053
SFR_16BIT(DMAIV);                             /* DMA Interrupt Vector Word */
1054
SFR_8BIT(DMAIV_L);                            /* DMA Interrupt Vector Word */
1055
SFR_8BIT(DMAIV_H);                            /* DMA Interrupt Vector Word */
1056
 
1057
SFR_16BIT(DMA0CTL);                           /* DMA Channel 0 Control */
1058
SFR_8BIT(DMA0CTL_L);                          /* DMA Channel 0 Control */
1059
SFR_8BIT(DMA0CTL_H);                          /* DMA Channel 0 Control */
1060
SFR_20BIT(DMA0SA);                            /* DMA Channel 0 Source Address */
1061
SFR_16BIT(DMA0SAL);                           /* DMA Channel 0 Source Address */
1062
SFR_20BIT(DMA0DA);                            /* DMA Channel 0 Destination Address */
1063
SFR_16BIT(DMA0DAL);                           /* DMA Channel 0 Destination Address */
1064
SFR_16BIT(DMA0SZ);                            /* DMA Channel 0 Transfer Size */
1065
 
1066
SFR_16BIT(DMA1CTL);                           /* DMA Channel 1 Control */
1067
SFR_8BIT(DMA1CTL_L);                          /* DMA Channel 1 Control */
1068
SFR_8BIT(DMA1CTL_H);                          /* DMA Channel 1 Control */
1069
SFR_20BIT(DMA1SA);                            /* DMA Channel 1 Source Address */
1070
SFR_16BIT(DMA1SAL);                           /* DMA Channel 1 Source Address */
1071
SFR_20BIT(DMA1DA);                            /* DMA Channel 1 Destination Address */
1072
SFR_16BIT(DMA1DAL);                           /* DMA Channel 1 Destination Address */
1073
SFR_16BIT(DMA1SZ);                            /* DMA Channel 1 Transfer Size */
1074
 
1075
SFR_16BIT(DMA2CTL);                           /* DMA Channel 2 Control */
1076
SFR_8BIT(DMA2CTL_L);                          /* DMA Channel 2 Control */
1077
SFR_8BIT(DMA2CTL_H);                          /* DMA Channel 2 Control */
1078
SFR_20BIT(DMA2SA);                            /* DMA Channel 2 Source Address */
1079
SFR_16BIT(DMA2SAL);                           /* DMA Channel 2 Source Address */
1080
SFR_20BIT(DMA2DA);                            /* DMA Channel 2 Destination Address */
1081
SFR_16BIT(DMA2DAL);                           /* DMA Channel 2 Destination Address */
1082
SFR_16BIT(DMA2SZ);                            /* DMA Channel 2 Transfer Size */
1083
 
1084
SFR_16BIT(DMA3CTL);                           /* DMA Channel 3 Control */
1085
SFR_8BIT(DMA3CTL_L);                          /* DMA Channel 3 Control */
1086
SFR_8BIT(DMA3CTL_H);                          /* DMA Channel 3 Control */
1087
SFR_20BIT(DMA3SA);                            /* DMA Channel 3 Source Address */
1088
SFR_16BIT(DMA3SAL);                           /* DMA Channel 3 Source Address */
1089
SFR_20BIT(DMA3DA);                            /* DMA Channel 3 Destination Address */
1090
SFR_16BIT(DMA3DAL);                           /* DMA Channel 3 Destination Address */
1091
SFR_16BIT(DMA3SZ);                            /* DMA Channel 3 Transfer Size */
1092
 
1093
SFR_16BIT(DMA4CTL);                           /* DMA Channel 4 Control */
1094
SFR_8BIT(DMA4CTL_L);                          /* DMA Channel 4 Control */
1095
SFR_8BIT(DMA4CTL_H);                          /* DMA Channel 4 Control */
1096
SFR_20BIT(DMA4SA);                            /* DMA Channel 4 Source Address */
1097
SFR_16BIT(DMA4SAL);                           /* DMA Channel 4 Source Address */
1098
SFR_20BIT(DMA4DA);                            /* DMA Channel 4 Destination Address */
1099
SFR_16BIT(DMA4DAL);                           /* DMA Channel 4 Destination Address */
1100
SFR_16BIT(DMA4SZ);                            /* DMA Channel 4 Transfer Size */
1101
 
1102
SFR_16BIT(DMA5CTL);                           /* DMA Channel 5 Control */
1103
SFR_8BIT(DMA5CTL_L);                          /* DMA Channel 5 Control */
1104
SFR_8BIT(DMA5CTL_H);                          /* DMA Channel 5 Control */
1105
SFR_20BIT(DMA5SA);                            /* DMA Channel 5 Source Address */
1106
SFR_16BIT(DMA5SAL);                           /* DMA Channel 5 Source Address */
1107
SFR_20BIT(DMA5DA);                            /* DMA Channel 5 Destination Address */
1108
SFR_16BIT(DMA5DAL);                           /* DMA Channel 5 Destination Address */
1109
SFR_16BIT(DMA5SZ);                            /* DMA Channel 5 Transfer Size */
1110
 
1111
/* DMACTL0 Control Bits */
1112
#define DMA0TSEL0              (0x0001)       /* DMA channel 0 transfer select bit 0 */
1113
#define DMA0TSEL1              (0x0002)       /* DMA channel 0 transfer select bit 1 */
1114
#define DMA0TSEL2              (0x0004)       /* DMA channel 0 transfer select bit 2 */
1115
#define DMA0TSEL3              (0x0008)       /* DMA channel 0 transfer select bit 3 */
1116
#define DMA0TSEL4              (0x0010)       /* DMA channel 0 transfer select bit 4 */
1117
#define DMA1TSEL0              (0x0100)       /* DMA channel 1 transfer select bit 0 */
1118
#define DMA1TSEL1              (0x0200)       /* DMA channel 1 transfer select bit 1 */
1119
#define DMA1TSEL2              (0x0400)       /* DMA channel 1 transfer select bit 2 */
1120
#define DMA1TSEL3              (0x0800)       /* DMA channel 1 transfer select bit 3 */
1121
#define DMA1TSEL4              (0x1000)       /* DMA channel 1 transfer select bit 4 */
1122
 
1123
/* DMACTL0 Control Bits */
1124
#define DMA0TSEL0_L            (0x0001)       /* DMA channel 0 transfer select bit 0 */
1125
#define DMA0TSEL1_L            (0x0002)       /* DMA channel 0 transfer select bit 1 */
1126
#define DMA0TSEL2_L            (0x0004)       /* DMA channel 0 transfer select bit 2 */
1127
#define DMA0TSEL3_L            (0x0008)       /* DMA channel 0 transfer select bit 3 */
1128
#define DMA0TSEL4_L            (0x0010)       /* DMA channel 0 transfer select bit 4 */
1129
 
1130
/* DMACTL0 Control Bits */
1131
#define DMA1TSEL0_H            (0x0001)       /* DMA channel 1 transfer select bit 0 */
1132
#define DMA1TSEL1_H            (0x0002)       /* DMA channel 1 transfer select bit 1 */
1133
#define DMA1TSEL2_H            (0x0004)       /* DMA channel 1 transfer select bit 2 */
1134
#define DMA1TSEL3_H            (0x0008)       /* DMA channel 1 transfer select bit 3 */
1135
#define DMA1TSEL4_H            (0x0010)       /* DMA channel 1 transfer select bit 4 */
1136
 
1137
/* DMACTL01 Control Bits */
1138
#define DMA2TSEL0              (0x0001)       /* DMA channel 2 transfer select bit 0 */
1139
#define DMA2TSEL1              (0x0002)       /* DMA channel 2 transfer select bit 1 */
1140
#define DMA2TSEL2              (0x0004)       /* DMA channel 2 transfer select bit 2 */
1141
#define DMA2TSEL3              (0x0008)       /* DMA channel 2 transfer select bit 3 */
1142
#define DMA2TSEL4              (0x0010)       /* DMA channel 2 transfer select bit 4 */
1143
#define DMA3TSEL0              (0x0100)       /* DMA channel 3 transfer select bit 0 */
1144
#define DMA3TSEL1              (0x0200)       /* DMA channel 3 transfer select bit 1 */
1145
#define DMA3TSEL2              (0x0400)       /* DMA channel 3 transfer select bit 2 */
1146
#define DMA3TSEL3              (0x0800)       /* DMA channel 3 transfer select bit 3 */
1147
#define DMA3TSEL4              (0x1000)       /* DMA channel 3 transfer select bit 4 */
1148
 
1149
/* DMACTL01 Control Bits */
1150
#define DMA2TSEL0_L            (0x0001)       /* DMA channel 2 transfer select bit 0 */
1151
#define DMA2TSEL1_L            (0x0002)       /* DMA channel 2 transfer select bit 1 */
1152
#define DMA2TSEL2_L            (0x0004)       /* DMA channel 2 transfer select bit 2 */
1153
#define DMA2TSEL3_L            (0x0008)       /* DMA channel 2 transfer select bit 3 */
1154
#define DMA2TSEL4_L            (0x0010)       /* DMA channel 2 transfer select bit 4 */
1155
 
1156
/* DMACTL01 Control Bits */
1157
#define DMA3TSEL0_H            (0x0001)       /* DMA channel 3 transfer select bit 0 */
1158
#define DMA3TSEL1_H            (0x0002)       /* DMA channel 3 transfer select bit 1 */
1159
#define DMA3TSEL2_H            (0x0004)       /* DMA channel 3 transfer select bit 2 */
1160
#define DMA3TSEL3_H            (0x0008)       /* DMA channel 3 transfer select bit 3 */
1161
#define DMA3TSEL4_H            (0x0010)       /* DMA channel 3 transfer select bit 4 */
1162
 
1163
/* DMACTL0 Control Bits */
1164
#define DMA4TSEL0              (0x0001)       /* DMA channel 4 transfer select bit 0 */
1165
#define DMA4TSEL1              (0x0002)       /* DMA channel 4 transfer select bit 1 */
1166
#define DMA4TSEL2              (0x0004)       /* DMA channel 4 transfer select bit 2 */
1167
#define DMA4TSEL3              (0x0008)       /* DMA channel 4 transfer select bit 3 */
1168
#define DMA4TSEL4              (0x0010)       /* DMA channel 4 transfer select bit 4 */
1169
#define DMA5TSEL0              (0x0100)       /* DMA channel 5 transfer select bit 0 */
1170
#define DMA5TSEL1              (0x0200)       /* DMA channel 5 transfer select bit 1 */
1171
#define DMA5TSEL2              (0x0400)       /* DMA channel 5 transfer select bit 2 */
1172
#define DMA5TSEL3              (0x0800)       /* DMA channel 5 transfer select bit 3 */
1173
#define DMA5TSEL4              (0x1000)       /* DMA channel 5 transfer select bit 4 */
1174
 
1175
/* DMACTL0 Control Bits */
1176
#define DMA4TSEL0_L            (0x0001)       /* DMA channel 4 transfer select bit 0 */
1177
#define DMA4TSEL1_L            (0x0002)       /* DMA channel 4 transfer select bit 1 */
1178
#define DMA4TSEL2_L            (0x0004)       /* DMA channel 4 transfer select bit 2 */
1179
#define DMA4TSEL3_L            (0x0008)       /* DMA channel 4 transfer select bit 3 */
1180
#define DMA4TSEL4_L            (0x0010)       /* DMA channel 4 transfer select bit 4 */
1181
 
1182
/* DMACTL0 Control Bits */
1183
#define DMA5TSEL0_H            (0x0001)       /* DMA channel 5 transfer select bit 0 */
1184
#define DMA5TSEL1_H            (0x0002)       /* DMA channel 5 transfer select bit 1 */
1185
#define DMA5TSEL2_H            (0x0004)       /* DMA channel 5 transfer select bit 2 */
1186
#define DMA5TSEL3_H            (0x0008)       /* DMA channel 5 transfer select bit 3 */
1187
#define DMA5TSEL4_H            (0x0010)       /* DMA channel 5 transfer select bit 4 */
1188
 
1189
/* DMACTL4 Control Bits */
1190
#define ENNMI                  (0x0001)       /* Enable NMI interruption of DMA */
1191
#define ROUNDROBIN             (0x0002)       /* Round-Robin DMA channel priorities */
1192
#define DMARMWDIS              (0x0004)       /* Inhibited DMA transfers during read-modify-write CPU operations */
1193
 
1194
/* DMACTL4 Control Bits */
1195
#define ENNMI_L                (0x0001)       /* Enable NMI interruption of DMA */
1196
#define ROUNDROBIN_L           (0x0002)       /* Round-Robin DMA channel priorities */
1197
#define DMARMWDIS_L            (0x0004)       /* Inhibited DMA transfers during read-modify-write CPU operations */
1198
 
1199
/* DMACTL4 Control Bits */
1200
 
1201
/* DMAxCTL Control Bits */
1202
#define DMAREQ                 (0x0001)       /* Initiate DMA transfer with DMATSEL */
1203
#define DMAABORT               (0x0002)       /* DMA transfer aborted by NMI */
1204
#define DMAIE                  (0x0004)       /* DMA interrupt enable */
1205
#define DMAIFG                 (0x0008)       /* DMA interrupt flag */
1206
#define DMAEN                  (0x0010)       /* DMA enable */
1207
#define DMALEVEL               (0x0020)       /* DMA level sensitive trigger select */
1208
#define DMASRCBYTE             (0x0040)       /* DMA source byte */
1209
#define DMADSTBYTE             (0x0080)       /* DMA destination byte */
1210
#define DMASRCINCR0            (0x0100)       /* DMA source increment bit 0 */
1211
#define DMASRCINCR1            (0x0200)       /* DMA source increment bit 1 */
1212
#define DMADSTINCR0            (0x0400)       /* DMA destination increment bit 0 */
1213
#define DMADSTINCR1            (0x0800)       /* DMA destination increment bit 1 */
1214
#define DMADT0                 (0x1000)       /* DMA transfer mode bit 0 */
1215
#define DMADT1                 (0x2000)       /* DMA transfer mode bit 1 */
1216
#define DMADT2                 (0x4000)       /* DMA transfer mode bit 2 */
1217
 
1218
/* DMAxCTL Control Bits */
1219
#define DMAREQ_L               (0x0001)       /* Initiate DMA transfer with DMATSEL */
1220
#define DMAABORT_L             (0x0002)       /* DMA transfer aborted by NMI */
1221
#define DMAIE_L                (0x0004)       /* DMA interrupt enable */
1222
#define DMAIFG_L               (0x0008)       /* DMA interrupt flag */
1223
#define DMAEN_L                (0x0010)       /* DMA enable */
1224
#define DMALEVEL_L             (0x0020)       /* DMA level sensitive trigger select */
1225
#define DMASRCBYTE_L           (0x0040)       /* DMA source byte */
1226
#define DMADSTBYTE_L           (0x0080)       /* DMA destination byte */
1227
 
1228
/* DMAxCTL Control Bits */
1229
#define DMASRCINCR0_H          (0x0001)       /* DMA source increment bit 0 */
1230
#define DMASRCINCR1_H          (0x0002)       /* DMA source increment bit 1 */
1231
#define DMADSTINCR0_H          (0x0004)       /* DMA destination increment bit 0 */
1232
#define DMADSTINCR1_H          (0x0008)       /* DMA destination increment bit 1 */
1233
#define DMADT0_H               (0x0010)       /* DMA transfer mode bit 0 */
1234
#define DMADT1_H               (0x0020)       /* DMA transfer mode bit 1 */
1235
#define DMADT2_H               (0x0040)       /* DMA transfer mode bit 2 */
1236
 
1237
#define DMASWDW                (0*0x0040u)    /* DMA transfer: source word to destination word */
1238
#define DMASBDW                (1*0x0040u)    /* DMA transfer: source byte to destination word */
1239
#define DMASWDB                (2*0x0040u)    /* DMA transfer: source word to destination byte */
1240
#define DMASBDB                (3*0x0040u)    /* DMA transfer: source byte to destination byte */
1241
 
1242
#define DMASRCINCR_0           (0*0x0100u)    /* DMA source increment 0: source address unchanged */
1243
#define DMASRCINCR_1           (1*0x0100u)    /* DMA source increment 1: source address unchanged */
1244
#define DMASRCINCR_2           (2*0x0100u)    /* DMA source increment 2: source address decremented */
1245
#define DMASRCINCR_3           (3*0x0100u)    /* DMA source increment 3: source address incremented */
1246
 
1247
#define DMADSTINCR_0           (0*0x0400u)    /* DMA destination increment 0: destination address unchanged */
1248
#define DMADSTINCR_1           (1*0x0400u)    /* DMA destination increment 1: destination address unchanged */
1249
#define DMADSTINCR_2           (2*0x0400u)    /* DMA destination increment 2: destination address decremented */
1250
#define DMADSTINCR_3           (3*0x0400u)    /* DMA destination increment 3: destination address incremented */
1251
 
1252
#define DMADT_0                (0*0x1000u)    /* DMA transfer mode 0: Single transfer */
1253
#define DMADT_1                (1*0x1000u)    /* DMA transfer mode 1: Block transfer */
1254
#define DMADT_2                (2*0x1000u)    /* DMA transfer mode 2: Burst-Block transfer */
1255
#define DMADT_3                (3*0x1000u)    /* DMA transfer mode 3: Burst-Block transfer */
1256
#define DMADT_4                (4*0x1000u)    /* DMA transfer mode 4: Repeated Single transfer */
1257
#define DMADT_5                (5*0x1000u)    /* DMA transfer mode 5: Repeated Block transfer */
1258
#define DMADT_6                (6*0x1000u)    /* DMA transfer mode 6: Repeated Burst-Block transfer */
1259
#define DMADT_7                (7*0x1000u)    /* DMA transfer mode 7: Repeated Burst-Block transfer */
1260
 
1261
/* DMAIV Definitions */
1262
#define DMAIV_NONE             (0x0000)       /* No Interrupt pending */
1263
#define DMAIV_DMA0IFG          (0x0002)       /* DMA0IFG*/
1264
#define DMAIV_DMA1IFG          (0x0004)       /* DMA1IFG*/
1265
#define DMAIV_DMA2IFG          (0x0006)       /* DMA2IFG*/
1266
#define DMAIV_DMA3IFG          (0x0008)       /* DMA3IFG*/
1267
#define DMAIV_DMA4IFG          (0x000A)       /* DMA4IFG*/
1268
#define DMAIV_DMA5IFG          (0x000C)       /* DMA5IFG*/
1269
 
1270
#define DMA0TSEL_0             (0*0x0001u)    /* DMA channel 0 transfer select 0:  DMA_REQ (sw) */
1271
#define DMA0TSEL_1             (1*0x0001u)    /* DMA channel 0 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1272
#define DMA0TSEL_2             (2*0x0001u)    /* DMA channel 0 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1273
#define DMA0TSEL_3             (3*0x0001u)    /* DMA channel 0 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1274
#define DMA0TSEL_4             (4*0x0001u)    /* DMA channel 0 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1275
#define DMA0TSEL_5             (5*0x0001u)    /* DMA channel 0 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
1276
#define DMA0TSEL_6             (6*0x0001u)    /* DMA channel 0 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
1277
#define DMA0TSEL_7             (7*0x0001u)    /* DMA channel 0 transfer select 7:  TimerB0 (TB0CCR0.IFG) */
1278
#define DMA0TSEL_8             (8*0x0001u)    /* DMA channel 0 transfer select 8:  TimerB0 (TB0CCR2.IFG) */
1279
#define DMA0TSEL_9             (9*0x0001u)    /* DMA channel 0 transfer select 9:  Reserved */
1280
#define DMA0TSEL_10            (10*0x0001u)   /* DMA channel 0 transfer select 10: Reserved */
1281
#define DMA0TSEL_11            (11*0x0001u)   /* DMA channel 0 transfer select 11: Reserved */
1282
#define DMA0TSEL_12            (12*0x0001u)   /* DMA channel 0 transfer select 12: Reserved */
1283
#define DMA0TSEL_13            (13*0x0001u)   /* DMA channel 0 transfer select 13: Reserved */
1284
#define DMA0TSEL_14            (14*0x0001u)   /* DMA channel 0 transfer select 14: Reserved */
1285
#define DMA0TSEL_15            (15*0x0001u)   /* DMA channel 0 transfer select 15: Reserved */
1286
#define DMA0TSEL_16            (16*0x0001u)   /* DMA channel 0 transfer select 16: USCIA0 receive */
1287
#define DMA0TSEL_17            (17*0x0001u)   /* DMA channel 0 transfer select 17: USCIA0 transmit */
1288
#define DMA0TSEL_18            (18*0x0001u)   /* DMA channel 0 transfer select 18: USCIB0 receive */
1289
#define DMA0TSEL_19            (19*0x0001u)   /* DMA channel 0 transfer select 19: USCIB0 transmit */
1290
#define DMA0TSEL_20            (20*0x0001u)   /* DMA channel 0 transfer select 20: USCIA1 receive */
1291
#define DMA0TSEL_21            (21*0x0001u)   /* DMA channel 0 transfer select 21: USCIA1 transmit */
1292
#define DMA0TSEL_22            (22*0x0001u)   /* DMA channel 0 transfer select 22: USCIB1 receive */
1293
#define DMA0TSEL_23            (23*0x0001u)   /* DMA channel 0 transfer select 23: USCIB1 transmit */
1294
#define DMA0TSEL_24            (24*0x0001u)   /* DMA channel 0 transfer select 24: ADC12IFGx */
1295
#define DMA0TSEL_25            (25*0x0001u)   /* DMA channel 0 transfer select 25: DAC12_0IFG */
1296
#define DMA0TSEL_26            (26*0x0001u)   /* DMA channel 0 transfer select 26: DAC12_1IFG */
1297
#define DMA0TSEL_27            (27*0x0001u)   /* DMA channel 0 transfer select 27: USB FNRXD */
1298
#define DMA0TSEL_28            (28*0x0001u)   /* DMA channel 0 transfer select 28: USB ready */
1299
#define DMA0TSEL_29            (29*0x0001u)   /* DMA channel 0 transfer select 29: Multiplier ready */
1300
#define DMA0TSEL_30            (30*0x0001u)   /* DMA channel 0 transfer select 30: previous DMA channel DMA5IFG */
1301
#define DMA0TSEL_31            (31*0x0001u)   /* DMA channel 0 transfer select 31: ext. Trigger (DMAE0) */
1302
 
1303
#define DMA1TSEL_0             (0*0x0100u)    /* DMA channel 1 transfer select 0:  DMA_REQ (sw) */
1304
#define DMA1TSEL_1             (1*0x0100u)    /* DMA channel 1 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1305
#define DMA1TSEL_2             (2*0x0100u)    /* DMA channel 1 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1306
#define DMA1TSEL_3             (3*0x0100u)    /* DMA channel 1 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1307
#define DMA1TSEL_4             (4*0x0100u)    /* DMA channel 1 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1308
#define DMA1TSEL_5             (5*0x0100u)    /* DMA channel 1 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
1309
#define DMA1TSEL_6             (6*0x0100u)    /* DMA channel 1 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
1310
#define DMA1TSEL_7             (7*0x0001u)    /* DMA channel 1 transfer select 7:  TimerB0 (TB0CCR0.IFG) */
1311
#define DMA1TSEL_8             (8*0x0001u)    /* DMA channel 1 transfer select 8:  TimerB0 (TB0CCR2.IFG) */
1312
#define DMA1TSEL_9             (9*0x0100u)    /* DMA channel 1 transfer select 9:  Reserved */
1313
#define DMA1TSEL_10            (10*0x0100u)   /* DMA channel 1 transfer select 10: Reserved */
1314
#define DMA1TSEL_11            (11*0x0100u)   /* DMA channel 1 transfer select 11: Reserved */
1315
#define DMA1TSEL_12            (12*0x0100u)   /* DMA channel 1 transfer select 12: Reserved */
1316
#define DMA1TSEL_13            (13*0x0100u)   /* DMA channel 1 transfer select 13: Reserved */
1317
#define DMA1TSEL_14            (14*0x0100u)   /* DMA channel 1 transfer select 14: Reserved */
1318
#define DMA1TSEL_15            (15*0x0100u)   /* DMA channel 1 transfer select 15: Reserved */
1319
#define DMA1TSEL_16            (16*0x0100u)   /* DMA channel 1 transfer select 16: USCIA0 receive */
1320
#define DMA1TSEL_17            (17*0x0100u)   /* DMA channel 1 transfer select 17: USCIA0 transmit */
1321
#define DMA1TSEL_18            (18*0x0100u)   /* DMA channel 1 transfer select 18: USCIB0 receive */
1322
#define DMA1TSEL_19            (19*0x0100u)   /* DMA channel 1 transfer select 19: USCIB0 transmit */
1323
#define DMA1TSEL_20            (20*0x0100u)   /* DMA channel 1 transfer select 20: USCIA1 receive */
1324
#define DMA1TSEL_21            (21*0x0100u)   /* DMA channel 1 transfer select 21: USCIA1 transmit */
1325
#define DMA1TSEL_22            (22*0x0100u)   /* DMA channel 1 transfer select 22: USCIB1 receive */
1326
#define DMA1TSEL_23            (23*0x0100u)   /* DMA channel 1 transfer select 23: USCIB1 transmit */
1327
#define DMA1TSEL_24            (24*0x0100u)   /* DMA channel 1 transfer select 24: ADC12IFGx */
1328
#define DMA1TSEL_25            (25*0x0100u)   /* DMA channel 1 transfer select 25: DAC12_0IFG */
1329
#define DMA1TSEL_26            (26*0x0100u)   /* DMA channel 1 transfer select 26: DAC12_1IFG */
1330
#define DMA1TSEL_27            (27*0x0100u)   /* DMA channel 1 transfer select 27: USB FNRXD */
1331
#define DMA1TSEL_28            (28*0x0100u)   /* DMA channel 1 transfer select 28: USB ready */
1332
#define DMA1TSEL_29            (29*0x0100u)   /* DMA channel 1 transfer select 29: Multiplier ready */
1333
#define DMA1TSEL_30            (30*0x0100u)   /* DMA channel 1 transfer select 30: previous DMA channel DMA0IFG */
1334
#define DMA1TSEL_31            (31*0x0100u)   /* DMA channel 1 transfer select 31: ext. Trigger (DMAE0) */
1335
 
1336
#define DMA2TSEL_0             (0*0x0001u)    /* DMA channel 2 transfer select 0:  DMA_REQ (sw) */
1337
#define DMA2TSEL_1             (1*0x0001u)    /* DMA channel 2 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1338
#define DMA2TSEL_2             (2*0x0001u)    /* DMA channel 2 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1339
#define DMA2TSEL_3             (3*0x0001u)    /* DMA channel 2 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1340
#define DMA2TSEL_4             (4*0x0001u)    /* DMA channel 2 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1341
#define DMA2TSEL_5             (5*0x0001u)    /* DMA channel 2 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
1342
#define DMA2TSEL_6             (6*0x0001u)    /* DMA channel 2 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
1343
#define DMA2TSEL_7             (7*0x0001u)    /* DMA channel 2 transfer select 7:  TimerB0 (TB0CCR0.IFG) */
1344
#define DMA2TSEL_8             (8*0x0001u)    /* DMA channel 2 transfer select 8:  TimerB0 (TB0CCR2.IFG) */
1345
#define DMA2TSEL_9             (9*0x0001u)    /* DMA channel 2 transfer select 9:  Reserved */
1346
#define DMA2TSEL_10            (10*0x0001u)   /* DMA channel 2 transfer select 10: Reserved */
1347
#define DMA2TSEL_11            (11*0x0001u)   /* DMA channel 2 transfer select 11: Reserved */
1348
#define DMA2TSEL_12            (12*0x0001u)   /* DMA channel 2 transfer select 12: Reserved */
1349
#define DMA2TSEL_13            (13*0x0001u)   /* DMA channel 2 transfer select 13: Reserved */
1350
#define DMA2TSEL_14            (14*0x0001u)   /* DMA channel 2 transfer select 14: Reserved */
1351
#define DMA2TSEL_15            (15*0x0001u)   /* DMA channel 2 transfer select 15: Reserved */
1352
#define DMA2TSEL_16            (16*0x0001u)   /* DMA channel 2 transfer select 16: USCIA0 receive */
1353
#define DMA2TSEL_17            (17*0x0001u)   /* DMA channel 2 transfer select 17: USCIA0 transmit */
1354
#define DMA2TSEL_18            (18*0x0001u)   /* DMA channel 2 transfer select 18: USCIB0 receive */
1355
#define DMA2TSEL_19            (19*0x0001u)   /* DMA channel 2 transfer select 19: USCIB0 transmit */
1356
#define DMA2TSEL_20            (20*0x0001u)   /* DMA channel 2 transfer select 20: USCIA1 receive */
1357
#define DMA2TSEL_21            (21*0x0001u)   /* DMA channel 2 transfer select 21: USCIA1 transmit */
1358
#define DMA2TSEL_22            (22*0x0001u)   /* DMA channel 2 transfer select 22: USCIB1 receive */
1359
#define DMA2TSEL_23            (23*0x0001u)   /* DMA channel 2 transfer select 23: USCIB1 transmit */
1360
#define DMA2TSEL_24            (24*0x0001u)   /* DMA channel 2 transfer select 24: ADC12IFGx */
1361
#define DMA2TSEL_25            (25*0x0001u)   /* DMA channel 2 transfer select 25: DAC12_0IFG */
1362
#define DMA2TSEL_26            (26*0x0001u)   /* DMA channel 2 transfer select 26: DAC12_1IFG */
1363
#define DMA2TSEL_27            (27*0x0001u)   /* DMA channel 2 transfer select 27: USB FNRXD */
1364
#define DMA2TSEL_28            (28*0x0001u)   /* DMA channel 2 transfer select 28: USB ready */
1365
#define DMA2TSEL_29            (29*0x0001u)   /* DMA channel 2 transfer select 29: Multiplier ready */
1366
#define DMA2TSEL_30            (30*0x0001u)   /* DMA channel 2 transfer select 30: previous DMA channel DMA1IFG */
1367
#define DMA2TSEL_31            (31*0x0001u)   /* DMA channel 2 transfer select 31: ext. Trigger (DMAE0) */
1368
 
1369
#define DMA3TSEL_0             (0*0x0100u)    /* DMA channel 3 transfer select 0:  DMA_REQ (sw) */
1370
#define DMA3TSEL_1             (1*0x0100u)    /* DMA channel 3 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1371
#define DMA3TSEL_2             (2*0x0100u)    /* DMA channel 3 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1372
#define DMA3TSEL_3             (3*0x0100u)    /* DMA channel 3 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1373
#define DMA3TSEL_4             (4*0x0100u)    /* DMA channel 3 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1374
#define DMA3TSEL_5             (5*0x0100u)    /* DMA channel 3 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
1375
#define DMA3TSEL_6             (6*0x0100u)    /* DMA channel 3 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
1376
#define DMA3TSEL_7             (7*0x0001u)    /* DMA channel 3 transfer select 7:  TimerB0 (TB0CCR0.IFG) */
1377
#define DMA3TSEL_8             (8*0x0001u)    /* DMA channel 3 transfer select 8:  TimerB0 (TB0CCR2.IFG) */
1378
#define DMA3TSEL_9             (9*0x0100u)    /* DMA channel 3 transfer select 9:  Reserved */
1379
#define DMA3TSEL_10            (10*0x0100u)   /* DMA channel 3 transfer select 10: Reserved */
1380
#define DMA3TSEL_11            (11*0x0100u)   /* DMA channel 3 transfer select 11: Reserved */
1381
#define DMA3TSEL_12            (12*0x0100u)   /* DMA channel 3 transfer select 12: Reserved */
1382
#define DMA3TSEL_13            (13*0x0100u)   /* DMA channel 3 transfer select 13: Reserved */
1383
#define DMA3TSEL_14            (14*0x0100u)   /* DMA channel 3 transfer select 14: Reserved */
1384
#define DMA3TSEL_15            (15*0x0100u)   /* DMA channel 3 transfer select 15: Reserved */
1385
#define DMA3TSEL_16            (16*0x0100u)   /* DMA channel 3 transfer select 16: USCIA0 receive */
1386
#define DMA3TSEL_17            (17*0x0100u)   /* DMA channel 3 transfer select 17: USCIA0 transmit */
1387
#define DMA3TSEL_18            (18*0x0100u)   /* DMA channel 3 transfer select 18: USCIB0 receive */
1388
#define DMA3TSEL_19            (19*0x0100u)   /* DMA channel 3 transfer select 19: USCIB0 transmit */
1389
#define DMA3TSEL_20            (20*0x0100u)   /* DMA channel 3 transfer select 20: USCIA1 receive */
1390
#define DMA3TSEL_21            (21*0x0100u)   /* DMA channel 3 transfer select 21: USCIA1 transmit */
1391
#define DMA3TSEL_22            (22*0x0100u)   /* DMA channel 3 transfer select 22: USCIB1 receive */
1392
#define DMA3TSEL_23            (23*0x0100u)   /* DMA channel 3 transfer select 23: USCIB1 transmit */
1393
#define DMA3TSEL_24            (24*0x0100u)   /* DMA channel 3 transfer select 24: ADC12IFGx */
1394
#define DMA3TSEL_25            (25*0x0100u)   /* DMA channel 3 transfer select 25: DAC12_0IFG */
1395
#define DMA3TSEL_26            (26*0x0100u)   /* DMA channel 3 transfer select 26: DAC12_1IFG */
1396
#define DMA3TSEL_27            (27*0x0100u)   /* DMA channel 3 transfer select 27: USB FNRXD */
1397
#define DMA3TSEL_28            (28*0x0100u)   /* DMA channel 3 transfer select 28: USB ready */
1398
#define DMA3TSEL_29            (29*0x0100u)   /* DMA channel 3 transfer select 29: Multiplier ready */
1399
#define DMA3TSEL_30            (30*0x0100u)   /* DMA channel 3 transfer select 30: previous DMA channel DMA2IFG */
1400
#define DMA3TSEL_31            (31*0x0100u)   /* DMA channel 3 transfer select 31: ext. Trigger (DMAE0) */
1401
 
1402
#define DMA4TSEL_0             (0*0x0001u)    /* DMA channel 4 transfer select 0:  DMA_REQ (sw) */
1403
#define DMA4TSEL_1             (1*0x0001u)    /* DMA channel 4 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1404
#define DMA4TSEL_2             (2*0x0001u)    /* DMA channel 4 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1405
#define DMA4TSEL_3             (3*0x0001u)    /* DMA channel 4 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1406
#define DMA4TSEL_4             (4*0x0001u)    /* DMA channel 4 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1407
#define DMA4TSEL_5             (5*0x0001u)    /* DMA channel 4 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
1408
#define DMA4TSEL_6             (6*0x0001u)    /* DMA channel 4 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
1409
#define DMA4TSEL_7             (7*0x0001u)    /* DMA channel 4 transfer select 7:  TimerB0 (TB0CCR0.IFG) */
1410
#define DMA4TSEL_8             (8*0x0001u)    /* DMA channel 4 transfer select 8:  TimerB0 (TB0CCR2.IFG) */
1411
#define DMA4TSEL_9             (9*0x0001u)    /* DMA channel 4 transfer select 9:  Reserved */
1412
#define DMA4TSEL_10            (10*0x0001u)   /* DMA channel 4 transfer select 10: Reserved */
1413
#define DMA4TSEL_11            (11*0x0001u)   /* DMA channel 4 transfer select 11: Reserved */
1414
#define DMA4TSEL_12            (12*0x0001u)   /* DMA channel 4 transfer select 12: Reserved */
1415
#define DMA4TSEL_13            (13*0x0001u)   /* DMA channel 4 transfer select 13: Reserved */
1416
#define DMA4TSEL_14            (14*0x0001u)   /* DMA channel 4 transfer select 14: Reserved */
1417
#define DMA4TSEL_15            (15*0x0001u)   /* DMA channel 4 transfer select 15: Reserved */
1418
#define DMA4TSEL_16            (16*0x0001u)   /* DMA channel 4 transfer select 16: USCIA0 receive */
1419
#define DMA4TSEL_17            (17*0x0001u)   /* DMA channel 4 transfer select 17: USCIA0 transmit */
1420
#define DMA4TSEL_18            (18*0x0001u)   /* DMA channel 4 transfer select 18: USCIB0 receive */
1421
#define DMA4TSEL_19            (19*0x0001u)   /* DMA channel 4 transfer select 19: USCIB0 transmit */
1422
#define DMA4TSEL_20            (20*0x0001u)   /* DMA channel 4 transfer select 20: USCIA1 receive */
1423
#define DMA4TSEL_21            (21*0x0001u)   /* DMA channel 4 transfer select 21: USCIA1 transmit */
1424
#define DMA4TSEL_22            (22*0x0001u)   /* DMA channel 4 transfer select 22: USCIB1 receive */
1425
#define DMA4TSEL_23            (23*0x0001u)   /* DMA channel 4 transfer select 23: USCIB1 transmit */
1426
#define DMA4TSEL_24            (24*0x0001u)   /* DMA channel 4 transfer select 24: ADC12IFGx */
1427
#define DMA4TSEL_25            (25*0x0001u)   /* DMA channel 4 transfer select 25: DAC12_0IFG */
1428
#define DMA4TSEL_26            (26*0x0001u)   /* DMA channel 4 transfer select 26: DAC12_1IFG */
1429
#define DMA4TSEL_27            (27*0x0001u)   /* DMA channel 4 transfer select 27: USB FNRXD */
1430
#define DMA4TSEL_28            (28*0x0001u)   /* DMA channel 4 transfer select 28: USB ready */
1431
#define DMA4TSEL_29            (29*0x0001u)   /* DMA channel 4 transfer select 29: Multiplier ready */
1432
#define DMA4TSEL_30            (30*0x0001u)   /* DMA channel 4 transfer select 30: previous DMA channel DMA3IFG */
1433
#define DMA4TSEL_31            (31*0x0001u)   /* DMA channel 4 transfer select 31: ext. Trigger (DMAE0) */
1434
 
1435
#define DMA5TSEL_0             (0*0x0100u)    /* DMA channel 5 transfer select 0:  DMA_REQ (sw) */
1436
#define DMA5TSEL_1             (1*0x0100u)    /* DMA channel 5 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1437
#define DMA5TSEL_2             (2*0x0100u)    /* DMA channel 5 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1438
#define DMA5TSEL_3             (3*0x0100u)    /* DMA channel 5 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1439
#define DMA5TSEL_4             (4*0x0100u)    /* DMA channel 5 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1440
#define DMA5TSEL_5             (5*0x0100u)    /* DMA channel 5 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
1441
#define DMA5TSEL_6             (6*0x0100u)    /* DMA channel 5 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
1442
#define DMA5TSEL_7             (7*0x0001u)    /* DMA channel 5 transfer select 7:  TimerB0 (TB0CCR0.IFG) */
1443
#define DMA5TSEL_8             (8*0x0001u)    /* DMA channel 5 transfer select 8:  TimerB0 (TB0CCR2.IFG) */
1444
#define DMA5TSEL_9             (9*0x0100u)    /* DMA channel 5 transfer select 9:  Reserved */
1445
#define DMA5TSEL_10            (10*0x0100u)   /* DMA channel 5 transfer select 10: Reserved */
1446
#define DMA5TSEL_11            (11*0x0100u)   /* DMA channel 5 transfer select 11: Reserved */
1447
#define DMA5TSEL_12            (12*0x0100u)   /* DMA channel 5 transfer select 12: Reserved */
1448
#define DMA5TSEL_13            (13*0x0100u)   /* DMA channel 5 transfer select 13: Reserved */
1449
#define DMA5TSEL_14            (14*0x0100u)   /* DMA channel 5 transfer select 14: Reserved */
1450
#define DMA5TSEL_15            (15*0x0100u)   /* DMA channel 5 transfer select 15: Reserved */
1451
#define DMA5TSEL_16            (16*0x0100u)   /* DMA channel 5 transfer select 16: USCIA0 receive */
1452
#define DMA5TSEL_17            (17*0x0100u)   /* DMA channel 5 transfer select 17: USCIA0 transmit */
1453
#define DMA5TSEL_18            (18*0x0100u)   /* DMA channel 5 transfer select 18: USCIB0 receive */
1454
#define DMA5TSEL_19            (19*0x0100u)   /* DMA channel 5 transfer select 19: USCIB0 transmit */
1455
#define DMA5TSEL_20            (20*0x0100u)   /* DMA channel 5 transfer select 20: USCIA1 receive */
1456
#define DMA5TSEL_21            (21*0x0100u)   /* DMA channel 5 transfer select 21: USCIA1 transmit */
1457
#define DMA5TSEL_22            (22*0x0100u)   /* DMA channel 5 transfer select 22: USCIB1 receive */
1458
#define DMA5TSEL_23            (23*0x0100u)   /* DMA channel 5 transfer select 23: USCIB1 transmit */
1459
#define DMA5TSEL_24            (24*0x0100u)   /* DMA channel 5 transfer select 24: ADC12IFGx */
1460
#define DMA5TSEL_25            (25*0x0100u)   /* DMA channel 5 transfer select 25: DAC12_0IFG */
1461
#define DMA5TSEL_26            (26*0x0100u)   /* DMA channel 5 transfer select 26: DAC12_1IFG */
1462
#define DMA5TSEL_27            (27*0x0100u)   /* DMA channel 5 transfer select 27: USB FNRXD */
1463
#define DMA5TSEL_28            (28*0x0100u)   /* DMA channel 5 transfer select 28: USB ready */
1464
#define DMA5TSEL_29            (29*0x0100u)   /* DMA channel 5 transfer select 29: Multiplier ready */
1465
#define DMA5TSEL_30            (30*0x0100u)   /* DMA channel 5 transfer select 30: previous DMA channel DMA4IFG */
1466
#define DMA5TSEL_31            (31*0x0100u)   /* DMA channel 5 transfer select 31: ext. Trigger (DMAE0) */
1467
 
1468
#define DMA0TSEL__DMA_REQ      (0*0x0001u)    /* DMA channel 0 transfer select 0:  DMA_REQ (sw) */
1469
#define DMA0TSEL__TA0CCR0      (1*0x0001u)    /* DMA channel 0 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1470
#define DMA0TSEL__TA0CCR2      (2*0x0001u)    /* DMA channel 0 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1471
#define DMA0TSEL__TA1CCR0      (3*0x0001u)    /* DMA channel 0 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1472
#define DMA0TSEL__TA1CCR2      (4*0x0001u)    /* DMA channel 0 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1473
#define DMA0TSEL__TA2CCR0      (5*0x0001u)    /* DMA channel 0 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
1474
#define DMA0TSEL__TA2CCR2      (6*0x0001u)    /* DMA channel 0 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
1475
#define DMA0TSEL__TB0CCR0      (7*0x0001u)    /* DMA channel 0 transfer select 7:  TimerB0  (TB0CCR0.IFG) */
1476
#define DMA0TSEL__TB0CCR2      (8*0x0001u)    /* DMA channel 0 transfer select 8:  TimerB0  (TB0CCR2.IFG) */
1477
#define DMA0TSEL__RES9         (9*0x0001u)    /* DMA channel 0 transfer select 9:  Reserved */
1478
#define DMA0TSEL__RES10        (10*0x0001u)   /* DMA channel 0 transfer select 10: Reserved */
1479
#define DMA0TSEL__RES11        (11*0x0001u)   /* DMA channel 0 transfer select 11: Reserved */
1480
#define DMA0TSEL__RES12        (12*0x0001u)   /* DMA channel 0 transfer select 12: Reserved */
1481
#define DMA0TSEL__RES13        (13*0x0001u)   /* DMA channel 0 transfer select 13: Reserved */
1482
#define DMA0TSEL__RES14        (14*0x0001u)   /* DMA channel 0 transfer select 14: Reserved */
1483
#define DMA0TSEL__RES15        (15*0x0001u)   /* DMA channel 0 transfer select 15: Reserved */
1484
#define DMA0TSEL__USCIA0RX     (16*0x0001u)   /* DMA channel 0 transfer select 16: USCIA0 receive */
1485
#define DMA0TSEL__USCIA0TX     (17*0x0001u)   /* DMA channel 0 transfer select 17: USCIA0 transmit */
1486
#define DMA0TSEL__USCIB0RX     (18*0x0001u)   /* DMA channel 0 transfer select 18: USCIB0 receive */
1487
#define DMA0TSEL__USCIB0TX     (19*0x0001u)   /* DMA channel 0 transfer select 19: USCIB0 transmit */
1488
#define DMA0TSEL__USCIA1RX     (20*0x0001u)   /* DMA channel 0 transfer select 20: USCIA1 receive */
1489
#define DMA0TSEL__USCIA1TX     (21*0x0001u)   /* DMA channel 0 transfer select 21: USCIA1 transmit */
1490
#define DMA0TSEL__USCIB1RX     (22*0x0001u)   /* DMA channel 0 transfer select 22: USCIB1 receive */
1491
#define DMA0TSEL__USCIB1TX     (23*0x0001u)   /* DMA channel 0 transfer select 23: USCIB1 transmit */
1492
#define DMA0TSEL__ADC12IFG     (24*0x0001u)   /* DMA channel 0 transfer select 24: ADC12IFGx */
1493
#define DMA0TSEL__DAC12_0IFG   (25*0x0001u)   /* DMA channel 0 transfer select 25: DAC12_0IFG */
1494
#define DMA0TSEL__DAC12_1IFG   (26*0x0001u)   /* DMA channel 0 transfer select 26: DAC12_1IFG */
1495
#define DMA0TSEL__USB_FNRXD    (27*0x0001u)   /* DMA channel 0 transfer select 27: USB FNRXD */
1496
#define DMA0TSEL__USB_READY    (28*0x0001u)   /* DMA channel 0 transfer select 28: USB ready */
1497
#define DMA0TSEL__MPY          (29*0x0001u)   /* DMA channel 0 transfer select 29: Multiplier ready */
1498
#define DMA0TSEL__DMA5IFG      (30*0x0001u)   /* DMA channel 0 transfer select 30: previous DMA channel DMA5IFG */
1499
#define DMA0TSEL__DMAE0        (31*0x0001u)   /* DMA channel 0 transfer select 31: ext. Trigger (DMAE0) */
1500
 
1501
#define DMA1TSEL__DMA_REQ      (0*0x0100u)    /* DMA channel 1 transfer select 0:  DMA_REQ (sw) */
1502
#define DMA1TSEL__TA0CCR0      (1*0x0100u)    /* DMA channel 1 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1503
#define DMA1TSEL__TA0CCR2      (2*0x0100u)    /* DMA channel 1 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1504
#define DMA1TSEL__TA1CCR0      (3*0x0100u)    /* DMA channel 1 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1505
#define DMA1TSEL__TA1CCR2      (4*0x0100u)    /* DMA channel 1 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1506
#define DMA1TSEL__TA2CCR0      (5*0x0100u)    /* DMA channel 1 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
1507
#define DMA1TSEL__TA2CCR2      (6*0x0100u)    /* DMA channel 1 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
1508
#define DMA1TSEL__TB0CCR0      (7*0x0001u)    /* DMA channel 1 transfer select 7:  TimerB0 (TB0CCR0.IFG) */
1509
#define DMA1TSEL__TB0CCR2      (8*0x0001u)    /* DMA channel 1 transfer select 8:  TimerB0 (TB0CCR2.IFG) */
1510
#define DMA1TSEL__RES9         (9*0x0100u)    /* DMA channel 1 transfer select 9:  Reserved */
1511
#define DMA1TSEL__RES10        (10*0x0100u)   /* DMA channel 1 transfer select 10: Reserved */
1512
#define DMA1TSEL__RES11        (11*0x0100u)   /* DMA channel 1 transfer select 11: Reserved */
1513
#define DMA1TSEL__RES12        (12*0x0100u)   /* DMA channel 1 transfer select 12: Reserved */
1514
#define DMA1TSEL__RES13        (13*0x0100u)   /* DMA channel 1 transfer select 13: Reserved */
1515
#define DMA1TSEL__RES14        (14*0x0100u)   /* DMA channel 1 transfer select 14: Reserved */
1516
#define DMA1TSEL__RES15        (15*0x0100u)   /* DMA channel 1 transfer select 15: Reserved */
1517
#define DMA1TSEL__USCIA0RX     (16*0x0100u)   /* DMA channel 1 transfer select 16: USCIA0 receive */
1518
#define DMA1TSEL__USCIA0TX     (17*0x0100u)   /* DMA channel 1 transfer select 17: USCIA0 transmit */
1519
#define DMA1TSEL__USCIB0RX     (18*0x0100u)   /* DMA channel 1 transfer select 18: USCIB0 receive */
1520
#define DMA1TSEL__USCIB0TX     (19*0x0100u)   /* DMA channel 1 transfer select 19: USCIB0 transmit */
1521
#define DMA1TSEL__USCIA1RX     (20*0x0100u)   /* DMA channel 1 transfer select 20: USCIA1 receive */
1522
#define DMA1TSEL__USCIA1TX     (21*0x0100u)   /* DMA channel 1 transfer select 21: USCIA1 transmit */
1523
#define DMA1TSEL__USCIB1RX     (22*0x0100u)   /* DMA channel 1 transfer select 22: USCIB1 receive */
1524
#define DMA1TSEL__USCIB1TX     (23*0x0100u)   /* DMA channel 1 transfer select 23: USCIB1 transmit */
1525
#define DMA1TSEL__ADC12IFG     (24*0x0100u)   /* DMA channel 1 transfer select 24: ADC12IFGx */
1526
#define DMA1TSEL__DAC12_0IFG   (25*0x0100u)   /* DMA channel 1 transfer select 25: DAC12_0IFG */
1527
#define DMA1TSEL__DAC12_1IFG   (26*0x0100u)   /* DMA channel 1 transfer select 26: DAC12_1IFG */
1528
#define DMA1TSEL__USB_FNRXD    (27*0x0100u)   /* DMA channel 1 transfer select 27: USB FNRXD */
1529
#define DMA1TSEL__USB_READY    (28*0x0100u)   /* DMA channel 1 transfer select 28: USB ready */
1530
#define DMA1TSEL__MPY          (29*0x0100u)   /* DMA channel 1 transfer select 29: Multiplier ready */
1531
#define DMA1TSEL__DMA0IFG      (30*0x0100u)   /* DMA channel 1 transfer select 30: previous DMA channel DMA0IFG */
1532
#define DMA1TSEL__DMAE0        (31*0x0100u)   /* DMA channel 1 transfer select 31: ext. Trigger (DMAE0) */
1533
 
1534
#define DMA2TSEL__DMA_REQ      (0*0x0001u)    /* DMA channel 2 transfer select 0:  DMA_REQ (sw) */
1535
#define DMA2TSEL__TA0CCR0      (1*0x0001u)    /* DMA channel 2 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1536
#define DMA2TSEL__TA0CCR2      (2*0x0001u)    /* DMA channel 2 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1537
#define DMA2TSEL__TA1CCR0      (3*0x0001u)    /* DMA channel 2 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1538
#define DMA2TSEL__TA1CCR2      (4*0x0001u)    /* DMA channel 2 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1539
#define DMA2TSEL__TA2CCR0      (5*0x0001u)    /* DMA channel 2 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
1540
#define DMA2TSEL__TA2CCR2      (6*0x0001u)    /* DMA channel 2 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
1541
#define DMA2TSEL__TB0CCR0      (7*0x0001u)    /* DMA channel 2 transfer select 7:  TimerB0 (TB0CCR0.IFG) */
1542
#define DMA2TSEL__TB0CCR2      (8*0x0001u)    /* DMA channel 2 transfer select 8:  TimerB0 (TB0CCR2.IFG) */
1543
#define DMA2TSEL__RES9         (9*0x0001u)    /* DMA channel 2 transfer select 9:  Reserved */
1544
#define DMA2TSEL__RES10        (10*0x0001u)   /* DMA channel 2 transfer select 10: Reserved */
1545
#define DMA2TSEL__RES11        (11*0x0001u)   /* DMA channel 2 transfer select 11: Reserved */
1546
#define DMA2TSEL__RES12        (12*0x0001u)   /* DMA channel 2 transfer select 12: Reserved */
1547
#define DMA2TSEL__RES13        (13*0x0001u)   /* DMA channel 2 transfer select 13: Reserved */
1548
#define DMA2TSEL__RES14        (14*0x0001u)   /* DMA channel 2 transfer select 14: Reserved */
1549
#define DMA2TSEL__RES15        (15*0x0001u)   /* DMA channel 2 transfer select 15: Reserved */
1550
#define DMA2TSEL__USCIA0RX     (16*0x0001u)   /* DMA channel 2 transfer select 16: USCIA0 receive */
1551
#define DMA2TSEL__USCIA0TX     (17*0x0001u)   /* DMA channel 2 transfer select 17: USCIA0 transmit */
1552
#define DMA2TSEL__USCIB0RX     (18*0x0001u)   /* DMA channel 2 transfer select 18: USCIB0 receive */
1553
#define DMA2TSEL__USCIB0TX     (19*0x0001u)   /* DMA channel 2 transfer select 19: USCIB0 transmit */
1554
#define DMA2TSEL__USCIA1RX     (20*0x0001u)   /* DMA channel 2 transfer select 20: USCIA1 receive */
1555
#define DMA2TSEL__USCIA1TX     (21*0x0001u)   /* DMA channel 2 transfer select 21: USCIA1 transmit */
1556
#define DMA2TSEL__USCIB1RX     (22*0x0001u)   /* DMA channel 2 transfer select 22: USCIB1 receive */
1557
#define DMA2TSEL__USCIB1TX     (23*0x0001u)   /* DMA channel 2 transfer select 23: USCIB1 transmit */
1558
#define DMA2TSEL__ADC12IFG     (24*0x0001u)   /* DMA channel 2 transfer select 24: ADC12IFGx */
1559
#define DMA2TSEL__DAC12_0IFG   (25*0x0001u)   /* DMA channel 2 transfer select 25: DAC12_0IFG */
1560
#define DMA2TSEL__DAC12_1IFG   (26*0x0001u)   /* DMA channel 2 transfer select 26: DAC12_1IFG */
1561
#define DMA2TSEL__USB_FNRXD    (27*0x0001u)   /* DMA channel 2 transfer select 27: USB FNRXD */
1562
#define DMA2TSEL__USB_READY    (28*0x0001u)   /* DMA channel 2 transfer select 28: USB ready */
1563
#define DMA2TSEL__MPY          (29*0x0001u)   /* DMA channel 2 transfer select 29: Multiplier ready */
1564
#define DMA2TSEL__DMA1IFG      (30*0x0001u)   /* DMA channel 2 transfer select 30: previous DMA channel DMA1IFG */
1565
#define DMA2TSEL__DMAE0        (31*0x0001u)   /* DMA channel 2 transfer select 31: ext. Trigger (DMAE0) */
1566
 
1567
#define DMA3TSEL__DMA_REQ      (0*0x0100u)    /* DMA channel 3 transfer select 0:  DMA_REQ (sw) */
1568
#define DMA3TSEL__TA0CCR0      (1*0x0100u)    /* DMA channel 3 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1569
#define DMA3TSEL__TA0CCR2      (2*0x0100u)    /* DMA channel 3 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1570
#define DMA3TSEL__TA1CCR0      (3*0x0100u)    /* DMA channel 3 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1571
#define DMA3TSEL__TA1CCR2      (4*0x0100u)    /* DMA channel 3 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1572
#define DMA3TSEL__TA2CCR0      (5*0x0100u)    /* DMA channel 3 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
1573
#define DMA3TSEL__TA2CCR2      (6*0x0100u)    /* DMA channel 3 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
1574
#define DMA3TSEL__TB0CCR0      (7*0x0001u)    /* DMA channel 3 transfer select 7:  TimerB0 (TB0CCR0.IFG) */
1575
#define DMA3TSEL__TB0CCR2      (8*0x0001u)    /* DMA channel 3 transfer select 8:  TimerB0 (TB0CCR2.IFG) */
1576
#define DMA3TSEL__RES9         (9*0x0100u)    /* DMA channel 3 transfer select 9:  Reserved */
1577
#define DMA3TSEL__RES10        (10*0x0100u)   /* DMA channel 3 transfer select 10: Reserved */
1578
#define DMA3TSEL__RES11        (11*0x0100u)   /* DMA channel 3 transfer select 11: Reserved */
1579
#define DMA3TSEL__RES12        (12*0x0100u)   /* DMA channel 3 transfer select 12: Reserved */
1580
#define DMA3TSEL__RES13        (13*0x0100u)   /* DMA channel 3 transfer select 13: Reserved */
1581
#define DMA3TSEL__RES14        (14*0x0100u)   /* DMA channel 3 transfer select 14: Reserved */
1582
#define DMA3TSEL__RES15        (15*0x0100u)   /* DMA channel 3 transfer select 15: Reserved */
1583
#define DMA3TSEL__USCIA0RX     (16*0x0100u)   /* DMA channel 3 transfer select 16: USCIA0 receive */
1584
#define DMA3TSEL__USCIA0TX     (17*0x0100u)   /* DMA channel 3 transfer select 17: USCIA0 transmit */
1585
#define DMA3TSEL__USCIB0RX     (18*0x0100u)   /* DMA channel 3 transfer select 18: USCIB0 receive */
1586
#define DMA3TSEL__USCIB0TX     (19*0x0100u)   /* DMA channel 3 transfer select 19: USCIB0 transmit */
1587
#define DMA3TSEL__USCIA1RX     (20*0x0100u)   /* DMA channel 3 transfer select 20: USCIA1 receive */
1588
#define DMA3TSEL__USCIA1TX     (21*0x0100u)   /* DMA channel 3 transfer select 21: USCIA1 transmit */
1589
#define DMA3TSEL__USCIB1RX     (22*0x0100u)   /* DMA channel 3 transfer select 22: USCIB1 receive */
1590
#define DMA3TSEL__USCIB1TX     (23*0x0100u)   /* DMA channel 3 transfer select 23: USCIB1 transmit */
1591
#define DMA3TSEL__ADC12IFG     (24*0x0100u)   /* DMA channel 3 transfer select 24: ADC12IFGx */
1592
#define DMA3TSEL__DAC12_0IFG   (25*0x0100u)   /* DMA channel 3 transfer select 25: DAC12_0IFG */
1593
#define DMA3TSEL__DAC12_1IFG   (26*0x0100u)   /* DMA channel 3 transfer select 26: DAC12_1IFG */
1594
#define DMA3TSEL__USB_FNRXD    (27*0x0100u)   /* DMA channel 3 transfer select 27: USB FNRXD */
1595
#define DMA3TSEL__USB_READY    (28*0x0100u)   /* DMA channel 3 transfer select 28: USB ready */
1596
#define DMA3TSEL__MPY          (29*0x0100u)   /* DMA channel 3 transfer select 29: Multiplier ready */
1597
#define DMA3TSEL__DMA2IFG      (30*0x0100u)   /* DMA channel 3 transfer select 30: previous DMA channel DMA2IFG */
1598
#define DMA3TSEL__DMAE0        (31*0x0100u)   /* DMA channel 3 transfer select 31: ext. Trigger (DMAE0) */
1599
 
1600
#define DMA4TSEL__DMA_REQ      (0*0x0001u)    /* DMA channel 4 transfer select 0:  DMA_REQ (sw) */
1601
#define DMA4TSEL__TA0CCR0      (1*0x0001u)    /* DMA channel 4 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1602
#define DMA4TSEL__TA0CCR2      (2*0x0001u)    /* DMA channel 4 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1603
#define DMA4TSEL__TA1CCR0      (3*0x0001u)    /* DMA channel 4 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1604
#define DMA4TSEL__TA1CCR2      (4*0x0001u)    /* DMA channel 4 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1605
#define DMA4TSEL__TA2CCR0      (5*0x0001u)    /* DMA channel 4 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
1606
#define DMA4TSEL__TA2CCR2      (6*0x0001u)    /* DMA channel 4 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
1607
#define DMA4TSEL__TB0CCR0      (7*0x0001u)    /* DMA channel 4 transfer select 7:  TimerB0 (TB0CCR0.IFG) */
1608
#define DMA4TSEL__TB0CCR2      (8*0x0001u)    /* DMA channel 4 transfer select 8:  TimerB0 (TB0CCR2.IFG) */
1609
#define DMA4TSEL__RES9         (9*0x0001u)    /* DMA channel 4 transfer select 9:  Reserved */
1610
#define DMA4TSEL__RES10        (10*0x0001u)   /* DMA channel 4 transfer select 10: Reserved */
1611
#define DMA4TSEL__RES11        (11*0x0001u)   /* DMA channel 4 transfer select 11: Reserved */
1612
#define DMA4TSEL__RES12        (12*0x0001u)   /* DMA channel 4 transfer select 12: Reserved */
1613
#define DMA4TSEL__RES13        (13*0x0001u)   /* DMA channel 4 transfer select 13: Reserved */
1614
#define DMA4TSEL__RES14        (14*0x0001u)   /* DMA channel 4 transfer select 14: Reserved */
1615
#define DMA4TSEL__RES15        (15*0x0001u)   /* DMA channel 4 transfer select 15: Reserved */
1616
#define DMA4TSEL__USCIA0RX     (16*0x0001u)   /* DMA channel 4 transfer select 16: USCIA0 receive */
1617
#define DMA4TSEL__USCIA0TX     (17*0x0001u)   /* DMA channel 4 transfer select 17: USCIA0 transmit */
1618
#define DMA4TSEL__USCIB0RX     (18*0x0001u)   /* DMA channel 4 transfer select 18: USCIB0 receive */
1619
#define DMA4TSEL__USCIB0TX     (19*0x0001u)   /* DMA channel 4 transfer select 19: USCIB0 transmit */
1620
#define DMA4TSEL__USCIA1RX     (20*0x0001u)   /* DMA channel 4 transfer select 20: USCIA1 receive */
1621
#define DMA4TSEL__USCIA1TX     (21*0x0001u)   /* DMA channel 4 transfer select 21: USCIA1 transmit */
1622
#define DMA4TSEL__USCIB1RX     (22*0x0001u)   /* DMA channel 4 transfer select 22: USCIB1 receive */
1623
#define DMA4TSEL__USCIB1TX     (23*0x0001u)   /* DMA channel 4 transfer select 23: USCIB1 transmit */
1624
#define DMA4TSEL__ADC12IFG     (24*0x0001u)   /* DMA channel 4 transfer select 24: ADC12IFGx */
1625
#define DMA4TSEL__DAC12_0IFG   (25*0x0001u)   /* DMA channel 4 transfer select 25: DAC12_0IFG */
1626
#define DMA4TSEL__DAC12_1IFG   (26*0x0001u)   /* DMA channel 4 transfer select 26: DAC12_1IFG */
1627
#define DMA4TSEL__USB_FNRXD    (27*0x0001u)   /* DMA channel 4 transfer select 27: USB FNRXD */
1628
#define DMA4TSEL__USB_READY    (28*0x0001u)   /* DMA channel 4 transfer select 28: USB ready */
1629
#define DMA4TSEL__MPY          (29*0x0001u)   /* DMA channel 4 transfer select 29: Multiplier ready */
1630
#define DMA4TSEL__DMA3IFG      (30*0x0001u)   /* DMA channel 4 transfer select 30: previous DMA channel DMA3IFG */
1631
#define DMA4TSEL__DMAE0        (31*0x0001u)   /* DMA channel 4 transfer select 31: ext. Trigger (DMAE0) */
1632
 
1633
#define DMA5TSEL__DMA_REQ      (0*0x0100u)    /* DMA channel 5 transfer select 0:  DMA_REQ (sw) */
1634
#define DMA5TSEL__TA0CCR0      (1*0x0100u)    /* DMA channel 5 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1635
#define DMA5TSEL__TA0CCR2      (2*0x0100u)    /* DMA channel 5 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1636
#define DMA5TSEL__TA1CCR0      (3*0x0100u)    /* DMA channel 5 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1637
#define DMA5TSEL__TA1CCR2      (4*0x0100u)    /* DMA channel 5 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1638
#define DMA5TSEL__TA2CCR0      (5*0x0100u)    /* DMA channel 5 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
1639
#define DMA5TSEL__TA2CCR2      (6*0x0100u)    /* DMA channel 5 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
1640
#define DMA5TSEL__TB0CCR0      (7*0x0001u)    /* DMA channel 5 transfer select 7:  TimerB0 (TB0CCR0.IFG) */
1641
#define DMA5TSEL__TB0CCR2      (8*0x0001u)    /* DMA channel 5 transfer select 8:  TimerB0 (TB0CCR2.IFG) */
1642
#define DMA5TSEL__RES9         (9*0x0100u)    /* DMA channel 5 transfer select 9:  Reserved */
1643
#define DMA5TSEL__RES10        (10*0x0100u)   /* DMA channel 5 transfer select 10: Reserved */
1644
#define DMA5TSEL__RES11        (11*0x0100u)   /* DMA channel 5 transfer select 11: Reserved */
1645
#define DMA5TSEL__RES12        (12*0x0100u)   /* DMA channel 5 transfer select 12: Reserved */
1646
#define DMA5TSEL__RES13        (13*0x0100u)   /* DMA channel 5 transfer select 13: Reserved */
1647
#define DMA5TSEL__RES14        (14*0x0100u)   /* DMA channel 5 transfer select 14: Reserved */
1648
#define DMA5TSEL__RES15        (15*0x0100u)   /* DMA channel 5 transfer select 15: Reserved */
1649
#define DMA5TSEL__USCIA0RX     (16*0x0100u)   /* DMA channel 5 transfer select 16: USCIA0 receive */
1650
#define DMA5TSEL__USCIA0TX     (17*0x0100u)   /* DMA channel 5 transfer select 17: USCIA0 transmit */
1651
#define DMA5TSEL__USCIB0RX     (18*0x0100u)   /* DMA channel 5 transfer select 18: USCIB0 receive */
1652
#define DMA5TSEL__USCIB0TX     (19*0x0100u)   /* DMA channel 5 transfer select 19: USCIB0 transmit */
1653
#define DMA5TSEL__USCIA1RX     (20*0x0100u)   /* DMA channel 5 transfer select 20: USCIA1 receive */
1654
#define DMA5TSEL__USCIA1TX     (21*0x0100u)   /* DMA channel 5 transfer select 21: USCIA1 transmit */
1655
#define DMA5TSEL__USCIB1RX     (22*0x0100u)   /* DMA channel 5 transfer select 22: USCIB1 receive */
1656
#define DMA5TSEL__USCIB1TX     (23*0x0100u)   /* DMA channel 5 transfer select 23: USCIB1 transmit */
1657
#define DMA5TSEL__ADC12IFG     (24*0x0100u)   /* DMA channel 5 transfer select 24: ADC12IFGx */
1658
#define DMA5TSEL__DAC12_0IFG   (25*0x0100u)   /* DMA channel 5 transfer select 25: DAC12_0IFG */
1659
#define DMA5TSEL__DAC12_1IFG   (26*0x0100u)   /* DMA channel 5 transfer select 26: DAC12_1IFG */
1660
#define DMA5TSEL__USB_FNRXD    (27*0x0100u)   /* DMA channel 5 transfer select 27: USB FNRXD */
1661
#define DMA5TSEL__USB_READY    (28*0x0100u)   /* DMA channel 5 transfer select 28: USB ready */
1662
#define DMA5TSEL__MPY          (29*0x0100u)   /* DMA channel 5 transfer select 29: Multiplier ready */
1663
#define DMA5TSEL__DMA4IFG      (30*0x0100u)   /* DMA channel 5 transfer select 30: previous DMA channel DMA4IFG */
1664
#define DMA5TSEL__DMAE0        (31*0x0100u)   /* DMA channel 5 transfer select 31: ext. Trigger (DMAE0) */
1665
 
1666
/*************************************************************
1667
* Flash Memory
1668
*************************************************************/
1669
#define __MSP430_HAS_FLASH__                  /* Definition to show that Module is available */
1670
#define __MSP430_BASEADDRESS_FLASH__ 0x0140
1671
 
1672
SFR_16BIT(FCTL1);                             /* FLASH Control 1 */
1673
SFR_8BIT(FCTL1_L);                            /* FLASH Control 1 */
1674
SFR_8BIT(FCTL1_H);                            /* FLASH Control 1 */
1675
//sfrbw    FCTL2               (0x0142)  /* FLASH Control 2 */
1676
SFR_16BIT(FCTL3);                             /* FLASH Control 3 */
1677
SFR_8BIT(FCTL3_L);                            /* FLASH Control 3 */
1678
SFR_8BIT(FCTL3_H);                            /* FLASH Control 3 */
1679
SFR_16BIT(FCTL4);                             /* FLASH Control 4 */
1680
SFR_8BIT(FCTL4_L);                            /* FLASH Control 4 */
1681
SFR_8BIT(FCTL4_H);                            /* FLASH Control 4 */
1682
 
1683
#define FRPW                   (0x9600)       /* Flash password returned by read */
1684
#define FWPW                   (0xA500)       /* Flash password for write */
1685
#define FXPW                   (0x3300)       /* for use with XOR instruction */
1686
#define FRKEY                  (0x9600)       /* (legacy definition) Flash key returned by read */
1687
#define FWKEY                  (0xA500)       /* (legacy definition) Flash key for write */
1688
#define FXKEY                  (0x3300)       /* (legacy definition) for use with XOR instruction */
1689
 
1690
/* FCTL1 Control Bits */
1691
//#define RESERVED            (0x0001)  /* Reserved */
1692
#define ERASE                  (0x0002)       /* Enable bit for Flash segment erase */
1693
#define MERAS                  (0x0004)       /* Enable bit for Flash mass erase */
1694
//#define RESERVED            (0x0008)  /* Reserved */
1695
//#define RESERVED            (0x0010)  /* Reserved */
1696
#define SWRT                   (0x0020)       /* Smart Write enable */
1697
#define WRT                    (0x0040)       /* Enable bit for Flash write */
1698
#define BLKWRT                 (0x0080)       /* Enable bit for Flash segment write */
1699
 
1700
/* FCTL1 Control Bits */
1701
//#define RESERVED            (0x0001)  /* Reserved */
1702
#define ERASE_L                (0x0002)       /* Enable bit for Flash segment erase */
1703
#define MERAS_L                (0x0004)       /* Enable bit for Flash mass erase */
1704
//#define RESERVED            (0x0008)  /* Reserved */
1705
//#define RESERVED            (0x0010)  /* Reserved */
1706
#define SWRT_L                 (0x0020)       /* Smart Write enable */
1707
#define WRT_L                  (0x0040)       /* Enable bit for Flash write */
1708
#define BLKWRT_L               (0x0080)       /* Enable bit for Flash segment write */
1709
 
1710
/* FCTL1 Control Bits */
1711
//#define RESERVED            (0x0001)  /* Reserved */
1712
//#define RESERVED            (0x0008)  /* Reserved */
1713
//#define RESERVED            (0x0010)  /* Reserved */
1714
 
1715
/* FCTL3 Control Bits */
1716
#define BUSY                   (0x0001)       /* Flash busy: 1 */
1717
#define KEYV                   (0x0002)       /* Flash Key violation flag */
1718
#define ACCVIFG                (0x0004)       /* Flash Access violation flag */
1719
#define WAIT                   (0x0008)       /* Wait flag for segment write */
1720
#define LOCK                   (0x0010)       /* Lock bit: 1 - Flash is locked (read only) */
1721
#define EMEX                   (0x0020)       /* Flash Emergency Exit */
1722
#define LOCKA                  (0x0040)       /* Segment A Lock bit: read = 1 - Segment is locked (read only) */
1723
//#define RESERVED            (0x0080)  /* Reserved */
1724
 
1725
/* FCTL3 Control Bits */
1726
#define BUSY_L                 (0x0001)       /* Flash busy: 1 */
1727
#define KEYV_L                 (0x0002)       /* Flash Key violation flag */
1728
#define ACCVIFG_L              (0x0004)       /* Flash Access violation flag */
1729
#define WAIT_L                 (0x0008)       /* Wait flag for segment write */
1730
#define LOCK_L                 (0x0010)       /* Lock bit: 1 - Flash is locked (read only) */
1731
#define EMEX_L                 (0x0020)       /* Flash Emergency Exit */
1732
#define LOCKA_L                (0x0040)       /* Segment A Lock bit: read = 1 - Segment is locked (read only) */
1733
//#define RESERVED            (0x0080)  /* Reserved */
1734
 
1735
/* FCTL3 Control Bits */
1736
//#define RESERVED            (0x0080)  /* Reserved */
1737
 
1738
/* FCTL4 Control Bits */
1739
#define VPE                    (0x0001)       /* Voltage Changed during Program Error Flag */
1740
#define MGR0                   (0x0010)       /* Marginal read 0 mode. */
1741
#define MGR1                   (0x0020)       /* Marginal read 1 mode. */
1742
#define LOCKINFO               (0x0080)       /* Lock INFO Memory bit: read = 1 - Segment is locked (read only) */
1743
 
1744
/* FCTL4 Control Bits */
1745
#define VPE_L                  (0x0001)       /* Voltage Changed during Program Error Flag */
1746
#define MGR0_L                 (0x0010)       /* Marginal read 0 mode. */
1747
#define MGR1_L                 (0x0020)       /* Marginal read 1 mode. */
1748
#define LOCKINFO_L             (0x0080)       /* Lock INFO Memory bit: read = 1 - Segment is locked (read only) */
1749
 
1750
/* FCTL4 Control Bits */
1751
 
1752
/************************************************************
1753
* LCD_B
1754
************************************************************/
1755
#define __MSP430_HAS_LCD_B__                  /* Definition to show that Module is available */
1756
#define __MSP430_BASEADDRESS_LCD_B__ 0x0A00
1757
 
1758
SFR_16BIT(LCDBCTL0);                          /* LCD_B Control Register 0 */
1759
SFR_8BIT(LCDBCTL0_L);                         /* LCD_B Control Register 0 */
1760
SFR_8BIT(LCDBCTL0_H);                         /* LCD_B Control Register 0 */
1761
SFR_16BIT(LCDBCTL1);                          /* LCD_B Control Register 1 */
1762
SFR_8BIT(LCDBCTL1_L);                         /* LCD_B Control Register 1 */
1763
SFR_8BIT(LCDBCTL1_H);                         /* LCD_B Control Register 1 */
1764
SFR_16BIT(LCDBBLKCTL);                        /* LCD_B blinking control register */
1765
SFR_8BIT(LCDBBLKCTL_L);                       /* LCD_B blinking control register */
1766
SFR_8BIT(LCDBBLKCTL_H);                       /* LCD_B blinking control register */
1767
SFR_16BIT(LCDBMEMCTL);                        /* LCD_B memory control register */
1768
SFR_8BIT(LCDBMEMCTL_L);                       /* LCD_B memory control register */
1769
SFR_8BIT(LCDBMEMCTL_H);                       /* LCD_B memory control register */
1770
SFR_16BIT(LCDBVCTL);                          /* LCD_B Voltage Control Register */
1771
SFR_8BIT(LCDBVCTL_L);                         /* LCD_B Voltage Control Register */
1772
SFR_8BIT(LCDBVCTL_H);                         /* LCD_B Voltage Control Register */
1773
SFR_16BIT(LCDBPCTL0);                         /* LCD_B Port Control Register 0 */
1774
SFR_8BIT(LCDBPCTL0_L);                        /* LCD_B Port Control Register 0 */
1775
SFR_8BIT(LCDBPCTL0_H);                        /* LCD_B Port Control Register 0 */
1776
SFR_16BIT(LCDBPCTL1);                         /* LCD_B Port Control Register 1 */
1777
SFR_8BIT(LCDBPCTL1_L);                        /* LCD_B Port Control Register 1 */
1778
SFR_8BIT(LCDBPCTL1_H);                        /* LCD_B Port Control Register 1 */
1779
SFR_16BIT(LCDBPCTL2);                         /* LCD_B Port Control Register 2 */
1780
SFR_8BIT(LCDBPCTL2_L);                        /* LCD_B Port Control Register 2 */
1781
SFR_8BIT(LCDBPCTL2_H);                        /* LCD_B Port Control Register 2 */
1782
SFR_16BIT(LCDBPCTL3);                         /* LCD_B Port Control Register 3 */
1783
SFR_8BIT(LCDBPCTL3_L);                        /* LCD_B Port Control Register 3 */
1784
SFR_8BIT(LCDBPCTL3_H);                        /* LCD_B Port Control Register 3 */
1785
SFR_16BIT(LCDBCPCTL);                         /* LCD_B Charge Pump Control Register 3 */
1786
SFR_8BIT(LCDBCPCTL_L);                        /* LCD_B Charge Pump Control Register 3 */
1787
SFR_8BIT(LCDBCPCTL_H);                        /* LCD_B Charge Pump Control Register 3 */
1788
SFR_16BIT(LCDBIV);                            /* LCD_B Interrupt Vector Register */
1789
 
1790
// LCDBCTL0
1791
#define LCDON                  (0x0001)       /* LCD_B LCD On */
1792
#define LCDSON                 (0x0004)       /* LCD_B LCD Segments On */
1793
#define LCDMX0                 (0x0008)       /* LCD_B Mux Rate Bit: 0 */
1794
#define LCDMX1                 (0x0010)       /* LCD_B Mux Rate Bit: 1 */
1795
//#define RESERVED            (0x0020)  /* LCD_B RESERVED */
1796
//#define RESERVED            (0x0040)  /* LCD_B RESERVED */
1797
#define LCDSSEL                (0x0080)       /* LCD_B Clock Select */
1798
#define LCDPRE0                (0x0100)       /* LCD_B LCD frequency pre-scaler Bit: 0 */
1799
#define LCDPRE1                (0x0200)       /* LCD_B LCD frequency pre-scaler Bit: 1 */
1800
#define LCDPRE2                (0x0400)       /* LCD_B LCD frequency pre-scaler Bit: 2 */
1801
#define LCDDIV0                (0x0800)       /* LCD_B LCD frequency divider Bit: 0 */
1802
#define LCDDIV1                (0x1000)       /* LCD_B LCD frequency divider Bit: 1 */
1803
#define LCDDIV2                (0x2000)       /* LCD_B LCD frequency divider Bit: 2 */
1804
#define LCDDIV3                (0x4000)       /* LCD_B LCD frequency divider Bit: 3 */
1805
#define LCDDIV4                (0x8000)       /* LCD_B LCD frequency divider Bit: 4 */
1806
 
1807
// LCDBCTL0
1808
#define LCDON_L                (0x0001)       /* LCD_B LCD On */
1809
#define LCDSON_L               (0x0004)       /* LCD_B LCD Segments On */
1810
#define LCDMX0_L               (0x0008)       /* LCD_B Mux Rate Bit: 0 */
1811
#define LCDMX1_L               (0x0010)       /* LCD_B Mux Rate Bit: 1 */
1812
//#define RESERVED            (0x0020)  /* LCD_B RESERVED */
1813
//#define RESERVED            (0x0040)  /* LCD_B RESERVED */
1814
#define LCDSSEL_L              (0x0080)       /* LCD_B Clock Select */
1815
 
1816
// LCDBCTL0
1817
//#define RESERVED            (0x0020)  /* LCD_B RESERVED */
1818
//#define RESERVED            (0x0040)  /* LCD_B RESERVED */
1819
#define LCDPRE0_H              (0x0001)       /* LCD_B LCD frequency pre-scaler Bit: 0 */
1820
#define LCDPRE1_H              (0x0002)       /* LCD_B LCD frequency pre-scaler Bit: 1 */
1821
#define LCDPRE2_H              (0x0004)       /* LCD_B LCD frequency pre-scaler Bit: 2 */
1822
#define LCDDIV0_H              (0x0008)       /* LCD_B LCD frequency divider Bit: 0 */
1823
#define LCDDIV1_H              (0x0010)       /* LCD_B LCD frequency divider Bit: 1 */
1824
#define LCDDIV2_H              (0x0020)       /* LCD_B LCD frequency divider Bit: 2 */
1825
#define LCDDIV3_H              (0x0040)       /* LCD_B LCD frequency divider Bit: 3 */
1826
#define LCDDIV4_H              (0x0080)       /* LCD_B LCD frequency divider Bit: 4 */
1827
 
1828
#define LCDPRE_0               (0x0000)       /* LCD_B LCD frequency pre-scaler: /1 */
1829
#define LCDPRE_1               (0x0100)       /* LCD_B LCD frequency pre-scaler: /2 */
1830
#define LCDPRE_2               (0x0200)       /* LCD_B LCD frequency pre-scaler: /4 */
1831
#define LCDPRE_3               (0x0300)       /* LCD_B LCD frequency pre-scaler: /8 */
1832
#define LCDPRE_4               (0x0400)       /* LCD_B LCD frequency pre-scaler: /16 */
1833
#define LCDPRE_5               (0x0500)       /* LCD_B LCD frequency pre-scaler: /32 */
1834
#define LCDPRE__1              (0x0000)       /* LCD_B LCD frequency pre-scaler: /1 */
1835
#define LCDPRE__2              (0x0100)       /* LCD_B LCD frequency pre-scaler: /2 */
1836
#define LCDPRE__4              (0x0200)       /* LCD_B LCD frequency pre-scaler: /4 */
1837
#define LCDPRE__8              (0x0300)       /* LCD_B LCD frequency pre-scaler: /8 */
1838
#define LCDPRE__16             (0x0400)       /* LCD_B LCD frequency pre-scaler: /16 */
1839
#define LCDPRE__32             (0x0500)       /* LCD_B LCD frequency pre-scaler: /32 */
1840
 
1841
#define LCDDIV_0               (0x0000)       /* LCD_B LCD frequency divider: /1 */
1842
#define LCDDIV_1               (0x0800)       /* LCD_B LCD frequency divider: /2 */
1843
#define LCDDIV_2               (0x1000)       /* LCD_B LCD frequency divider: /3 */
1844
#define LCDDIV_3               (0x1800)       /* LCD_B LCD frequency divider: /4 */
1845
#define LCDDIV_4               (0x2000)       /* LCD_B LCD frequency divider: /5 */
1846
#define LCDDIV_5               (0x2800)       /* LCD_B LCD frequency divider: /6 */
1847
#define LCDDIV_6               (0x3000)       /* LCD_B LCD frequency divider: /7 */
1848
#define LCDDIV_7               (0x3800)       /* LCD_B LCD frequency divider: /8 */
1849
#define LCDDIV_8               (0x4000)       /* LCD_B LCD frequency divider: /9 */
1850
#define LCDDIV_9               (0x4800)       /* LCD_B LCD frequency divider: /10 */
1851
#define LCDDIV_10              (0x5000)       /* LCD_B LCD frequency divider: /11 */
1852
#define LCDDIV_11              (0x5800)       /* LCD_B LCD frequency divider: /12 */
1853
#define LCDDIV_12              (0x6000)       /* LCD_B LCD frequency divider: /13 */
1854
#define LCDDIV_13              (0x6800)       /* LCD_B LCD frequency divider: /14 */
1855
#define LCDDIV_14              (0x7000)       /* LCD_B LCD frequency divider: /15 */
1856
#define LCDDIV_15              (0x7800)       /* LCD_B LCD frequency divider: /16 */
1857
#define LCDDIV_16              (0x8000)       /* LCD_B LCD frequency divider: /17 */
1858
#define LCDDIV_17              (0x8800)       /* LCD_B LCD frequency divider: /18 */
1859
#define LCDDIV_18              (0x9000)       /* LCD_B LCD frequency divider: /19 */
1860
#define LCDDIV_19              (0x9800)       /* LCD_B LCD frequency divider: /20 */
1861
#define LCDDIV_20              (0xA000)       /* LCD_B LCD frequency divider: /21 */
1862
#define LCDDIV_21              (0xA800)       /* LCD_B LCD frequency divider: /22 */
1863
#define LCDDIV_22              (0xB000)       /* LCD_B LCD frequency divider: /23 */
1864
#define LCDDIV_23              (0xB800)       /* LCD_B LCD frequency divider: /24 */
1865
#define LCDDIV_24              (0xC000)       /* LCD_B LCD frequency divider: /25 */
1866
#define LCDDIV_25              (0xC800)       /* LCD_B LCD frequency divider: /26 */
1867
#define LCDDIV_26              (0xD000)       /* LCD_B LCD frequency divider: /27 */
1868
#define LCDDIV_27              (0xD800)       /* LCD_B LCD frequency divider: /28 */
1869
#define LCDDIV_28              (0xE000)       /* LCD_B LCD frequency divider: /29 */
1870
#define LCDDIV_29              (0xE800)       /* LCD_B LCD frequency divider: /30 */
1871
#define LCDDIV_30              (0xF000)       /* LCD_B LCD frequency divider: /31 */
1872
#define LCDDIV_31              (0xF800)       /* LCD_B LCD frequency divider: /32 */
1873
#define LCDDIV__1              (0x0000)       /* LCD_B LCD frequency divider: /1 */
1874
#define LCDDIV__2              (0x0800)       /* LCD_B LCD frequency divider: /2 */
1875
#define LCDDIV__3              (0x1000)       /* LCD_B LCD frequency divider: /3 */
1876
#define LCDDIV__4              (0x1800)       /* LCD_B LCD frequency divider: /4 */
1877
#define LCDDIV__5              (0x2000)       /* LCD_B LCD frequency divider: /5 */
1878
#define LCDDIV__6              (0x2800)       /* LCD_B LCD frequency divider: /6 */
1879
#define LCDDIV__7              (0x3000)       /* LCD_B LCD frequency divider: /7 */
1880
#define LCDDIV__8              (0x3800)       /* LCD_B LCD frequency divider: /8 */
1881
#define LCDDIV__9              (0x4000)       /* LCD_B LCD frequency divider: /9 */
1882
#define LCDDIV__10             (0x4800)       /* LCD_B LCD frequency divider: /10 */
1883
#define LCDDIV__11             (0x5000)       /* LCD_B LCD frequency divider: /11 */
1884
#define LCDDIV__12             (0x5800)       /* LCD_B LCD frequency divider: /12 */
1885
#define LCDDIV__13             (0x6000)       /* LCD_B LCD frequency divider: /13 */
1886
#define LCDDIV__14             (0x6800)       /* LCD_B LCD frequency divider: /14 */
1887
#define LCDDIV__15             (0x7000)       /* LCD_B LCD frequency divider: /15 */
1888
#define LCDDIV__16             (0x7800)       /* LCD_B LCD frequency divider: /16 */
1889
#define LCDDIV__17             (0x8000)       /* LCD_B LCD frequency divider: /17 */
1890
#define LCDDIV__18             (0x8800)       /* LCD_B LCD frequency divider: /18 */
1891
#define LCDDIV__19             (0x9000)       /* LCD_B LCD frequency divider: /19 */
1892
#define LCDDIV__20             (0x9800)       /* LCD_B LCD frequency divider: /20 */
1893
#define LCDDIV__21             (0xA000)       /* LCD_B LCD frequency divider: /21 */
1894
#define LCDDIV__22             (0xA800)       /* LCD_B LCD frequency divider: /22 */
1895
#define LCDDIV__23             (0xB000)       /* LCD_B LCD frequency divider: /23 */
1896
#define LCDDIV__24             (0xB800)       /* LCD_B LCD frequency divider: /24 */
1897
#define LCDDIV__25             (0xC000)       /* LCD_B LCD frequency divider: /25 */
1898
#define LCDDIV__26             (0xC800)       /* LCD_B LCD frequency divider: /26 */
1899
#define LCDDIV__27             (0xD000)       /* LCD_B LCD frequency divider: /27 */
1900
#define LCDDIV__28             (0xD800)       /* LCD_B LCD frequency divider: /28 */
1901
#define LCDDIV__29             (0xE000)       /* LCD_B LCD frequency divider: /29 */
1902
#define LCDDIV__30             (0xE800)       /* LCD_B LCD frequency divider: /30 */
1903
#define LCDDIV__31             (0xF000)       /* LCD_B LCD frequency divider: /31 */
1904
#define LCDDIV__32             (0xF800)       /* LCD_B LCD frequency divider: /32 */
1905
 
1906
/* Display modes coded with Bits 2-4 */
1907
#define LCDSTATIC              (LCDSON)
1908
#define LCD2MUX                (LCDMX0+LCDSON)
1909
#define LCD3MUX                (LCDMX1+LCDSON)
1910
#define LCD4MUX                (LCDMX1+LCDMX0+LCDSON)
1911
 
1912
// LCDBCTL1
1913
#define LCDFRMIFG              (0x0001)       /* LCD_B LCD frame interrupt flag */
1914
#define LCDBLKOFFIFG           (0x0002)       /* LCD_B LCD blinking off interrupt flag, */
1915
#define LCDBLKONIFG            (0x0004)       /* LCD_B LCD blinking on interrupt flag, */
1916
#define LCDNOCAPIFG            (0x0008)       /* LCD_B No cpacitance connected interrupt flag */
1917
#define LCDFRMIE               (0x0100)       /* LCD_B LCD frame interrupt enable */
1918
#define LCDBLKOFFIE            (0x0200)       /* LCD_B LCD blinking off interrupt flag, */
1919
#define LCDBLKONIE             (0x0400)       /* LCD_B LCD blinking on interrupt flag, */
1920
#define LCDNOCAPIE             (0x0800)       /* LCD_B No cpacitance connected interrupt enable */
1921
 
1922
// LCDBCTL1
1923
#define LCDFRMIFG_L            (0x0001)       /* LCD_B LCD frame interrupt flag */
1924
#define LCDBLKOFFIFG_L         (0x0002)       /* LCD_B LCD blinking off interrupt flag, */
1925
#define LCDBLKONIFG_L          (0x0004)       /* LCD_B LCD blinking on interrupt flag, */
1926
#define LCDNOCAPIFG_L          (0x0008)       /* LCD_B No cpacitance connected interrupt flag */
1927
 
1928
// LCDBCTL1
1929
#define LCDFRMIE_H             (0x0001)       /* LCD_B LCD frame interrupt enable */
1930
#define LCDBLKOFFIE_H          (0x0002)       /* LCD_B LCD blinking off interrupt flag, */
1931
#define LCDBLKONIE_H           (0x0004)       /* LCD_B LCD blinking on interrupt flag, */
1932
#define LCDNOCAPIE_H           (0x0008)       /* LCD_B No cpacitance connected interrupt enable */
1933
 
1934
// LCDBBLKCTL
1935
#define LCDBLKMOD0             (0x0001)       /* LCD_B Blinking mode Bit: 0 */
1936
#define LCDBLKMOD1             (0x0002)       /* LCD_B Blinking mode Bit: 1 */
1937
#define LCDBLKPRE0             (0x0004)       /* LCD_B Clock pre-scaler for blinking frequency Bit: 0 */
1938
#define LCDBLKPRE1             (0x0008)       /* LCD_B Clock pre-scaler for blinking frequency Bit: 1 */
1939
#define LCDBLKPRE2             (0x0010)       /* LCD_B Clock pre-scaler for blinking frequency Bit: 2 */
1940
#define LCDBLKDIV0             (0x0020)       /* LCD_B Clock divider for blinking frequency Bit: 0 */
1941
#define LCDBLKDIV1             (0x0040)       /* LCD_B Clock divider for blinking frequency Bit: 1 */
1942
#define LCDBLKDIV2             (0x0080)       /* LCD_B Clock divider for blinking frequency Bit: 2 */
1943
 
1944
// LCDBBLKCTL
1945
#define LCDBLKMOD0_L           (0x0001)       /* LCD_B Blinking mode Bit: 0 */
1946
#define LCDBLKMOD1_L           (0x0002)       /* LCD_B Blinking mode Bit: 1 */
1947
#define LCDBLKPRE0_L           (0x0004)       /* LCD_B Clock pre-scaler for blinking frequency Bit: 0 */
1948
#define LCDBLKPRE1_L           (0x0008)       /* LCD_B Clock pre-scaler for blinking frequency Bit: 1 */
1949
#define LCDBLKPRE2_L           (0x0010)       /* LCD_B Clock pre-scaler for blinking frequency Bit: 2 */
1950
#define LCDBLKDIV0_L           (0x0020)       /* LCD_B Clock divider for blinking frequency Bit: 0 */
1951
#define LCDBLKDIV1_L           (0x0040)       /* LCD_B Clock divider for blinking frequency Bit: 1 */
1952
#define LCDBLKDIV2_L           (0x0080)       /* LCD_B Clock divider for blinking frequency Bit: 2 */
1953
 
1954
// LCDBBLKCTL
1955
 
1956
#define LCDBLKMOD_0            (0x0000)       /* LCD_B Blinking mode: Off */
1957
#define LCDBLKMOD_1            (0x0001)       /* LCD_B Blinking mode: Individual */
1958
#define LCDBLKMOD_2            (0x0002)       /* LCD_B Blinking mode: All */
1959
#define LCDBLKMOD_3            (0x0003)       /* LCD_B Blinking mode: Switching */
1960
 
1961
// LCDBMEMCTL
1962
#define LCDDISP                (0x0001)       /* LCD_B LCD memory registers for display */
1963
#define LCDCLRM                (0x0002)       /* LCD_B Clear LCD memory */
1964
#define LCDCLRBM               (0x0004)       /* LCD_B Clear LCD blinking memory */
1965
 
1966
// LCDBMEMCTL
1967
#define LCDDISP_L              (0x0001)       /* LCD_B LCD memory registers for display */
1968
#define LCDCLRM_L              (0x0002)       /* LCD_B Clear LCD memory */
1969
#define LCDCLRBM_L             (0x0004)       /* LCD_B Clear LCD blinking memory */
1970
 
1971
// LCDBMEMCTL
1972
 
1973
// LCDBVCTL
1974
#define LCD2B                  (0x0001)       /* Selects 1/2 bias. */
1975
#define VLCDREF0               (0x0002)       /* Selects reference voltage for regulated charge pump: 0 */
1976
#define VLCDREF1               (0x0004)       /* Selects reference voltage for regulated charge pump: 1 */
1977
#define LCDCPEN                (0x0008)       /* LCD Voltage Charge Pump Enable. */
1978
#define VLCDEXT                (0x0010)       /* Select external source for VLCD. */
1979
#define LCDEXTBIAS             (0x0020)       /* V2 - V4 voltage select. */
1980
#define R03EXT                 (0x0040)       /* Selects external connections for LCD mid voltages. */
1981
#define LCDREXT                (0x0080)       /* Selects external connection for lowest LCD voltage. */
1982
#define VLCD0                  (0x0200)       /* VLCD select: 0 */
1983
#define VLCD1                  (0x0400)       /* VLCD select: 1 */
1984
#define VLCD2                  (0x0800)       /* VLCD select: 2 */
1985
#define VLCD3                  (0x1000)       /* VLCD select: 3 */
1986
 
1987
// LCDBVCTL
1988
#define LCD2B_L                (0x0001)       /* Selects 1/2 bias. */
1989
#define VLCDREF0_L             (0x0002)       /* Selects reference voltage for regulated charge pump: 0 */
1990
#define VLCDREF1_L             (0x0004)       /* Selects reference voltage for regulated charge pump: 1 */
1991
#define LCDCPEN_L              (0x0008)       /* LCD Voltage Charge Pump Enable. */
1992
#define VLCDEXT_L              (0x0010)       /* Select external source for VLCD. */
1993
#define LCDEXTBIAS_L           (0x0020)       /* V2 - V4 voltage select. */
1994
#define R03EXT_L               (0x0040)       /* Selects external connections for LCD mid voltages. */
1995
#define LCDREXT_L              (0x0080)       /* Selects external connection for lowest LCD voltage. */
1996
 
1997
// LCDBVCTL
1998
#define VLCD0_H                (0x0002)       /* VLCD select: 0 */
1999
#define VLCD1_H                (0x0004)       /* VLCD select: 1 */
2000
#define VLCD2_H                (0x0008)       /* VLCD select: 2 */
2001
#define VLCD3_H                (0x0010)       /* VLCD select: 3 */
2002
 
2003
/* Reference voltage source select for the regulated charge pump */
2004
#define VLCDREF_0              (0<<1)         /* Internal */
2005
#define VLCDREF_1              (1<<1)         /* External */
2006
#define VLCDREF_2              (2<<1)         /* Reserved */
2007
#define VLCDREF_3              (3<<1)         /* Reserved */
2008
 
2009
/* Charge pump voltage selections */
2010
#define VLCD_0                 (0<<9)         /* Charge pump disabled */
2011
#define VLCD_1                 (1<<9)         /* VLCD = 2.60V */
2012
#define VLCD_2                 (2<<9)         /* VLCD = 2.66V */
2013
#define VLCD_3                 (3<<9)         /* VLCD = 2.72V */
2014
#define VLCD_4                 (4<<9)         /* VLCD = 2.78V */
2015
#define VLCD_5                 (5<<9)         /* VLCD = 2.84V */
2016
#define VLCD_6                 (6<<9)         /* VLCD = 2.90V */
2017
#define VLCD_7                 (7<<9)         /* VLCD = 2.96V */
2018
#define VLCD_8                 (8<<9)         /* VLCD = 3.02V */
2019
#define VLCD_9                 (9<<9)         /* VLCD = 3.08V */
2020
#define VLCD_10                (10<<9)        /* VLCD = 3.14V */
2021
#define VLCD_11                (11<<9)        /* VLCD = 3.20V */
2022
#define VLCD_12                (12<<9)        /* VLCD = 3.26V */
2023
#define VLCD_13                (12<<9)        /* VLCD = 3.32V */
2024
#define VLCD_14                (13<<9)        /* VLCD = 3.38V */
2025
#define VLCD_15                (15<<9)        /* VLCD = 3.44V */
2026
 
2027
#define VLCD_DISABLED          (0<<9)         /* Charge pump disabled */
2028
#define VLCD_2_60              (1<<9)         /* VLCD = 2.60V */
2029
#define VLCD_2_66              (2<<9)         /* VLCD = 2.66V */
2030
#define VLCD_2_72              (3<<9)         /* VLCD = 2.72V */
2031
#define VLCD_2_78              (4<<9)         /* VLCD = 2.78V */
2032
#define VLCD_2_84              (5<<9)         /* VLCD = 2.84V */
2033
#define VLCD_2_90              (6<<9)         /* VLCD = 2.90V */
2034
#define VLCD_2_96              (7<<9)         /* VLCD = 2.96V */
2035
#define VLCD_3_02              (8<<9)         /* VLCD = 3.02V */
2036
#define VLCD_3_08              (9<<9)         /* VLCD = 3.08V */
2037
#define VLCD_3_14              (10<<9)        /* VLCD = 3.14V */
2038
#define VLCD_3_20              (11<<9)        /* VLCD = 3.20V */
2039
#define VLCD_3_26              (12<<9)        /* VLCD = 3.26V */
2040
#define VLCD_3_32              (12<<9)        /* VLCD = 3.32V */
2041
#define VLCD_3_38              (13<<9)        /* VLCD = 3.38V */
2042
#define VLCD_3_44              (15<<9)        /* VLCD = 3.44V */
2043
 
2044
// LCDBPCTL0
2045
#define LCDS0                  (0x0001)       /* LCD Segment  0 enable. */
2046
#define LCDS1                  (0x0002)       /* LCD Segment  1 enable. */
2047
#define LCDS2                  (0x0004)       /* LCD Segment  2 enable. */
2048
#define LCDS3                  (0x0008)       /* LCD Segment  3 enable. */
2049
#define LCDS4                  (0x0010)       /* LCD Segment  4 enable. */
2050
#define LCDS5                  (0x0020)       /* LCD Segment  5 enable. */
2051
#define LCDS6                  (0x0040)       /* LCD Segment  6 enable. */
2052
#define LCDS7                  (0x0080)       /* LCD Segment  7 enable. */
2053
#define LCDS8                  (0x0100)       /* LCD Segment  8 enable. */
2054
#define LCDS9                  (0x0200)       /* LCD Segment  9 enable. */
2055
#define LCDS10                 (0x0400)       /* LCD Segment 10 enable. */
2056
#define LCDS11                 (0x0800)       /* LCD Segment 11 enable. */
2057
#define LCDS12                 (0x1000)       /* LCD Segment 12 enable. */
2058
#define LCDS13                 (0x2000)       /* LCD Segment 13 enable. */
2059
#define LCDS14                 (0x4000)       /* LCD Segment 14 enable. */
2060
#define LCDS15                 (0x8000)       /* LCD Segment 15 enable. */
2061
 
2062
// LCDBPCTL0
2063
#define LCDS0_L                (0x0001)       /* LCD Segment  0 enable. */
2064
#define LCDS1_L                (0x0002)       /* LCD Segment  1 enable. */
2065
#define LCDS2_L                (0x0004)       /* LCD Segment  2 enable. */
2066
#define LCDS3_L                (0x0008)       /* LCD Segment  3 enable. */
2067
#define LCDS4_L                (0x0010)       /* LCD Segment  4 enable. */
2068
#define LCDS5_L                (0x0020)       /* LCD Segment  5 enable. */
2069
#define LCDS6_L                (0x0040)       /* LCD Segment  6 enable. */
2070
#define LCDS7_L                (0x0080)       /* LCD Segment  7 enable. */
2071
 
2072
// LCDBPCTL0
2073
#define LCDS8_H                (0x0001)       /* LCD Segment  8 enable. */
2074
#define LCDS9_H                (0x0002)       /* LCD Segment  9 enable. */
2075
#define LCDS10_H               (0x0004)       /* LCD Segment 10 enable. */
2076
#define LCDS11_H               (0x0008)       /* LCD Segment 11 enable. */
2077
#define LCDS12_H               (0x0010)       /* LCD Segment 12 enable. */
2078
#define LCDS13_H               (0x0020)       /* LCD Segment 13 enable. */
2079
#define LCDS14_H               (0x0040)       /* LCD Segment 14 enable. */
2080
#define LCDS15_H               (0x0080)       /* LCD Segment 15 enable. */
2081
 
2082
// LCDBPCTL1
2083
#define LCDS16                 (0x0001)       /* LCD Segment 16 enable. */
2084
#define LCDS17                 (0x0002)       /* LCD Segment 17 enable. */
2085
#define LCDS18                 (0x0004)       /* LCD Segment 18 enable. */
2086
#define LCDS19                 (0x0008)       /* LCD Segment 19 enable. */
2087
#define LCDS20                 (0x0010)       /* LCD Segment 20 enable. */
2088
#define LCDS21                 (0x0020)       /* LCD Segment 21 enable. */
2089
#define LCDS22                 (0x0040)       /* LCD Segment 22 enable. */
2090
#define LCDS23                 (0x0080)       /* LCD Segment 23 enable. */
2091
#define LCDS24                 (0x0100)       /* LCD Segment 24 enable. */
2092
#define LCDS25                 (0x0200)       /* LCD Segment 25 enable. */
2093
#define LCDS26                 (0x0400)       /* LCD Segment 26 enable. */
2094
#define LCDS27                 (0x0800)       /* LCD Segment 27 enable. */
2095
#define LCDS28                 (0x1000)       /* LCD Segment 28 enable. */
2096
#define LCDS29                 (0x2000)       /* LCD Segment 29 enable. */
2097
#define LCDS30                 (0x4000)       /* LCD Segment 30 enable. */
2098
#define LCDS31                 (0x8000)       /* LCD Segment 31 enable. */
2099
 
2100
// LCDBPCTL1
2101
#define LCDS16_L               (0x0001)       /* LCD Segment 16 enable. */
2102
#define LCDS17_L               (0x0002)       /* LCD Segment 17 enable. */
2103
#define LCDS18_L               (0x0004)       /* LCD Segment 18 enable. */
2104
#define LCDS19_L               (0x0008)       /* LCD Segment 19 enable. */
2105
#define LCDS20_L               (0x0010)       /* LCD Segment 20 enable. */
2106
#define LCDS21_L               (0x0020)       /* LCD Segment 21 enable. */
2107
#define LCDS22_L               (0x0040)       /* LCD Segment 22 enable. */
2108
#define LCDS23_L               (0x0080)       /* LCD Segment 23 enable. */
2109
 
2110
// LCDBPCTL1
2111
#define LCDS24_H               (0x0001)       /* LCD Segment 24 enable. */
2112
#define LCDS25_H               (0x0002)       /* LCD Segment 25 enable. */
2113
#define LCDS26_H               (0x0004)       /* LCD Segment 26 enable. */
2114
#define LCDS27_H               (0x0008)       /* LCD Segment 27 enable. */
2115
#define LCDS28_H               (0x0010)       /* LCD Segment 28 enable. */
2116
#define LCDS29_H               (0x0020)       /* LCD Segment 29 enable. */
2117
#define LCDS30_H               (0x0040)       /* LCD Segment 30 enable. */
2118
#define LCDS31_H               (0x0080)       /* LCD Segment 31 enable. */
2119
 
2120
// LCDBPCTL2
2121
#define LCDS32                 (0x0001)       /* LCD Segment 32 enable. */
2122
#define LCDS33                 (0x0002)       /* LCD Segment 33 enable. */
2123
#define LCDS34                 (0x0004)       /* LCD Segment 34 enable. */
2124
#define LCDS35                 (0x0008)       /* LCD Segment 35 enable. */
2125
#define LCDS36                 (0x0010)       /* LCD Segment 36 enable. */
2126
#define LCDS37                 (0x0020)       /* LCD Segment 37 enable. */
2127
#define LCDS38                 (0x0040)       /* LCD Segment 38 enable. */
2128
#define LCDS39                 (0x0080)       /* LCD Segment 39 enable. */
2129
#define LCDS40                 (0x0100)       /* LCD Segment 40 enable. */
2130
#define LCDS41                 (0x0200)       /* LCD Segment 41 enable. */
2131
#define LCDS42                 (0x0400)       /* LCD Segment 42 enable. */
2132
#define LCDS43                 (0x0800)       /* LCD Segment 43 enable. */
2133
#define LCDS44                 (0x1000)       /* LCD Segment 44 enable. */
2134
#define LCDS45                 (0x2000)       /* LCD Segment 45 enable. */
2135
#define LCDS46                 (0x4000)       /* LCD Segment 46 enable. */
2136
#define LCDS47                 (0x8000)       /* LCD Segment 47 enable. */
2137
 
2138
// LCDBPCTL2
2139
#define LCDS32_L               (0x0001)       /* LCD Segment 32 enable. */
2140
#define LCDS33_L               (0x0002)       /* LCD Segment 33 enable. */
2141
#define LCDS34_L               (0x0004)       /* LCD Segment 34 enable. */
2142
#define LCDS35_L               (0x0008)       /* LCD Segment 35 enable. */
2143
#define LCDS36_L               (0x0010)       /* LCD Segment 36 enable. */
2144
#define LCDS37_L               (0x0020)       /* LCD Segment 37 enable. */
2145
#define LCDS38_L               (0x0040)       /* LCD Segment 38 enable. */
2146
#define LCDS39_L               (0x0080)       /* LCD Segment 39 enable. */
2147
 
2148
// LCDBPCTL2
2149
#define LCDS40_H               (0x0001)       /* LCD Segment 40 enable. */
2150
#define LCDS41_H               (0x0002)       /* LCD Segment 41 enable. */
2151
#define LCDS42_H               (0x0004)       /* LCD Segment 42 enable. */
2152
#define LCDS43_H               (0x0008)       /* LCD Segment 43 enable. */
2153
#define LCDS44_H               (0x0010)       /* LCD Segment 44 enable. */
2154
#define LCDS45_H               (0x0020)       /* LCD Segment 45 enable. */
2155
#define LCDS46_H               (0x0040)       /* LCD Segment 46 enable. */
2156
#define LCDS47_H               (0x0080)       /* LCD Segment 47 enable. */
2157
 
2158
// LCDBPCTL3
2159
#define LCDS48                 (0x0001)       /* LCD Segment 48 enable. */
2160
#define LCDS49                 (0x0002)       /* LCD Segment 49 enable. */
2161
#define LCDS50                 (0x0004)       /* LCD Segment 50 enable. */
2162
 
2163
// LCDBPCTL3
2164
#define LCDS48_L               (0x0001)       /* LCD Segment 48 enable. */
2165
#define LCDS49_L               (0x0002)       /* LCD Segment 49 enable. */
2166
#define LCDS50_L               (0x0004)       /* LCD Segment 50 enable. */
2167
 
2168
// LCDBPCTL3
2169
 
2170
// LCDBCPCTL
2171
#define LCDCPDIS0              (0x0001)       /* LCD charge pump disable */
2172
#define LCDCPDIS1              (0x0002)       /* LCD charge pump disable */
2173
#define LCDCPDIS2              (0x0004)       /* LCD charge pump disable */
2174
#define LCDCPDIS3              (0x0008)       /* LCD charge pump disable */
2175
#define LCDCPDIS4              (0x0010)       /* LCD charge pump disable */
2176
#define LCDCPDIS5              (0x0020)       /* LCD charge pump disable */
2177
#define LCDCPDIS6              (0x0040)       /* LCD charge pump disable */
2178
#define LCDCPDIS7              (0x0080)       /* LCD charge pump disable */
2179
#define LCDCPCLKSYNC           (0x8000)       /* LCD charge pump clock synchronization */
2180
 
2181
// LCDBCPCTL
2182
#define LCDCPDIS0_L            (0x0001)       /* LCD charge pump disable */
2183
#define LCDCPDIS1_L            (0x0002)       /* LCD charge pump disable */
2184
#define LCDCPDIS2_L            (0x0004)       /* LCD charge pump disable */
2185
#define LCDCPDIS3_L            (0x0008)       /* LCD charge pump disable */
2186
#define LCDCPDIS4_L            (0x0010)       /* LCD charge pump disable */
2187
#define LCDCPDIS5_L            (0x0020)       /* LCD charge pump disable */
2188
#define LCDCPDIS6_L            (0x0040)       /* LCD charge pump disable */
2189
#define LCDCPDIS7_L            (0x0080)       /* LCD charge pump disable */
2190
 
2191
// LCDBCPCTL
2192
#define LCDCPCLKSYNC_H         (0x0080)       /* LCD charge pump clock synchronization */
2193
 
2194
SFR_8BIT(LCDM1);                              /* LCD Memory 1 */
2195
#define LCDMEM_                LCDM1          /* LCD Memory */
2196
#ifdef __ASM_HEADER__
2197
#define LCDMEM                 LCDM1          /* LCD Memory (for assembler) */
2198
#else
2199
#define LCDMEM                 ((char*)       &LCDM1) /* LCD Memory (for C) */
2200
#endif
2201
SFR_8BIT(LCDM2);                              /* LCD Memory 2 */
2202
SFR_8BIT(LCDM3);                              /* LCD Memory 3 */
2203
SFR_8BIT(LCDM4);                              /* LCD Memory 4 */
2204
SFR_8BIT(LCDM5);                              /* LCD Memory 5 */
2205
SFR_8BIT(LCDM6);                              /* LCD Memory 6 */
2206
SFR_8BIT(LCDM7);                              /* LCD Memory 7 */
2207
SFR_8BIT(LCDM8);                              /* LCD Memory 8 */
2208
SFR_8BIT(LCDM9);                              /* LCD Memory 9 */
2209
SFR_8BIT(LCDM10);                             /* LCD Memory 10 */
2210
SFR_8BIT(LCDM11);                             /* LCD Memory 11 */
2211
SFR_8BIT(LCDM12);                             /* LCD Memory 12 */
2212
SFR_8BIT(LCDM13);                             /* LCD Memory 13 */
2213
SFR_8BIT(LCDM14);                             /* LCD Memory 14 */
2214
SFR_8BIT(LCDM15);                             /* LCD Memory 15 */
2215
SFR_8BIT(LCDM16);                             /* LCD Memory 16 */
2216
SFR_8BIT(LCDM17);                             /* LCD Memory 17 */
2217
SFR_8BIT(LCDM18);                             /* LCD Memory 18 */
2218
SFR_8BIT(LCDM19);                             /* LCD Memory 19 */
2219
SFR_8BIT(LCDM20);                             /* LCD Memory 20 */
2220
SFR_8BIT(LCDM21);                             /* LCD Memory 21 */
2221
SFR_8BIT(LCDM22);                             /* LCD Memory 22 */
2222
SFR_8BIT(LCDM23);                             /* LCD Memory 23 */
2223
SFR_8BIT(LCDM24);                             /* LCD Memory 24 */
2224
 
2225
SFR_8BIT(LCDBM1);                             /* LCD Blinking Memory 1 */
2226
#define LCDBMEM_               LCDBM1         /* LCD Blinking Memory */
2227
#ifdef __ASM_HEADER__
2228
#define LCDBMEM                (LCDBM1)       /* LCD Blinking Memory (for assembler) */
2229
#else
2230
#define LCDBMEM                ((char*)       &LCDBM1) /* LCD Blinking Memory (for C) */
2231
#endif
2232
SFR_8BIT(LCDBM2);                             /* LCD Blinking Memory 2 */
2233
SFR_8BIT(LCDBM3);                             /* LCD Blinking Memory 3 */
2234
SFR_8BIT(LCDBM4);                             /* LCD Blinking Memory 4 */
2235
SFR_8BIT(LCDBM5);                             /* LCD Blinking Memory 5 */
2236
SFR_8BIT(LCDBM6);                             /* LCD Blinking Memory 6 */
2237
SFR_8BIT(LCDBM7);                             /* LCD Blinking Memory 7 */
2238
SFR_8BIT(LCDBM8);                             /* LCD Blinking Memory 8 */
2239
SFR_8BIT(LCDBM9);                             /* LCD Blinking Memory 9 */
2240
SFR_8BIT(LCDBM10);                            /* LCD Blinking Memory 10 */
2241
SFR_8BIT(LCDBM11);                            /* LCD Blinking Memory 11 */
2242
SFR_8BIT(LCDBM12);                            /* LCD Blinking Memory 12 */
2243
SFR_8BIT(LCDBM13);                            /* LCD Blinking Memory 13 */
2244
SFR_8BIT(LCDBM14);                            /* LCD Blinking Memory 14 */
2245
SFR_8BIT(LCDBM15);                            /* LCD Blinking Memory 15 */
2246
SFR_8BIT(LCDBM16);                            /* LCD Blinking Memory 16 */
2247
SFR_8BIT(LCDBM17);                            /* LCD Blinking Memory 17 */
2248
SFR_8BIT(LCDBM18);                            /* LCD Blinking Memory 18 */
2249
SFR_8BIT(LCDBM19);                            /* LCD Blinking Memory 19 */
2250
SFR_8BIT(LCDBM20);                            /* LCD Blinking Memory 20 */
2251
SFR_8BIT(LCDBM21);                            /* LCD Blinking Memory 21 */
2252
SFR_8BIT(LCDBM22);                            /* LCD Blinking Memory 22 */
2253
SFR_8BIT(LCDBM23);                            /* LCD Blinking Memory 23 */
2254
SFR_8BIT(LCDBM24);                            /* LCD Blinking Memory 24 */
2255
 
2256
/* LCDBIV Definitions */
2257
#define LCDBIV_NONE            (0x0000)       /* No Interrupt pending */
2258
#define LCDBIV_LCDNOCAPIFG     (0x0002)       /* No capacitor connected */
2259
#define LCDBIV_LCDBLKOFFIFG    (0x0004)       /* Blink, segments off */
2260
#define LCDBIV_LCDBLKONIFG     (0x0006)       /* Blink, segments on */
2261
#define LCDBIV_LCDFRMIFG       (0x0008)       /* Frame interrupt */
2262
 
2263
/************************************************************
2264
* HARDWARE MULTIPLIER 32Bit
2265
************************************************************/
2266
#define __MSP430_HAS_MPY32__                  /* Definition to show that Module is available */
2267
#define __MSP430_BASEADDRESS_MPY32__ 0x04C0
2268
 
2269
SFR_16BIT(MPY);                               /* Multiply Unsigned/Operand 1 */
2270
SFR_8BIT(MPY_L);                              /* Multiply Unsigned/Operand 1 */
2271
SFR_8BIT(MPY_H);                              /* Multiply Unsigned/Operand 1 */
2272
SFR_16BIT(MPYS);                              /* Multiply Signed/Operand 1 */
2273
SFR_8BIT(MPYS_L);                             /* Multiply Signed/Operand 1 */
2274
SFR_8BIT(MPYS_H);                             /* Multiply Signed/Operand 1 */
2275
SFR_16BIT(MAC);                               /* Multiply Unsigned and Accumulate/Operand 1 */
2276
SFR_8BIT(MAC_L);                              /* Multiply Unsigned and Accumulate/Operand 1 */
2277
SFR_8BIT(MAC_H);                              /* Multiply Unsigned and Accumulate/Operand 1 */
2278
SFR_16BIT(MACS);                              /* Multiply Signed and Accumulate/Operand 1 */
2279
SFR_8BIT(MACS_L);                             /* Multiply Signed and Accumulate/Operand 1 */
2280
SFR_8BIT(MACS_H);                             /* Multiply Signed and Accumulate/Operand 1 */
2281
SFR_16BIT(OP2);                               /* Operand 2 */
2282
SFR_8BIT(OP2_L);                              /* Operand 2 */
2283
SFR_8BIT(OP2_H);                              /* Operand 2 */
2284
SFR_16BIT(RESLO);                             /* Result Low Word */
2285
SFR_8BIT(RESLO_L);                            /* Result Low Word */
2286
SFR_8BIT(RESLO_H);                            /* Result Low Word */
2287
SFR_16BIT(RESHI);                             /* Result High Word */
2288
SFR_8BIT(RESHI_L);                            /* Result High Word */
2289
SFR_8BIT(RESHI_H);                            /* Result High Word */
2290
SFR_16BIT(SUMEXT);                            /* Sum Extend */
2291
SFR_8BIT(SUMEXT_L);                           /* Sum Extend */
2292
SFR_8BIT(SUMEXT_H);                           /* Sum Extend */
2293
 
2294
SFR_16BIT(MPY32L);                            /* 32-bit operand 1 - multiply - low word */
2295
SFR_8BIT(MPY32L_L);                           /* 32-bit operand 1 - multiply - low word */
2296
SFR_8BIT(MPY32L_H);                           /* 32-bit operand 1 - multiply - low word */
2297
SFR_16BIT(MPY32H);                            /* 32-bit operand 1 - multiply - high word */
2298
SFR_8BIT(MPY32H_L);                           /* 32-bit operand 1 - multiply - high word */
2299
SFR_8BIT(MPY32H_H);                           /* 32-bit operand 1 - multiply - high word */
2300
SFR_16BIT(MPYS32L);                           /* 32-bit operand 1 - signed multiply - low word */
2301
SFR_8BIT(MPYS32L_L);                          /* 32-bit operand 1 - signed multiply - low word */
2302
SFR_8BIT(MPYS32L_H);                          /* 32-bit operand 1 - signed multiply - low word */
2303
SFR_16BIT(MPYS32H);                           /* 32-bit operand 1 - signed multiply - high word */
2304
SFR_8BIT(MPYS32H_L);                          /* 32-bit operand 1 - signed multiply - high word */
2305
SFR_8BIT(MPYS32H_H);                          /* 32-bit operand 1 - signed multiply - high word */
2306
SFR_16BIT(MAC32L);                            /* 32-bit operand 1 - multiply accumulate - low word */
2307
SFR_8BIT(MAC32L_L);                           /* 32-bit operand 1 - multiply accumulate - low word */
2308
SFR_8BIT(MAC32L_H);                           /* 32-bit operand 1 - multiply accumulate - low word */
2309
SFR_16BIT(MAC32H);                            /* 32-bit operand 1 - multiply accumulate - high word */
2310
SFR_8BIT(MAC32H_L);                           /* 32-bit operand 1 - multiply accumulate - high word */
2311
SFR_8BIT(MAC32H_H);                           /* 32-bit operand 1 - multiply accumulate - high word */
2312
SFR_16BIT(MACS32L);                           /* 32-bit operand 1 - signed multiply accumulate - low word */
2313
SFR_8BIT(MACS32L_L);                          /* 32-bit operand 1 - signed multiply accumulate - low word */
2314
SFR_8BIT(MACS32L_H);                          /* 32-bit operand 1 - signed multiply accumulate - low word */
2315
SFR_16BIT(MACS32H);                           /* 32-bit operand 1 - signed multiply accumulate - high word */
2316
SFR_8BIT(MACS32H_L);                          /* 32-bit operand 1 - signed multiply accumulate - high word */
2317
SFR_8BIT(MACS32H_H);                          /* 32-bit operand 1 - signed multiply accumulate - high word */
2318
SFR_16BIT(OP2L);                              /* 32-bit operand 2 - low word */
2319
SFR_8BIT(OP2L_L);                             /* 32-bit operand 2 - low word */
2320
SFR_8BIT(OP2L_H);                             /* 32-bit operand 2 - low word */
2321
SFR_16BIT(OP2H);                              /* 32-bit operand 2 - high word */
2322
SFR_8BIT(OP2H_L);                             /* 32-bit operand 2 - high word */
2323
SFR_8BIT(OP2H_H);                             /* 32-bit operand 2 - high word */
2324
SFR_16BIT(RES0);                              /* 32x32-bit result 0 - least significant word */
2325
SFR_8BIT(RES0_L);                             /* 32x32-bit result 0 - least significant word */
2326
SFR_8BIT(RES0_H);                             /* 32x32-bit result 0 - least significant word */
2327
SFR_16BIT(RES1);                              /* 32x32-bit result 1 */
2328
SFR_8BIT(RES1_L);                             /* 32x32-bit result 1 */
2329
SFR_8BIT(RES1_H);                             /* 32x32-bit result 1 */
2330
SFR_16BIT(RES2);                              /* 32x32-bit result 2 */
2331
SFR_8BIT(RES2_L);                             /* 32x32-bit result 2 */
2332
SFR_8BIT(RES2_H);                             /* 32x32-bit result 2 */
2333
SFR_16BIT(RES3);                              /* 32x32-bit result 3 - most significant word */
2334
SFR_8BIT(RES3_L);                             /* 32x32-bit result 3 - most significant word */
2335
SFR_8BIT(RES3_H);                             /* 32x32-bit result 3 - most significant word */
2336
SFR_16BIT(MPY32CTL0);                         /* MPY32 Control Register 0 */
2337
SFR_8BIT(MPY32CTL0_L);                        /* MPY32 Control Register 0 */
2338
SFR_8BIT(MPY32CTL0_H);                        /* MPY32 Control Register 0 */
2339
 
2340
#define MPY_B                  MPY_L          /* Multiply Unsigned/Operand 1 (Byte Access) */
2341
#define MPYS_B                 MPYS_L         /* Multiply Signed/Operand 1 (Byte Access) */
2342
#define MAC_B                  MAC_L          /* Multiply Unsigned and Accumulate/Operand 1 (Byte Access) */
2343
#define MACS_B                 MACS_L         /* Multiply Signed and Accumulate/Operand 1 (Byte Access) */
2344
#define OP2_B                  OP2_L          /* Operand 2 (Byte Access) */
2345
#define MPY32L_B               MPY32L_L       /* 32-bit operand 1 - multiply - low word (Byte Access) */
2346
#define MPY32H_B               MPY32H_L       /* 32-bit operand 1 - multiply - high word (Byte Access) */
2347
#define MPYS32L_B              MPYS32L_L      /* 32-bit operand 1 - signed multiply - low word (Byte Access) */
2348
#define MPYS32H_B              MPYS32H_L      /* 32-bit operand 1 - signed multiply - high word (Byte Access) */
2349
#define MAC32L_B               MAC32L_L       /* 32-bit operand 1 - multiply accumulate - low word (Byte Access) */
2350
#define MAC32H_B               MAC32H_L       /* 32-bit operand 1 - multiply accumulate - high word (Byte Access) */
2351
#define MACS32L_B              MACS32L_L      /* 32-bit operand 1 - signed multiply accumulate - low word (Byte Access) */
2352
#define MACS32H_B              MACS32H_L      /* 32-bit operand 1 - signed multiply accumulate - high word (Byte Access) */
2353
#define OP2L_B                 OP2L_L         /* 32-bit operand 2 - low word (Byte Access) */
2354
#define OP2H_B                 OP2H_L         /* 32-bit operand 2 - high word (Byte Access) */
2355
 
2356
/* MPY32CTL0 Control Bits */
2357
#define MPYC                   (0x0001)       /* Carry of the multiplier */
2358
//#define RESERVED            (0x0002)  /* Reserved */
2359
#define MPYFRAC                (0x0004)       /* Fractional mode */
2360
#define MPYSAT                 (0x0008)       /* Saturation mode */
2361
#define MPYM0                  (0x0010)       /* Multiplier mode Bit:0 */
2362
#define MPYM1                  (0x0020)       /* Multiplier mode Bit:1 */
2363
#define OP1_32                 (0x0040)       /* Bit-width of operand 1 0:16Bit / 1:32Bit */
2364
#define OP2_32                 (0x0080)       /* Bit-width of operand 2 0:16Bit / 1:32Bit */
2365
#define MPYDLYWRTEN            (0x0100)       /* Delayed write enable */
2366
#define MPYDLY32               (0x0200)       /* Delayed write mode */
2367
 
2368
/* MPY32CTL0 Control Bits */
2369
#define MPYC_L                 (0x0001)       /* Carry of the multiplier */
2370
//#define RESERVED            (0x0002)  /* Reserved */
2371
#define MPYFRAC_L              (0x0004)       /* Fractional mode */
2372
#define MPYSAT_L               (0x0008)       /* Saturation mode */
2373
#define MPYM0_L                (0x0010)       /* Multiplier mode Bit:0 */
2374
#define MPYM1_L                (0x0020)       /* Multiplier mode Bit:1 */
2375
#define OP1_32_L               (0x0040)       /* Bit-width of operand 1 0:16Bit / 1:32Bit */
2376
#define OP2_32_L               (0x0080)       /* Bit-width of operand 2 0:16Bit / 1:32Bit */
2377
 
2378
/* MPY32CTL0 Control Bits */
2379
//#define RESERVED            (0x0002)  /* Reserved */
2380
#define MPYDLYWRTEN_H          (0x0001)       /* Delayed write enable */
2381
#define MPYDLY32_H             (0x0002)       /* Delayed write mode */
2382
 
2383
#define MPYM_0                 (0x0000)       /* Multiplier mode: MPY */
2384
#define MPYM_1                 (0x0010)       /* Multiplier mode: MPYS */
2385
#define MPYM_2                 (0x0020)       /* Multiplier mode: MAC */
2386
#define MPYM_3                 (0x0030)       /* Multiplier mode: MACS */
2387
#define MPYM__MPY              (0x0000)       /* Multiplier mode: MPY */
2388
#define MPYM__MPYS             (0x0010)       /* Multiplier mode: MPYS */
2389
#define MPYM__MAC              (0x0020)       /* Multiplier mode: MAC */
2390
#define MPYM__MACS             (0x0030)       /* Multiplier mode: MACS */
2391
 
2392
/************************************************************
2393
* DIGITAL I/O Port1/2 Pull up / Pull down Resistors
2394
************************************************************/
2395
#define __MSP430_HAS_PORT1_R__                /* Definition to show that Module is available */
2396
#define __MSP430_BASEADDRESS_PORT1_R__ 0x0200
2397
#define __MSP430_HAS_PORT2_R__                /* Definition to show that Module is available */
2398
#define __MSP430_BASEADDRESS_PORT2_R__ 0x0200
2399
#define __MSP430_HAS_PORTA_R__                /* Definition to show that Module is available */
2400
#define __MSP430_BASEADDRESS_PORTA_R__ 0x0200
2401
 
2402
SFR_16BIT(PAIN);                              /* Port A Input */
2403
SFR_8BIT(PAIN_L);                             /* Port A Input */
2404
SFR_8BIT(PAIN_H);                             /* Port A Input */
2405
SFR_16BIT(PAOUT);                             /* Port A Output */
2406
SFR_8BIT(PAOUT_L);                            /* Port A Output */
2407
SFR_8BIT(PAOUT_H);                            /* Port A Output */
2408
SFR_16BIT(PADIR);                             /* Port A Direction */
2409
SFR_8BIT(PADIR_L);                            /* Port A Direction */
2410
SFR_8BIT(PADIR_H);                            /* Port A Direction */
2411
SFR_16BIT(PAREN);                             /* Port A Resistor Enable */
2412
SFR_8BIT(PAREN_L);                            /* Port A Resistor Enable */
2413
SFR_8BIT(PAREN_H);                            /* Port A Resistor Enable */
2414
SFR_16BIT(PADS);                              /* Port A Resistor Drive Strenght */
2415
SFR_8BIT(PADS_L);                             /* Port A Resistor Drive Strenght */
2416
SFR_8BIT(PADS_H);                             /* Port A Resistor Drive Strenght */
2417
SFR_16BIT(PASEL);                             /* Port A Selection */
2418
SFR_8BIT(PASEL_L);                            /* Port A Selection */
2419
SFR_8BIT(PASEL_H);                            /* Port A Selection */
2420
SFR_16BIT(PAIES);                             /* Port A Interrupt Edge Select */
2421
SFR_8BIT(PAIES_L);                            /* Port A Interrupt Edge Select */
2422
SFR_8BIT(PAIES_H);                            /* Port A Interrupt Edge Select */
2423
SFR_16BIT(PAIE);                              /* Port A Interrupt Enable */
2424
SFR_8BIT(PAIE_L);                             /* Port A Interrupt Enable */
2425
SFR_8BIT(PAIE_H);                             /* Port A Interrupt Enable */
2426
SFR_16BIT(PAIFG);                             /* Port A Interrupt Flag */
2427
SFR_8BIT(PAIFG_L);                            /* Port A Interrupt Flag */
2428
SFR_8BIT(PAIFG_H);                            /* Port A Interrupt Flag */
2429
 
2430
 
2431
SFR_16BIT(P1IV);                              /* Port 1 Interrupt Vector Word */
2432
SFR_16BIT(P2IV);                              /* Port 2 Interrupt Vector Word */
2433
#define P1IN                   (PAIN_L)       /* Port 1 Input */
2434
#define P1OUT                  (PAOUT_L)      /* Port 1 Output */
2435
#define P1DIR                  (PADIR_L)      /* Port 1 Direction */
2436
#define P1REN                  (PAREN_L)      /* Port 1 Resistor Enable */
2437
#define P1DS                   (PADS_L)       /* Port 1 Resistor Drive Strenght */
2438
#define P1SEL                  (PASEL_L)      /* Port 1 Selection */
2439
#define P1IES                  (PAIES_L)      /* Port 1 Interrupt Edge Select */
2440
#define P1IE                   (PAIE_L)       /* Port 1 Interrupt Enable */
2441
#define P1IFG                  (PAIFG_L)      /* Port 1 Interrupt Flag */
2442
 
2443
//Definitions for P1IV
2444
#define P1IV_NONE              (0x0000)       /* No Interrupt pending */
2445
#define P1IV_P1IFG0            (0x0002)       /* P1IV P1IFG.0 */
2446
#define P1IV_P1IFG1            (0x0004)       /* P1IV P1IFG.1 */
2447
#define P1IV_P1IFG2            (0x0006)       /* P1IV P1IFG.2 */
2448
#define P1IV_P1IFG3            (0x0008)       /* P1IV P1IFG.3 */
2449
#define P1IV_P1IFG4            (0x000A)       /* P1IV P1IFG.4 */
2450
#define P1IV_P1IFG5            (0x000C)       /* P1IV P1IFG.5 */
2451
#define P1IV_P1IFG6            (0x000E)       /* P1IV P1IFG.6 */
2452
#define P1IV_P1IFG7            (0x0010)       /* P1IV P1IFG.7 */
2453
 
2454
#define P2IN                   (PAIN_H)       /* Port 2 Input */
2455
#define P2OUT                  (PAOUT_H)      /* Port 2 Output */
2456
#define P2DIR                  (PADIR_H)      /* Port 2 Direction */
2457
#define P2REN                  (PAREN_H)      /* Port 2 Resistor Enable */
2458
#define P2DS                   (PADS_H)       /* Port 2 Resistor Drive Strenght */
2459
#define P2SEL                  (PASEL_H)      /* Port 2 Selection */
2460
#define P2IES                  (PAIES_H)      /* Port 2 Interrupt Edge Select */
2461
#define P2IE                   (PAIE_H)       /* Port 2 Interrupt Enable */
2462
#define P2IFG                  (PAIFG_H)      /* Port 2 Interrupt Flag */
2463
 
2464
//Definitions for P2IV
2465
#define P2IV_NONE              (0x0000)       /* No Interrupt pending */
2466
#define P2IV_P2IFG0            (0x0002)       /* P2IV P2IFG.0 */
2467
#define P2IV_P2IFG1            (0x0004)       /* P2IV P2IFG.1 */
2468
#define P2IV_P2IFG2            (0x0006)       /* P2IV P2IFG.2 */
2469
#define P2IV_P2IFG3            (0x0008)       /* P2IV P2IFG.3 */
2470
#define P2IV_P2IFG4            (0x000A)       /* P2IV P2IFG.4 */
2471
#define P2IV_P2IFG5            (0x000C)       /* P2IV P2IFG.5 */
2472
#define P2IV_P2IFG6            (0x000E)       /* P2IV P2IFG.6 */
2473
#define P2IV_P2IFG7            (0x0010)       /* P2IV P2IFG.7 */
2474
 
2475
 
2476
/************************************************************
2477
* DIGITAL I/O Port3/4 Pull up / Pull down Resistors
2478
************************************************************/
2479
#define __MSP430_HAS_PORT3_R__                /* Definition to show that Module is available */
2480
#define __MSP430_BASEADDRESS_PORT3_R__ 0x0220
2481
#define __MSP430_HAS_PORT4_R__                /* Definition to show that Module is available */
2482
#define __MSP430_BASEADDRESS_PORT4_R__ 0x0220
2483
#define __MSP430_HAS_PORTB_R__                /* Definition to show that Module is available */
2484
#define __MSP430_BASEADDRESS_PORTB_R__ 0x0220
2485
 
2486
SFR_16BIT(PBIN);                              /* Port B Input */
2487
SFR_8BIT(PBIN_L);                             /* Port B Input */
2488
SFR_8BIT(PBIN_H);                             /* Port B Input */
2489
SFR_16BIT(PBOUT);                             /* Port B Output */
2490
SFR_8BIT(PBOUT_L);                            /* Port B Output */
2491
SFR_8BIT(PBOUT_H);                            /* Port B Output */
2492
SFR_16BIT(PBDIR);                             /* Port B Direction */
2493
SFR_8BIT(PBDIR_L);                            /* Port B Direction */
2494
SFR_8BIT(PBDIR_H);                            /* Port B Direction */
2495
SFR_16BIT(PBREN);                             /* Port B Resistor Enable */
2496
SFR_8BIT(PBREN_L);                            /* Port B Resistor Enable */
2497
SFR_8BIT(PBREN_H);                            /* Port B Resistor Enable */
2498
SFR_16BIT(PBDS);                              /* Port B Resistor Drive Strenght */
2499
SFR_8BIT(PBDS_L);                             /* Port B Resistor Drive Strenght */
2500
SFR_8BIT(PBDS_H);                             /* Port B Resistor Drive Strenght */
2501
SFR_16BIT(PBSEL);                             /* Port B Selection */
2502
SFR_8BIT(PBSEL_L);                            /* Port B Selection */
2503
SFR_8BIT(PBSEL_H);                            /* Port B Selection */
2504
SFR_16BIT(PBIES);                             /* Port B Interrupt Edge Select */
2505
SFR_8BIT(PBIES_L);                            /* Port B Interrupt Edge Select */
2506
SFR_8BIT(PBIES_H);                            /* Port B Interrupt Edge Select */
2507
SFR_16BIT(PBIE);                              /* Port B Interrupt Enable */
2508
SFR_8BIT(PBIE_L);                             /* Port B Interrupt Enable */
2509
SFR_8BIT(PBIE_H);                             /* Port B Interrupt Enable */
2510
SFR_16BIT(PBIFG);                             /* Port B Interrupt Flag */
2511
SFR_8BIT(PBIFG_L);                            /* Port B Interrupt Flag */
2512
SFR_8BIT(PBIFG_H);                            /* Port B Interrupt Flag */
2513
 
2514
 
2515
SFR_16BIT(P3IV);                              /* Port 3 Interrupt Vector Word */
2516
SFR_16BIT(P4IV);                              /* Port 4 Interrupt Vector Word */
2517
#define P3IN                   (PBIN_L)       /* Port 3 Input */
2518
#define P3OUT                  (PBOUT_L)      /* Port 3 Output */
2519
#define P3DIR                  (PBDIR_L)      /* Port 3 Direction */
2520
#define P3REN                  (PBREN_L)      /* Port 3 Resistor Enable */
2521
#define P3DS                   (PBDS_L)       /* Port 3 Resistor Drive Strenght */
2522
#define P3SEL                  (PBSEL_L)      /* Port 3 Selection */
2523
#define P3IES                  (PBIES_L)      /* Port 3 Interrupt Edge Select */
2524
#define P3IE                   (PBIE_L)       /* Port 3 Interrupt Enable */
2525
#define P3IFG                  (PBIFG_L)      /* Port 3 Interrupt Flag */
2526
 
2527
//Definitions for P3IV
2528
#define P3IV_NONE              (0x0000)       /* No Interrupt pending */
2529
#define P3IV_P3IFG0            (0x0002)       /* P3IV P3IFG.0 */
2530
#define P3IV_P3IFG1            (0x0004)       /* P3IV P3IFG.1 */
2531
#define P3IV_P3IFG2            (0x0006)       /* P3IV P3IFG.2 */
2532
#define P3IV_P3IFG3            (0x0008)       /* P3IV P3IFG.3 */
2533
#define P3IV_P3IFG4            (0x000A)       /* P3IV P3IFG.4 */
2534
#define P3IV_P3IFG5            (0x000C)       /* P3IV P3IFG.5 */
2535
#define P3IV_P3IFG6            (0x000E)       /* P3IV P3IFG.6 */
2536
#define P3IV_P3IFG7            (0x0010)       /* P3IV P3IFG.7 */
2537
 
2538
#define P4IN                   (PBIN_H)       /* Port 4 Input */
2539
#define P4OUT                  (PBOUT_H)      /* Port 4 Output */
2540
#define P4DIR                  (PBDIR_H)      /* Port 4 Direction */
2541
#define P4REN                  (PBREN_H)      /* Port 4 Resistor Enable */
2542
#define P4DS                   (PBDS_H)       /* Port 4 Resistor Drive Strenght */
2543
#define P4SEL                  (PBSEL_H)      /* Port 4 Selection */
2544
#define P4IES                  (PBIES_H)      /* Port 4 Interrupt Edge Select */
2545
#define P4IE                   (PBIE_H)       /* Port 4 Interrupt Enable */
2546
#define P4IFG                  (PBIFG_H)      /* Port 4 Interrupt Flag */
2547
 
2548
//Definitions for P4IV
2549
#define P4IV_NONE              (0x0000)       /* No Interrupt pending */
2550
#define P4IV_P4IFG0            (0x0002)       /* P4IV P4IFG.0 */
2551
#define P4IV_P4IFG1            (0x0004)       /* P4IV P4IFG.1 */
2552
#define P4IV_P4IFG2            (0x0006)       /* P4IV P4IFG.2 */
2553
#define P4IV_P4IFG3            (0x0008)       /* P4IV P4IFG.3 */
2554
#define P4IV_P4IFG4            (0x000A)       /* P4IV P4IFG.4 */
2555
#define P4IV_P4IFG5            (0x000C)       /* P4IV P4IFG.5 */
2556
#define P4IV_P4IFG6            (0x000E)       /* P4IV P4IFG.6 */
2557
#define P4IV_P4IFG7            (0x0010)       /* P4IV P4IFG.7 */
2558
 
2559
 
2560
/************************************************************
2561
* DIGITAL I/O Port5/6 Pull up / Pull down Resistors
2562
************************************************************/
2563
#define __MSP430_HAS_PORT5_R__                /* Definition to show that Module is available */
2564
#define __MSP430_BASEADDRESS_PORT5_R__ 0x0240
2565
#define __MSP430_HAS_PORT6_R__                /* Definition to show that Module is available */
2566
#define __MSP430_BASEADDRESS_PORT6_R__ 0x0240
2567
#define __MSP430_HAS_PORTC_R__                /* Definition to show that Module is available */
2568
#define __MSP430_BASEADDRESS_PORTC_R__ 0x0240
2569
 
2570
SFR_16BIT(PCIN);                              /* Port C Input */
2571
SFR_8BIT(PCIN_L);                             /* Port C Input */
2572
SFR_8BIT(PCIN_H);                             /* Port C Input */
2573
SFR_16BIT(PCOUT);                             /* Port C Output */
2574
SFR_8BIT(PCOUT_L);                            /* Port C Output */
2575
SFR_8BIT(PCOUT_H);                            /* Port C Output */
2576
SFR_16BIT(PCDIR);                             /* Port C Direction */
2577
SFR_8BIT(PCDIR_L);                            /* Port C Direction */
2578
SFR_8BIT(PCDIR_H);                            /* Port C Direction */
2579
SFR_16BIT(PCREN);                             /* Port C Resistor Enable */
2580
SFR_8BIT(PCREN_L);                            /* Port C Resistor Enable */
2581
SFR_8BIT(PCREN_H);                            /* Port C Resistor Enable */
2582
SFR_16BIT(PCDS);                              /* Port C Resistor Drive Strenght */
2583
SFR_8BIT(PCDS_L);                             /* Port C Resistor Drive Strenght */
2584
SFR_8BIT(PCDS_H);                             /* Port C Resistor Drive Strenght */
2585
SFR_16BIT(PCSEL);                             /* Port C Selection */
2586
SFR_8BIT(PCSEL_L);                            /* Port C Selection */
2587
SFR_8BIT(PCSEL_H);                            /* Port C Selection */
2588
 
2589
 
2590
#define P5IN                   (PCIN_L)       /* Port 5 Input */
2591
#define P5OUT                  (PCOUT_L)      /* Port 5 Output */
2592
#define P5DIR                  (PCDIR_L)      /* Port 5 Direction */
2593
#define P5REN                  (PCREN_L)      /* Port 5 Resistor Enable */
2594
#define P5DS                   (PCDS_L)       /* Port 5 Resistor Drive Strenght */
2595
#define P5SEL                  (PCSEL_L)      /* Port 5 Selection */
2596
 
2597
#define P6IN                   (PCIN_H)       /* Port 6 Input */
2598
#define P6OUT                  (PCOUT_H)      /* Port 6 Output */
2599
#define P6DIR                  (PCDIR_H)      /* Port 6 Direction */
2600
#define P6REN                  (PCREN_H)      /* Port 6 Resistor Enable */
2601
#define P6DS                   (PCDS_H)       /* Port 6 Resistor Drive Strenght */
2602
#define P6SEL                  (PCSEL_H)      /* Port 6 Selection */
2603
 
2604
 
2605
/************************************************************
2606
* DIGITAL I/O Port7/8 Pull up / Pull down Resistors
2607
************************************************************/
2608
#define __MSP430_HAS_PORT7_R__                /* Definition to show that Module is available */
2609
#define __MSP430_BASEADDRESS_PORT7_R__ 0x0260
2610
#define __MSP430_HAS_PORT8_R__                /* Definition to show that Module is available */
2611
#define __MSP430_BASEADDRESS_PORT8_R__ 0x0260
2612
#define __MSP430_HAS_PORTD_R__                /* Definition to show that Module is available */
2613
#define __MSP430_BASEADDRESS_PORTD_R__ 0x0260
2614
 
2615
SFR_16BIT(PDIN);                              /* Port D Input */
2616
SFR_8BIT(PDIN_L);                             /* Port D Input */
2617
SFR_8BIT(PDIN_H);                             /* Port D Input */
2618
SFR_16BIT(PDOUT);                             /* Port D Output */
2619
SFR_8BIT(PDOUT_L);                            /* Port D Output */
2620
SFR_8BIT(PDOUT_H);                            /* Port D Output */
2621
SFR_16BIT(PDDIR);                             /* Port D Direction */
2622
SFR_8BIT(PDDIR_L);                            /* Port D Direction */
2623
SFR_8BIT(PDDIR_H);                            /* Port D Direction */
2624
SFR_16BIT(PDREN);                             /* Port D Resistor Enable */
2625
SFR_8BIT(PDREN_L);                            /* Port D Resistor Enable */
2626
SFR_8BIT(PDREN_H);                            /* Port D Resistor Enable */
2627
SFR_16BIT(PDDS);                              /* Port D Resistor Drive Strenght */
2628
SFR_8BIT(PDDS_L);                             /* Port D Resistor Drive Strenght */
2629
SFR_8BIT(PDDS_H);                             /* Port D Resistor Drive Strenght */
2630
SFR_16BIT(PDSEL);                             /* Port D Selection */
2631
SFR_8BIT(PDSEL_L);                            /* Port D Selection */
2632
SFR_8BIT(PDSEL_H);                            /* Port D Selection */
2633
 
2634
 
2635
#define P7IN                   (PDIN_L)       /* Port 7 Input */
2636
#define P7OUT                  (PDOUT_L)      /* Port 7 Output */
2637
#define P7DIR                  (PDDIR_L)      /* Port 7 Direction */
2638
#define P7REN                  (PDREN_L)      /* Port 7 Resistor Enable */
2639
#define P7DS                   (PDDS_L)       /* Port 7 Resistor Drive Strenght */
2640
#define P7SEL                  (PDSEL_L)      /* Port 7 Selection */
2641
 
2642
#define P8IN                   (PDIN_H)       /* Port 8 Input */
2643
#define P8OUT                  (PDOUT_H)      /* Port 8 Output */
2644
#define P8DIR                  (PDDIR_H)      /* Port 8 Direction */
2645
#define P8REN                  (PDREN_H)      /* Port 8 Resistor Enable */
2646
#define P8DS                   (PDDS_H)       /* Port 8 Resistor Drive Strenght */
2647
#define P8SEL                  (PDSEL_H)      /* Port 8 Selection */
2648
 
2649
 
2650
/************************************************************
2651
* DIGITAL I/O Port9 Pull up / Pull down Resistors
2652
************************************************************/
2653
#define __MSP430_HAS_PORT9_R__                /* Definition to show that Module is available */
2654
#define __MSP430_BASEADDRESS_PORT9_R__ 0x0280
2655
#define __MSP430_HAS_PORTE_R__                /* Definition to show that Module is available */
2656
#define __MSP430_BASEADDRESS_PORTE_R__ 0x0280
2657
 
2658
SFR_16BIT(PEIN);                              /* Port E Input */
2659
SFR_8BIT(PEIN_L);                             /* Port E Input */
2660
SFR_8BIT(PEIN_H);                             /* Port E Input */
2661
SFR_16BIT(PEOUT);                             /* Port E Output */
2662
SFR_8BIT(PEOUT_L);                            /* Port E Output */
2663
SFR_8BIT(PEOUT_H);                            /* Port E Output */
2664
SFR_16BIT(PEDIR);                             /* Port E Direction */
2665
SFR_8BIT(PEDIR_L);                            /* Port E Direction */
2666
SFR_8BIT(PEDIR_H);                            /* Port E Direction */
2667
SFR_16BIT(PEREN);                             /* Port E Resistor Enable */
2668
SFR_8BIT(PEREN_L);                            /* Port E Resistor Enable */
2669
SFR_8BIT(PEREN_H);                            /* Port E Resistor Enable */
2670
SFR_16BIT(PEDS);                              /* Port E Resistor Drive Strenght */
2671
SFR_8BIT(PEDS_L);                             /* Port E Resistor Drive Strenght */
2672
SFR_8BIT(PEDS_H);                             /* Port E Resistor Drive Strenght */
2673
SFR_16BIT(PESEL);                             /* Port E Selection */
2674
SFR_8BIT(PESEL_L);                            /* Port E Selection */
2675
SFR_8BIT(PESEL_H);                            /* Port E Selection */
2676
 
2677
 
2678
#define P9IN                   (PEIN_L)       /* Port 9 Input */
2679
#define P9OUT                  (PEOUT_L)      /* Port 9 Output */
2680
#define P9DIR                  (PEDIR_L)      /* Port 9 Direction */
2681
#define P9REN                  (PEREN_L)      /* Port 9 Resistor Enable */
2682
#define P9DS                   (PEDS_L)       /* Port 9 Resistor Drive Strenght */
2683
#define P9SEL                  (PESEL_L)      /* Port 9 Selection */
2684
 
2685
 
2686
/************************************************************
2687
* DIGITAL I/O PortJ Pull up / Pull down Resistors
2688
************************************************************/
2689
#define __MSP430_HAS_PORTJ_R__                /* Definition to show that Module is available */
2690
#define __MSP430_BASEADDRESS_PORTJ_R__ 0x0320
2691
 
2692
SFR_16BIT(PJIN);                              /* Port J Input */
2693
SFR_8BIT(PJIN_L);                             /* Port J Input */
2694
SFR_8BIT(PJIN_H);                             /* Port J Input */
2695
SFR_16BIT(PJOUT);                             /* Port J Output */
2696
SFR_8BIT(PJOUT_L);                            /* Port J Output */
2697
SFR_8BIT(PJOUT_H);                            /* Port J Output */
2698
SFR_16BIT(PJDIR);                             /* Port J Direction */
2699
SFR_8BIT(PJDIR_L);                            /* Port J Direction */
2700
SFR_8BIT(PJDIR_H);                            /* Port J Direction */
2701
SFR_16BIT(PJREN);                             /* Port J Resistor Enable */
2702
SFR_8BIT(PJREN_L);                            /* Port J Resistor Enable */
2703
SFR_8BIT(PJREN_H);                            /* Port J Resistor Enable */
2704
SFR_16BIT(PJDS);                              /* Port J Resistor Drive Strenght */
2705
SFR_8BIT(PJDS_L);                             /* Port J Resistor Drive Strenght */
2706
SFR_8BIT(PJDS_H);                             /* Port J Resistor Drive Strenght */
2707
 
2708
/************************************************************
2709
* PORT MAPPING CONTROLLER
2710
************************************************************/
2711
#define __MSP430_HAS_PORT_MAPPING__                /* Definition to show that Module is available */
2712
#define __MSP430_BASEADDRESS_PORT_MAPPING__ 0x01C0
2713
 
2714
SFR_16BIT(PMAPKEYID);                         /* Port Mapping Key register */
2715
SFR_8BIT(PMAPKEYID_L);                        /* Port Mapping Key register */
2716
SFR_8BIT(PMAPKEYID_H);                        /* Port Mapping Key register */
2717
SFR_16BIT(PMAPCTL);                           /* Port Mapping control register */
2718
SFR_8BIT(PMAPCTL_L);                          /* Port Mapping control register */
2719
SFR_8BIT(PMAPCTL_H);                          /* Port Mapping control register */
2720
 
2721
#define  PMAPKEY               (0x2D52)       /* Port Mapping Key */
2722
#define  PMAPPWD               PMAPKEYID      /* Legacy Definition: Mapping Key register */
2723
#define  PMAPPW                (0x2D52)       /* Legacy Definition: Port Mapping Password */
2724
 
2725
/* PMAPCTL Control Bits */
2726
#define PMAPLOCKED             (0x0001)       /* Port Mapping Lock bit. Read only */
2727
#define PMAPRECFG              (0x0002)       /* Port Mapping re-configuration control bit */
2728
 
2729
/* PMAPCTL Control Bits */
2730
#define PMAPLOCKED_L           (0x0001)       /* Port Mapping Lock bit. Read only */
2731
#define PMAPRECFG_L            (0x0002)       /* Port Mapping re-configuration control bit */
2732
 
2733
/* PMAPCTL Control Bits */
2734
 
2735
/************************************************************
2736
* PORT 2 MAPPING CONTROLLER
2737
************************************************************/
2738
#define __MSP430_HAS_PORT2_MAPPING__                /* Definition to show that Module is available */
2739
#define __MSP430_BASEADDRESS_PORT2_MAPPING__ 0x01D0
2740
 
2741
SFR_16BIT(P2MAP01);                           /* Port P2.0/1 mapping register */
2742
SFR_8BIT(P2MAP01_L);                          /* Port P2.0/1 mapping register */
2743
SFR_8BIT(P2MAP01_H);                          /* Port P2.0/1 mapping register */
2744
SFR_16BIT(P2MAP23);                           /* Port P2.2/3 mapping register */
2745
SFR_8BIT(P2MAP23_L);                          /* Port P2.2/3 mapping register */
2746
SFR_8BIT(P2MAP23_H);                          /* Port P2.2/3 mapping register */
2747
SFR_16BIT(P2MAP45);                           /* Port P2.4/5 mapping register */
2748
SFR_8BIT(P2MAP45_L);                          /* Port P2.4/5 mapping register */
2749
SFR_8BIT(P2MAP45_H);                          /* Port P2.4/5 mapping register */
2750
SFR_16BIT(P2MAP67);                           /* Port P2.6/7 mapping register */
2751
SFR_8BIT(P2MAP67_L);                          /* Port P2.6/7 mapping register */
2752
SFR_8BIT(P2MAP67_H);                          /* Port P2.6/7 mapping register */
2753
 
2754
#define  P2MAP0                P2MAP01_L      /* Port P2.0 mapping register */
2755
#define  P2MAP1                P2MAP01_H      /* Port P2.1 mapping register */
2756
#define  P2MAP2                P2MAP23_L      /* Port P2.2 mapping register */
2757
#define  P2MAP3                P2MAP23_H      /* Port P2.3 mapping register */
2758
#define  P2MAP4                P2MAP45_L      /* Port P2.4 mapping register */
2759
#define  P2MAP5                P2MAP45_H      /* Port P2.5 mapping register */
2760
#define  P2MAP6                P2MAP67_L      /* Port P2.6 mapping register */
2761
#define  P2MAP7                P2MAP67_H      /* Port P2.7 mapping register */
2762
 
2763
#define PM_NONE                0
2764
#define PM_CBOUT               1
2765
#define PM_TB0CLK              1
2766
#define PM_ADC12CLK            2
2767
#define PM_DMAE0               2
2768
#define PM_SVMOUT              3
2769
#define PM_TB0OUTH             3
2770
#define PM_TB0CCR0B            4
2771
#define PM_TB0CCR1B            5
2772
#define PM_TB0CCR2B            6
2773
#define PM_TB0CCR3B            7
2774
#define PM_TB0CCR4B            8
2775
#define PM_TB0CCR5B            9
2776
#define PM_TB0CCR6B            10
2777
#define PM_UCA0RXD             11
2778
#define PM_UCA0SOMI            11
2779
#define PM_UCA0TXD             12
2780
#define PM_UCA0SIMO            12
2781
#define PM_UCA0CLK             13
2782
#define PM_UCB0STE             13
2783
#define PM_UCB0SOMI            14
2784
#define PM_UCB0SCL             14
2785
#define PM_UCB0SIMO            15
2786
#define PM_UCB0SDA             15
2787
#define PM_UCB0CLK             16
2788
#define PM_UCA0STE             16
2789
#define PM_MCLK                17
2790
#define PM_PM_E0               18
2791
#define PM_PM_E1               19
2792
#define PM_ANALOG              31
2793
 
2794
/************************************************************
2795
* PMM - Power Management System
2796
************************************************************/
2797
#define __MSP430_HAS_PMM__                    /* Definition to show that Module is available */
2798
#define __MSP430_BASEADDRESS_PMM__ 0x0120
2799
 
2800
SFR_16BIT(PMMCTL0);                           /* PMM Control 0 */
2801
SFR_8BIT(PMMCTL0_L);                          /* PMM Control 0 */
2802
SFR_8BIT(PMMCTL0_H);                          /* PMM Control 0 */
2803
SFR_16BIT(PMMCTL1);                           /* PMM Control 1 */
2804
SFR_8BIT(PMMCTL1_L);                          /* PMM Control 1 */
2805
SFR_8BIT(PMMCTL1_H);                          /* PMM Control 1 */
2806
SFR_16BIT(SVSMHCTL);                          /* SVS and SVM high side control register */
2807
SFR_8BIT(SVSMHCTL_L);                         /* SVS and SVM high side control register */
2808
SFR_8BIT(SVSMHCTL_H);                         /* SVS and SVM high side control register */
2809
SFR_16BIT(SVSMLCTL);                          /* SVS and SVM low side control register */
2810
SFR_8BIT(SVSMLCTL_L);                         /* SVS and SVM low side control register */
2811
SFR_8BIT(SVSMLCTL_H);                         /* SVS and SVM low side control register */
2812
SFR_16BIT(SVSMIO);                            /* SVSIN and SVSOUT control register */
2813
SFR_8BIT(SVSMIO_L);                           /* SVSIN and SVSOUT control register */
2814
SFR_8BIT(SVSMIO_H);                           /* SVSIN and SVSOUT control register */
2815
SFR_16BIT(PMMIFG);                            /* PMM Interrupt Flag */
2816
SFR_8BIT(PMMIFG_L);                           /* PMM Interrupt Flag */
2817
SFR_8BIT(PMMIFG_H);                           /* PMM Interrupt Flag */
2818
SFR_16BIT(PMMRIE);                            /* PMM and RESET Interrupt Enable */
2819
SFR_8BIT(PMMRIE_L);                           /* PMM and RESET Interrupt Enable */
2820
SFR_8BIT(PMMRIE_H);                           /* PMM and RESET Interrupt Enable */
2821
SFR_16BIT(PM5CTL0);                           /* PMM Power Mode 5 Control Register 0 */
2822
SFR_8BIT(PM5CTL0_L);                          /* PMM Power Mode 5 Control Register 0 */
2823
SFR_8BIT(PM5CTL0_H);                          /* PMM Power Mode 5 Control Register 0 */
2824
 
2825
#define PMMPW                  (0xA500)       /* PMM Register Write Password */
2826
#define PMMPW_H                (0xA5)         /* PMM Register Write Password for high word access */
2827
 
2828
/* PMMCTL0 Control Bits */
2829
#define PMMCOREV0              (0x0001)       /* PMM Core Voltage Bit: 0 */
2830
#define PMMCOREV1              (0x0002)       /* PMM Core Voltage Bit: 1 */
2831
#define PMMSWBOR               (0x0004)       /* PMM Software BOR */
2832
#define PMMSWPOR               (0x0008)       /* PMM Software POR */
2833
#define PMMREGOFF              (0x0010)       /* PMM Turn Regulator off */
2834
#define PMMHPMRE               (0x0080)       /* PMM Global High Power Module Request Enable */
2835
 
2836
/* PMMCTL0 Control Bits */
2837
#define PMMCOREV0_L            (0x0001)       /* PMM Core Voltage Bit: 0 */
2838
#define PMMCOREV1_L            (0x0002)       /* PMM Core Voltage Bit: 1 */
2839
#define PMMSWBOR_L             (0x0004)       /* PMM Software BOR */
2840
#define PMMSWPOR_L             (0x0008)       /* PMM Software POR */
2841
#define PMMREGOFF_L            (0x0010)       /* PMM Turn Regulator off */
2842
#define PMMHPMRE_L             (0x0080)       /* PMM Global High Power Module Request Enable */
2843
 
2844
/* PMMCTL0 Control Bits */
2845
 
2846
#define PMMCOREV_0             (0x0000)       /* PMM Core Voltage 0 (1.35V) */
2847
#define PMMCOREV_1             (0x0001)       /* PMM Core Voltage 1 (1.55V) */
2848
#define PMMCOREV_2             (0x0002)       /* PMM Core Voltage 2 (1.75V) */
2849
#define PMMCOREV_3             (0x0003)       /* PMM Core Voltage 3 (1.85V) */
2850
 
2851
/* PMMCTL1 Control Bits */
2852
#define PMMREFMD               (0x0001)       /* PMM Reference Mode */
2853
#define PMMCMD0                (0x0010)       /* PMM Voltage Regulator Current Mode Bit: 0 */
2854
#define PMMCMD1                (0x0020)       /* PMM Voltage Regulator Current Mode Bit: 1 */
2855
 
2856
/* PMMCTL1 Control Bits */
2857
#define PMMREFMD_L             (0x0001)       /* PMM Reference Mode */
2858
#define PMMCMD0_L              (0x0010)       /* PMM Voltage Regulator Current Mode Bit: 0 */
2859
#define PMMCMD1_L              (0x0020)       /* PMM Voltage Regulator Current Mode Bit: 1 */
2860
 
2861
/* PMMCTL1 Control Bits */
2862
 
2863
/* SVSMHCTL Control Bits */
2864
#define SVSMHRRL0              (0x0001)       /* SVS and SVM high side Reset Release Voltage Level Bit: 0 */
2865
#define SVSMHRRL1              (0x0002)       /* SVS and SVM high side Reset Release Voltage Level Bit: 1 */
2866
#define SVSMHRRL2              (0x0004)       /* SVS and SVM high side Reset Release Voltage Level Bit: 2 */
2867
#define SVSMHDLYST             (0x0008)       /* SVS and SVM high side delay status */
2868
#define SVSHMD                 (0x0010)       /* SVS high side mode */
2869
#define SVSMHEVM               (0x0040)       /* SVS and SVM high side event mask */
2870
#define SVSMHACE               (0x0080)       /* SVS and SVM high side auto control enable */
2871
#define SVSHRVL0               (0x0100)       /* SVS high side reset voltage level Bit: 0 */
2872
#define SVSHRVL1               (0x0200)       /* SVS high side reset voltage level Bit: 1 */
2873
#define SVSHE                  (0x0400)       /* SVS high side enable */
2874
#define SVSHFP                 (0x0800)       /* SVS high side full performace mode */
2875
#define SVMHOVPE               (0x1000)       /* SVM high side over-voltage enable */
2876
#define SVMHE                  (0x4000)       /* SVM high side enable */
2877
#define SVMHFP                 (0x8000)       /* SVM high side full performace mode */
2878
 
2879
/* SVSMHCTL Control Bits */
2880
#define SVSMHRRL0_L            (0x0001)       /* SVS and SVM high side Reset Release Voltage Level Bit: 0 */
2881
#define SVSMHRRL1_L            (0x0002)       /* SVS and SVM high side Reset Release Voltage Level Bit: 1 */
2882
#define SVSMHRRL2_L            (0x0004)       /* SVS and SVM high side Reset Release Voltage Level Bit: 2 */
2883
#define SVSMHDLYST_L           (0x0008)       /* SVS and SVM high side delay status */
2884
#define SVSHMD_L               (0x0010)       /* SVS high side mode */
2885
#define SVSMHEVM_L             (0x0040)       /* SVS and SVM high side event mask */
2886
#define SVSMHACE_L             (0x0080)       /* SVS and SVM high side auto control enable */
2887
 
2888
/* SVSMHCTL Control Bits */
2889
#define SVSHRVL0_H             (0x0001)       /* SVS high side reset voltage level Bit: 0 */
2890
#define SVSHRVL1_H             (0x0002)       /* SVS high side reset voltage level Bit: 1 */
2891
#define SVSHE_H                (0x0004)       /* SVS high side enable */
2892
#define SVSHFP_H               (0x0008)       /* SVS high side full performace mode */
2893
#define SVMHOVPE_H             (0x0010)       /* SVM high side over-voltage enable */
2894
#define SVMHE_H                (0x0040)       /* SVM high side enable */
2895
#define SVMHFP_H               (0x0080)       /* SVM high side full performace mode */
2896
 
2897
#define SVSMHRRL_0             (0x0000)       /* SVS and SVM high side Reset Release Voltage Level 0 */
2898
#define SVSMHRRL_1             (0x0001)       /* SVS and SVM high side Reset Release Voltage Level 1 */
2899
#define SVSMHRRL_2             (0x0002)       /* SVS and SVM high side Reset Release Voltage Level 2 */
2900
#define SVSMHRRL_3             (0x0003)       /* SVS and SVM high side Reset Release Voltage Level 3 */
2901
#define SVSMHRRL_4             (0x0004)       /* SVS and SVM high side Reset Release Voltage Level 4 */
2902
#define SVSMHRRL_5             (0x0005)       /* SVS and SVM high side Reset Release Voltage Level 5 */
2903
#define SVSMHRRL_6             (0x0006)       /* SVS and SVM high side Reset Release Voltage Level 6 */
2904
#define SVSMHRRL_7             (0x0007)       /* SVS and SVM high side Reset Release Voltage Level 7 */
2905
 
2906
#define SVSHRVL_0              (0x0000)       /* SVS high side Reset Release Voltage Level 0 */
2907
#define SVSHRVL_1              (0x0100)       /* SVS high side Reset Release Voltage Level 1 */
2908
#define SVSHRVL_2              (0x0200)       /* SVS high side Reset Release Voltage Level 2 */
2909
#define SVSHRVL_3              (0x0300)       /* SVS high side Reset Release Voltage Level 3 */
2910
 
2911
/* SVSMLCTL Control Bits */
2912
#define SVSMLRRL0              (0x0001)       /* SVS and SVM low side Reset Release Voltage Level Bit: 0 */
2913
#define SVSMLRRL1              (0x0002)       /* SVS and SVM low side Reset Release Voltage Level Bit: 1 */
2914
#define SVSMLRRL2              (0x0004)       /* SVS and SVM low side Reset Release Voltage Level Bit: 2 */
2915
#define SVSMLDLYST             (0x0008)       /* SVS and SVM low side delay status */
2916
#define SVSLMD                 (0x0010)       /* SVS low side mode */
2917
#define SVSMLEVM               (0x0040)       /* SVS and SVM low side event mask */
2918
#define SVSMLACE               (0x0080)       /* SVS and SVM low side auto control enable */
2919
#define SVSLRVL0               (0x0100)       /* SVS low side reset voltage level Bit: 0 */
2920
#define SVSLRVL1               (0x0200)       /* SVS low side reset voltage level Bit: 1 */
2921
#define SVSLE                  (0x0400)       /* SVS low side enable */
2922
#define SVSLFP                 (0x0800)       /* SVS low side full performace mode */
2923
#define SVMLOVPE               (0x1000)       /* SVM low side over-voltage enable */
2924
#define SVMLE                  (0x4000)       /* SVM low side enable */
2925
#define SVMLFP                 (0x8000)       /* SVM low side full performace mode */
2926
 
2927
/* SVSMLCTL Control Bits */
2928
#define SVSMLRRL0_L            (0x0001)       /* SVS and SVM low side Reset Release Voltage Level Bit: 0 */
2929
#define SVSMLRRL1_L            (0x0002)       /* SVS and SVM low side Reset Release Voltage Level Bit: 1 */
2930
#define SVSMLRRL2_L            (0x0004)       /* SVS and SVM low side Reset Release Voltage Level Bit: 2 */
2931
#define SVSMLDLYST_L           (0x0008)       /* SVS and SVM low side delay status */
2932
#define SVSLMD_L               (0x0010)       /* SVS low side mode */
2933
#define SVSMLEVM_L             (0x0040)       /* SVS and SVM low side event mask */
2934
#define SVSMLACE_L             (0x0080)       /* SVS and SVM low side auto control enable */
2935
 
2936
/* SVSMLCTL Control Bits */
2937
#define SVSLRVL0_H             (0x0001)       /* SVS low side reset voltage level Bit: 0 */
2938
#define SVSLRVL1_H             (0x0002)       /* SVS low side reset voltage level Bit: 1 */
2939
#define SVSLE_H                (0x0004)       /* SVS low side enable */
2940
#define SVSLFP_H               (0x0008)       /* SVS low side full performace mode */
2941
#define SVMLOVPE_H             (0x0010)       /* SVM low side over-voltage enable */
2942
#define SVMLE_H                (0x0040)       /* SVM low side enable */
2943
#define SVMLFP_H               (0x0080)       /* SVM low side full performace mode */
2944
 
2945
#define SVSMLRRL_0             (0x0000)       /* SVS and SVM low side Reset Release Voltage Level 0 */
2946
#define SVSMLRRL_1             (0x0001)       /* SVS and SVM low side Reset Release Voltage Level 1 */
2947
#define SVSMLRRL_2             (0x0002)       /* SVS and SVM low side Reset Release Voltage Level 2 */
2948
#define SVSMLRRL_3             (0x0003)       /* SVS and SVM low side Reset Release Voltage Level 3 */
2949
#define SVSMLRRL_4             (0x0004)       /* SVS and SVM low side Reset Release Voltage Level 4 */
2950
#define SVSMLRRL_5             (0x0005)       /* SVS and SVM low side Reset Release Voltage Level 5 */
2951
#define SVSMLRRL_6             (0x0006)       /* SVS and SVM low side Reset Release Voltage Level 6 */
2952
#define SVSMLRRL_7             (0x0007)       /* SVS and SVM low side Reset Release Voltage Level 7 */
2953
 
2954
#define SVSLRVL_0              (0x0000)       /* SVS low side Reset Release Voltage Level 0 */
2955
#define SVSLRVL_1              (0x0100)       /* SVS low side Reset Release Voltage Level 1 */
2956
#define SVSLRVL_2              (0x0200)       /* SVS low side Reset Release Voltage Level 2 */
2957
#define SVSLRVL_3              (0x0300)       /* SVS low side Reset Release Voltage Level 3 */
2958
 
2959
/* SVSMIO Control Bits */
2960
#define SVMLOE                 (0x0008)       /* SVM low side output enable */
2961
#define SVMLVLROE              (0x0010)       /* SVM low side voltage level reached output enable */
2962
#define SVMOUTPOL              (0x0020)       /* SVMOUT pin polarity */
2963
#define SVMHOE                 (0x0800)       /* SVM high side output enable */
2964
#define SVMHVLROE              (0x1000)       /* SVM high side voltage level reached output enable */
2965
 
2966
/* SVSMIO Control Bits */
2967
#define SVMLOE_L               (0x0008)       /* SVM low side output enable */
2968
#define SVMLVLROE_L            (0x0010)       /* SVM low side voltage level reached output enable */
2969
#define SVMOUTPOL_L            (0x0020)       /* SVMOUT pin polarity */
2970
 
2971
/* SVSMIO Control Bits */
2972
#define SVMHOE_H               (0x0008)       /* SVM high side output enable */
2973
#define SVMHVLROE_H            (0x0010)       /* SVM high side voltage level reached output enable */
2974
 
2975
/* PMMIFG Control Bits */
2976
#define SVSMLDLYIFG            (0x0001)       /* SVS and SVM low side Delay expired interrupt flag */
2977
#define SVMLIFG                (0x0002)       /* SVM low side interrupt flag */
2978
#define SVMLVLRIFG             (0x0004)       /* SVM low side Voltage Level Reached interrupt flag */
2979
#define SVSMHDLYIFG            (0x0010)       /* SVS and SVM high side Delay expired interrupt flag */
2980
#define SVMHIFG                (0x0020)       /* SVM high side interrupt flag */
2981
#define SVMHVLRIFG             (0x0040)       /* SVM high side Voltage Level Reached interrupt flag */
2982
#define PMMBORIFG              (0x0100)       /* PMM Software BOR interrupt flag */
2983
#define PMMRSTIFG              (0x0200)       /* PMM RESET pin interrupt flag */
2984
#define PMMPORIFG              (0x0400)       /* PMM Software POR interrupt flag */
2985
#define SVSHIFG                (0x1000)       /* SVS low side interrupt flag */
2986
#define SVSLIFG                (0x2000)       /* SVS high side interrupt flag */
2987
#define PMMLPM5IFG             (0x8000)       /* LPM5 indication Flag */
2988
 
2989
/* PMMIFG Control Bits */
2990
#define SVSMLDLYIFG_L          (0x0001)       /* SVS and SVM low side Delay expired interrupt flag */
2991
#define SVMLIFG_L              (0x0002)       /* SVM low side interrupt flag */
2992
#define SVMLVLRIFG_L           (0x0004)       /* SVM low side Voltage Level Reached interrupt flag */
2993
#define SVSMHDLYIFG_L          (0x0010)       /* SVS and SVM high side Delay expired interrupt flag */
2994
#define SVMHIFG_L              (0x0020)       /* SVM high side interrupt flag */
2995
#define SVMHVLRIFG_L           (0x0040)       /* SVM high side Voltage Level Reached interrupt flag */
2996
 
2997
/* PMMIFG Control Bits */
2998
#define PMMBORIFG_H            (0x0001)       /* PMM Software BOR interrupt flag */
2999
#define PMMRSTIFG_H            (0x0002)       /* PMM RESET pin interrupt flag */
3000
#define PMMPORIFG_H            (0x0004)       /* PMM Software POR interrupt flag */
3001
#define SVSHIFG_H              (0x0010)       /* SVS low side interrupt flag */
3002
#define SVSLIFG_H              (0x0020)       /* SVS high side interrupt flag */
3003
#define PMMLPM5IFG_H           (0x0080)       /* LPM5 indication Flag */
3004
 
3005
#define PMMRSTLPM5IFG          PMMLPM5IFG     /* LPM5 indication Flag */
3006
 
3007
/* PMMIE and RESET Control Bits */
3008
#define SVSMLDLYIE             (0x0001)       /* SVS and SVM low side Delay expired interrupt enable */
3009
#define SVMLIE                 (0x0002)       /* SVM low side interrupt enable */
3010
#define SVMLVLRIE              (0x0004)       /* SVM low side Voltage Level Reached interrupt enable */
3011
#define SVSMHDLYIE             (0x0010)       /* SVS and SVM high side Delay expired interrupt enable */
3012
#define SVMHIE                 (0x0020)       /* SVM high side interrupt enable */
3013
#define SVMHVLRIE              (0x0040)       /* SVM high side Voltage Level Reached interrupt enable */
3014
#define SVSLPE                 (0x0100)       /* SVS low side POR enable */
3015
#define SVMLVLRPE              (0x0200)       /* SVM low side Voltage Level reached POR enable */
3016
#define SVSHPE                 (0x1000)       /* SVS high side POR enable */
3017
#define SVMHVLRPE              (0x2000)       /* SVM high side Voltage Level reached POR enable */
3018
 
3019
/* PMMIE and RESET Control Bits */
3020
#define SVSMLDLYIE_L           (0x0001)       /* SVS and SVM low side Delay expired interrupt enable */
3021
#define SVMLIE_L               (0x0002)       /* SVM low side interrupt enable */
3022
#define SVMLVLRIE_L            (0x0004)       /* SVM low side Voltage Level Reached interrupt enable */
3023
#define SVSMHDLYIE_L           (0x0010)       /* SVS and SVM high side Delay expired interrupt enable */
3024
#define SVMHIE_L               (0x0020)       /* SVM high side interrupt enable */
3025
#define SVMHVLRIE_L            (0x0040)       /* SVM high side Voltage Level Reached interrupt enable */
3026
 
3027
/* PMMIE and RESET Control Bits */
3028
#define SVSLPE_H               (0x0001)       /* SVS low side POR enable */
3029
#define SVMLVLRPE_H            (0x0002)       /* SVM low side Voltage Level reached POR enable */
3030
#define SVSHPE_H               (0x0010)       /* SVS high side POR enable */
3031
#define SVMHVLRPE_H            (0x0020)       /* SVM high side Voltage Level reached POR enable */
3032
 
3033
/* PM5CTL0 Power Mode 5 Control Bits */
3034
#define LOCKLPM5               (0x0001)       /* Lock I/O pin configuration upon entry/exit to/from LPM5 */
3035
 
3036
/* PM5CTL0 Power Mode 5 Control Bits */
3037
#define LOCKLPM5_L             (0x0001)       /* Lock I/O pin configuration upon entry/exit to/from LPM5 */
3038
 
3039
/* PM5CTL0 Power Mode 5 Control Bits */
3040
#define LOCKIO                 LOCKLPM5       /* Lock I/O pin configuration upon entry/exit to/from LPM5 */
3041
 
3042
/*************************************************************
3043
* RAM Control Module
3044
*************************************************************/
3045
#define __MSP430_HAS_RC__                     /* Definition to show that Module is available */
3046
#define __MSP430_BASEADDRESS_RC__ 0x0158
3047
 
3048
SFR_16BIT(RCCTL0);                            /* Ram Controller Control Register */
3049
SFR_8BIT(RCCTL0_L);                           /* Ram Controller Control Register */
3050
SFR_8BIT(RCCTL0_H);                           /* Ram Controller Control Register */
3051
 
3052
/* RCCTL0 Control Bits */
3053
#define RCRS0OFF               (0x0001)       /* RAM Controller RAM Sector 0 Off */
3054
#define RCRS1OFF               (0x0002)       /* RAM Controller RAM Sector 1 Off */
3055
#define RCRS2OFF               (0x0004)       /* RAM Controller RAM Sector 2 Off */
3056
#define RCRS3OFF               (0x0008)       /* RAM Controller RAM Sector 3 Off */
3057
#define RCRS7OFF               (0x0080)       /* RAM Controller RAM Sector 7 (USB) Off */
3058
 
3059
/* RCCTL0 Control Bits */
3060
#define RCRS0OFF_L             (0x0001)       /* RAM Controller RAM Sector 0 Off */
3061
#define RCRS1OFF_L             (0x0002)       /* RAM Controller RAM Sector 1 Off */
3062
#define RCRS2OFF_L             (0x0004)       /* RAM Controller RAM Sector 2 Off */
3063
#define RCRS3OFF_L             (0x0008)       /* RAM Controller RAM Sector 3 Off */
3064
#define RCRS7OFF_L             (0x0080)       /* RAM Controller RAM Sector 7 (USB) Off */
3065
 
3066
/* RCCTL0 Control Bits */
3067
 
3068
#define RCKEY                  (0x5A00)
3069
 
3070
/************************************************************
3071
* Shared Reference
3072
************************************************************/
3073
#define __MSP430_HAS_REF__                    /* Definition to show that Module is available */
3074
#define __MSP430_BASEADDRESS_REF__ 0x01B0
3075
 
3076
SFR_16BIT(REFCTL0);                           /* REF Shared Reference control register 0 */
3077
SFR_8BIT(REFCTL0_L);                          /* REF Shared Reference control register 0 */
3078
SFR_8BIT(REFCTL0_H);                          /* REF Shared Reference control register 0 */
3079
 
3080
/* REFCTL0 Control Bits */
3081
#define REFON                  (0x0001)       /* REF Reference On */
3082
#define REFOUT                 (0x0002)       /* REF Reference output Buffer On */
3083
//#define RESERVED            (0x0004)  /* Reserved */
3084
#define REFTCOFF               (0x0008)       /* REF Temp.Sensor off */
3085
#define REFVSEL0               (0x0010)       /* REF Reference Voltage Level Select Bit:0 */
3086
#define REFVSEL1               (0x0020)       /* REF Reference Voltage Level Select Bit:1 */
3087
//#define RESERVED            (0x0040)  /* Reserved */
3088
#define REFMSTR                (0x0080)       /* REF Master Control */
3089
#define REFGENACT              (0x0100)       /* REF Reference generator active */
3090
#define REFBGACT               (0x0200)       /* REF Reference bandgap active */
3091
#define REFGENBUSY             (0x0400)       /* REF Reference generator busy */
3092
#define BGMODE                 (0x0800)       /* REF Bandgap mode */
3093
//#define RESERVED            (0x1000)  /* Reserved */
3094
//#define RESERVED            (0x2000)  /* Reserved */
3095
//#define RESERVED            (0x4000)  /* Reserved */
3096
//#define RESERVED            (0x8000)  /* Reserved */
3097
 
3098
/* REFCTL0 Control Bits */
3099
#define REFON_L                (0x0001)       /* REF Reference On */
3100
#define REFOUT_L               (0x0002)       /* REF Reference output Buffer On */
3101
//#define RESERVED            (0x0004)  /* Reserved */
3102
#define REFTCOFF_L             (0x0008)       /* REF Temp.Sensor off */
3103
#define REFVSEL0_L             (0x0010)       /* REF Reference Voltage Level Select Bit:0 */
3104
#define REFVSEL1_L             (0x0020)       /* REF Reference Voltage Level Select Bit:1 */
3105
//#define RESERVED            (0x0040)  /* Reserved */
3106
#define REFMSTR_L              (0x0080)       /* REF Master Control */
3107
//#define RESERVED            (0x1000)  /* Reserved */
3108
//#define RESERVED            (0x2000)  /* Reserved */
3109
//#define RESERVED            (0x4000)  /* Reserved */
3110
//#define RESERVED            (0x8000)  /* Reserved */
3111
 
3112
/* REFCTL0 Control Bits */
3113
//#define RESERVED            (0x0004)  /* Reserved */
3114
//#define RESERVED            (0x0040)  /* Reserved */
3115
#define REFGENACT_H            (0x0001)       /* REF Reference generator active */
3116
#define REFBGACT_H             (0x0002)       /* REF Reference bandgap active */
3117
#define REFGENBUSY_H           (0x0004)       /* REF Reference generator busy */
3118
#define BGMODE_H               (0x0008)       /* REF Bandgap mode */
3119
//#define RESERVED            (0x1000)  /* Reserved */
3120
//#define RESERVED            (0x2000)  /* Reserved */
3121
//#define RESERVED            (0x4000)  /* Reserved */
3122
//#define RESERVED            (0x8000)  /* Reserved */
3123
 
3124
#define REFVSEL_0              (0x0000)       /* REF Reference Voltage Level Select 1.5V */
3125
#define REFVSEL_1              (0x0010)       /* REF Reference Voltage Level Select 2.0V */
3126
#define REFVSEL_2              (0x0020)       /* REF Reference Voltage Level Select 2.5V */
3127
#define REFVSEL_3              (0x0030)       /* REF Reference Voltage Level Select 2.5V */
3128
 
3129
/************************************************************
3130
* Real Time Clock
3131
************************************************************/
3132
#define __MSP430_HAS_RTC_B__                  /* Definition to show that Module is available */
3133
#define __MSP430_BASEADDRESS_RTC_B__ 0x04A0
3134
 
3135
SFR_16BIT(RTCCTL01);                          /* Real Timer Control 0/1 */
3136
SFR_8BIT(RTCCTL01_L);                         /* Real Timer Control 0/1 */
3137
SFR_8BIT(RTCCTL01_H);                         /* Real Timer Control 0/1 */
3138
SFR_16BIT(RTCCTL23);                          /* Real Timer Control 2/3 */
3139
SFR_8BIT(RTCCTL23_L);                         /* Real Timer Control 2/3 */
3140
SFR_8BIT(RTCCTL23_H);                         /* Real Timer Control 2/3 */
3141
SFR_16BIT(RTCPS0CTL);                         /* Real Timer Prescale Timer 0 Control */
3142
SFR_8BIT(RTCPS0CTL_L);                        /* Real Timer Prescale Timer 0 Control */
3143
SFR_8BIT(RTCPS0CTL_H);                        /* Real Timer Prescale Timer 0 Control */
3144
SFR_16BIT(RTCPS1CTL);                         /* Real Timer Prescale Timer 1 Control */
3145
SFR_8BIT(RTCPS1CTL_L);                        /* Real Timer Prescale Timer 1 Control */
3146
SFR_8BIT(RTCPS1CTL_H);                        /* Real Timer Prescale Timer 1 Control */
3147
SFR_16BIT(RTCPS);                             /* Real Timer Prescale Timer Control */
3148
SFR_8BIT(RTCPS_L);                            /* Real Timer Prescale Timer Control */
3149
SFR_8BIT(RTCPS_H);                            /* Real Timer Prescale Timer Control */
3150
SFR_16BIT(RTCIV);                             /* Real Time Clock Interrupt Vector */
3151
SFR_16BIT(RTCTIM0);                           /* Real Time Clock Time 0 */
3152
SFR_8BIT(RTCTIM0_L);                          /* Real Time Clock Time 0 */
3153
SFR_8BIT(RTCTIM0_H);                          /* Real Time Clock Time 0 */
3154
SFR_16BIT(RTCTIM1);                           /* Real Time Clock Time 1 */
3155
SFR_8BIT(RTCTIM1_L);                          /* Real Time Clock Time 1 */
3156
SFR_8BIT(RTCTIM1_H);                          /* Real Time Clock Time 1 */
3157
SFR_16BIT(RTCDATE);                           /* Real Time Clock Date */
3158
SFR_8BIT(RTCDATE_L);                          /* Real Time Clock Date */
3159
SFR_8BIT(RTCDATE_H);                          /* Real Time Clock Date */
3160
SFR_16BIT(RTCYEAR);                           /* Real Time Clock Year */
3161
SFR_8BIT(RTCYEAR_L);                          /* Real Time Clock Year */
3162
SFR_8BIT(RTCYEAR_H);                          /* Real Time Clock Year */
3163
SFR_16BIT(RTCAMINHR);                         /* Real Time Clock Alarm Min/Hour */
3164
SFR_8BIT(RTCAMINHR_L);                        /* Real Time Clock Alarm Min/Hour */
3165
SFR_8BIT(RTCAMINHR_H);                        /* Real Time Clock Alarm Min/Hour */
3166
SFR_16BIT(RTCADOWDAY);                        /* Real Time Clock Alarm day of week/day */
3167
SFR_8BIT(RTCADOWDAY_L);                       /* Real Time Clock Alarm day of week/day */
3168
SFR_8BIT(RTCADOWDAY_H);                       /* Real Time Clock Alarm day of week/day */
3169
SFR_16BIT(BIN2BCD);                           /* Real Time Binary-to-BCD conversion register */
3170
SFR_16BIT(BCD2BIN);                           /* Real Time BCD-to-binary conversion register */
3171
 
3172
#define RTCCTL0                RTCCTL01_L     /* Real Time Clock Control 0 */
3173
#define RTCCTL1                RTCCTL01_H     /* Real Time Clock Control 1 */
3174
#define RTCCTL2                RTCCTL23_L     /* Real Time Clock Control 2 */
3175
#define RTCCTL3                RTCCTL23_H     /* Real Time Clock Control 3 */
3176
#define RTCNT12                RTCTIM0
3177
#define RTCNT34                RTCTIM1
3178
#define RTCNT1                 RTCTIM0_L
3179
#define RTCNT2                 RTCTIM0_H
3180
#define RTCNT3                 RTCTIM1_L
3181
#define RTCNT4                 RTCTIM1_H
3182
#define RTCSEC                 RTCTIM0_L
3183
#define RTCMIN                 RTCTIM0_H
3184
#define RTCHOUR                RTCTIM1_L
3185
#define RTCDOW                 RTCTIM1_H
3186
#define RTCDAY                 RTCDATE_L
3187
#define RTCMON                 RTCDATE_H
3188
#define RTCYEARL               RTCYEAR_L
3189
#define RTCYEARH               RTCYEAR_H
3190
#define RT0PS                  RTCPS_L
3191
#define RT1PS                  RTCPS_H
3192
#define RTCAMIN                RTCAMINHR_L    /* Real Time Clock Alarm Min */
3193
#define RTCAHOUR               RTCAMINHR_H    /* Real Time Clock Alarm Hour */
3194
#define RTCADOW                RTCADOWDAY_L   /* Real Time Clock Alarm day of week */
3195
#define RTCADAY                RTCADOWDAY_H   /* Real Time Clock Alarm day */
3196
 
3197
/* RTCCTL01 Control Bits */
3198
#define RTCBCD                 (0x8000)       /* RTC BCD  0:Binary / 1:BCD */
3199
#define RTCHOLD                (0x4000)       /* RTC Hold */
3200
//#define RESERVED            (0x2000)     /* RESERVED */
3201
#define RTCRDY                 (0x1000)       /* RTC Ready */
3202
//#define RESERVED            (0x0800)     /* RESERVED */
3203
//#define RESERVED            (0x0400)     /* RESERVED */
3204
#define RTCTEV1                (0x0200)       /* RTC Time Event 1 */
3205
#define RTCTEV0                (0x0100)       /* RTC Time Event 0 */
3206
#define RTCOFIE                (0x0080)       /* RTC 32kHz cyrstal oscillator fault interrupt enable */
3207
#define RTCTEVIE               (0x0040)       /* RTC Time Event Interrupt Enable Flag */
3208
#define RTCAIE                 (0x0020)       /* RTC Alarm Interrupt Enable Flag */
3209
#define RTCRDYIE               (0x0010)       /* RTC Ready Interrupt Enable Flag */
3210
#define RTCOFIFG               (0x0008)       /* RTC 32kHz cyrstal oscillator fault interrupt flag */
3211
#define RTCTEVIFG              (0x0004)       /* RTC Time Event Interrupt Flag */
3212
#define RTCAIFG                (0x0002)       /* RTC Alarm Interrupt Flag */
3213
#define RTCRDYIFG              (0x0001)       /* RTC Ready Interrupt Flag */
3214
 
3215
/* RTCCTL01 Control Bits */
3216
//#define RESERVED            (0x2000)     /* RESERVED */
3217
//#define RESERVED            (0x0800)     /* RESERVED */
3218
//#define RESERVED            (0x0400)     /* RESERVED */
3219
#define RTCOFIE_L              (0x0080)       /* RTC 32kHz cyrstal oscillator fault interrupt enable */
3220
#define RTCTEVIE_L             (0x0040)       /* RTC Time Event Interrupt Enable Flag */
3221
#define RTCAIE_L               (0x0020)       /* RTC Alarm Interrupt Enable Flag */
3222
#define RTCRDYIE_L             (0x0010)       /* RTC Ready Interrupt Enable Flag */
3223
#define RTCOFIFG_L             (0x0008)       /* RTC 32kHz cyrstal oscillator fault interrupt flag */
3224
#define RTCTEVIFG_L            (0x0004)       /* RTC Time Event Interrupt Flag */
3225
#define RTCAIFG_L              (0x0002)       /* RTC Alarm Interrupt Flag */
3226
#define RTCRDYIFG_L            (0x0001)       /* RTC Ready Interrupt Flag */
3227
 
3228
/* RTCCTL01 Control Bits */
3229
#define RTCBCD_H               (0x0080)       /* RTC BCD  0:Binary / 1:BCD */
3230
#define RTCHOLD_H              (0x0040)       /* RTC Hold */
3231
//#define RESERVED            (0x2000)     /* RESERVED */
3232
#define RTCRDY_H               (0x0010)       /* RTC Ready */
3233
//#define RESERVED            (0x0800)     /* RESERVED */
3234
//#define RESERVED            (0x0400)     /* RESERVED */
3235
#define RTCTEV1_H              (0x0002)       /* RTC Time Event 1 */
3236
#define RTCTEV0_H              (0x0001)       /* RTC Time Event 0 */
3237
 
3238
#define RTCTEV_0               (0x0000)       /* RTC Time Event: 0 (Min. changed) */
3239
#define RTCTEV_1               (0x0100)       /* RTC Time Event: 1 (Hour changed) */
3240
#define RTCTEV_2               (0x0200)       /* RTC Time Event: 2 (12:00 changed) */
3241
#define RTCTEV_3               (0x0300)       /* RTC Time Event: 3 (00:00 changed) */
3242
#define RTCTEV__MIN            (0x0000)       /* RTC Time Event: 0 (Min. changed) */
3243
#define RTCTEV__HOUR           (0x0100)       /* RTC Time Event: 1 (Hour changed) */
3244
#define RTCTEV__0000           (0x0200)       /* RTC Time Event: 3 (00:00 changed) */
3245
#define RTCTEV__1200           (0x0300)       /* RTC Time Event: 2 (12:00 changed) */
3246
 
3247
/* RTCCTL23 Control Bits */
3248
#define RTCCALF1               (0x0200)       /* RTC Calibration Frequency Bit 1 */
3249
#define RTCCALF0               (0x0100)       /* RTC Calibration Frequency Bit 0 */
3250
#define RTCCALS                (0x0080)       /* RTC Calibration Sign */
3251
//#define Reserved          (0x0040)
3252
#define RTCCAL5                (0x0020)       /* RTC Calibration Bit 5 */
3253
#define RTCCAL4                (0x0010)       /* RTC Calibration Bit 4 */
3254
#define RTCCAL3                (0x0008)       /* RTC Calibration Bit 3 */
3255
#define RTCCAL2                (0x0004)       /* RTC Calibration Bit 2 */
3256
#define RTCCAL1                (0x0002)       /* RTC Calibration Bit 1 */
3257
#define RTCCAL0                (0x0001)       /* RTC Calibration Bit 0 */
3258
 
3259
/* RTCCTL23 Control Bits */
3260
#define RTCCALS_L              (0x0080)       /* RTC Calibration Sign */
3261
//#define Reserved          (0x0040)
3262
#define RTCCAL5_L              (0x0020)       /* RTC Calibration Bit 5 */
3263
#define RTCCAL4_L              (0x0010)       /* RTC Calibration Bit 4 */
3264
#define RTCCAL3_L              (0x0008)       /* RTC Calibration Bit 3 */
3265
#define RTCCAL2_L              (0x0004)       /* RTC Calibration Bit 2 */
3266
#define RTCCAL1_L              (0x0002)       /* RTC Calibration Bit 1 */
3267
#define RTCCAL0_L              (0x0001)       /* RTC Calibration Bit 0 */
3268
 
3269
/* RTCCTL23 Control Bits */
3270
#define RTCCALF1_H             (0x0002)       /* RTC Calibration Frequency Bit 1 */
3271
#define RTCCALF0_H             (0x0001)       /* RTC Calibration Frequency Bit 0 */
3272
//#define Reserved          (0x0040)
3273
 
3274
#define RTCCALF_0              (0x0000)       /* RTC Calibration Frequency: No Output */
3275
#define RTCCALF_1              (0x0100)       /* RTC Calibration Frequency: 512 Hz */
3276
#define RTCCALF_2              (0x0200)       /* RTC Calibration Frequency: 256 Hz */
3277
#define RTCCALF_3              (0x0300)       /* RTC Calibration Frequency: 1 Hz */
3278
 
3279
/* RTCPS0CTL Control Bits */
3280
//#define Reserved          (0x0080)
3281
//#define Reserved          (0x0040)
3282
//#define Reserved          (0x0020)
3283
#define RT0IP2                 (0x0010)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 2 */
3284
#define RT0IP1                 (0x0008)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 1 */
3285
#define RT0IP0                 (0x0004)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 0 */
3286
#define RT0PSIE                (0x0002)       /* RTC Prescale Timer 0 Interrupt Enable Flag */
3287
#define RT0PSIFG               (0x0001)       /* RTC Prescale Timer 0 Interrupt Flag */
3288
 
3289
/* RTCPS0CTL Control Bits */
3290
//#define Reserved          (0x0080)
3291
//#define Reserved          (0x0040)
3292
//#define Reserved          (0x0020)
3293
#define RT0IP2_L               (0x0010)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 2 */
3294
#define RT0IP1_L               (0x0008)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 1 */
3295
#define RT0IP0_L               (0x0004)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 0 */
3296
#define RT0PSIE_L              (0x0002)       /* RTC Prescale Timer 0 Interrupt Enable Flag */
3297
#define RT0PSIFG_L             (0x0001)       /* RTC Prescale Timer 0 Interrupt Flag */
3298
 
3299
/* RTCPS0CTL Control Bits */
3300
//#define Reserved          (0x0080)
3301
//#define Reserved          (0x0040)
3302
//#define Reserved          (0x0020)
3303
 
3304
#define RT0IP_0                (0x0000)       /* RTC Prescale Timer 0 Interrupt Interval /2 */
3305
#define RT0IP_1                (0x0004)       /* RTC Prescale Timer 0 Interrupt Interval /4 */
3306
#define RT0IP_2                (0x0008)       /* RTC Prescale Timer 0 Interrupt Interval /8 */
3307
#define RT0IP_3                (0x000C)       /* RTC Prescale Timer 0 Interrupt Interval /16 */
3308
#define RT0IP_4                (0x0010)       /* RTC Prescale Timer 0 Interrupt Interval /32 */
3309
#define RT0IP_5                (0x0014)       /* RTC Prescale Timer 0 Interrupt Interval /64 */
3310
#define RT0IP_6                (0x0018)       /* RTC Prescale Timer 0 Interrupt Interval /128 */
3311
#define RT0IP_7                (0x001C)       /* RTC Prescale Timer 0 Interrupt Interval /256 */
3312
 
3313
#define RT0IP__2               (0x0000)       /* RTC Prescale Timer 0 Interrupt Interval /2 */
3314
#define RT0IP__4               (0x0004)       /* RTC Prescale Timer 0 Interrupt Interval /4 */
3315
#define RT0IP__8               (0x0008)       /* RTC Prescale Timer 0 Interrupt Interval /8 */
3316
#define RT0IP__16              (0x000C)       /* RTC Prescale Timer 0 Interrupt Interval /16 */
3317
#define RT0IP__32              (0x0010)       /* RTC Prescale Timer 0 Interrupt Interval /32 */
3318
#define RT0IP__64              (0x0014)       /* RTC Prescale Timer 0 Interrupt Interval /64 */
3319
#define RT0IP__128             (0x0018)       /* RTC Prescale Timer 0 Interrupt Interval /128 */
3320
#define RT0IP__256             (0x001C)       /* RTC Prescale Timer 0 Interrupt Interval /256 */
3321
 
3322
/* RTCPS1CTL Control Bits */
3323
//#define Reserved          (0x0080)
3324
//#define Reserved          (0x0040)
3325
//#define Reserved          (0x0020)
3326
#define RT1IP2                 (0x0010)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 2 */
3327
#define RT1IP1                 (0x0008)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 1 */
3328
#define RT1IP0                 (0x0004)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 0 */
3329
#define RT1PSIE                (0x0002)       /* RTC Prescale Timer 1 Interrupt Enable Flag */
3330
#define RT1PSIFG               (0x0001)       /* RTC Prescale Timer 1 Interrupt Flag */
3331
 
3332
/* RTCPS1CTL Control Bits */
3333
//#define Reserved          (0x0080)
3334
//#define Reserved          (0x0040)
3335
//#define Reserved          (0x0020)
3336
#define RT1IP2_L               (0x0010)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 2 */
3337
#define RT1IP1_L               (0x0008)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 1 */
3338
#define RT1IP0_L               (0x0004)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 0 */
3339
#define RT1PSIE_L              (0x0002)       /* RTC Prescale Timer 1 Interrupt Enable Flag */
3340
#define RT1PSIFG_L             (0x0001)       /* RTC Prescale Timer 1 Interrupt Flag */
3341
 
3342
/* RTCPS1CTL Control Bits */
3343
//#define Reserved          (0x0080)
3344
//#define Reserved          (0x0040)
3345
//#define Reserved          (0x0020)
3346
 
3347
#define RT1IP_0                (0x0000)       /* RTC Prescale Timer 1 Interrupt Interval /2 */
3348
#define RT1IP_1                (0x0004)       /* RTC Prescale Timer 1 Interrupt Interval /4 */
3349
#define RT1IP_2                (0x0008)       /* RTC Prescale Timer 1 Interrupt Interval /8 */
3350
#define RT1IP_3                (0x000C)       /* RTC Prescale Timer 1 Interrupt Interval /16 */
3351
#define RT1IP_4                (0x0010)       /* RTC Prescale Timer 1 Interrupt Interval /32 */
3352
#define RT1IP_5                (0x0014)       /* RTC Prescale Timer 1 Interrupt Interval /64 */
3353
#define RT1IP_6                (0x0018)       /* RTC Prescale Timer 1 Interrupt Interval /128 */
3354
#define RT1IP_7                (0x001C)       /* RTC Prescale Timer 1 Interrupt Interval /256 */
3355
 
3356
#define RT1IP__2               (0x0000)       /* RTC Prescale Timer 1 Interrupt Interval /2 */
3357
#define RT1IP__4               (0x0004)       /* RTC Prescale Timer 1 Interrupt Interval /4 */
3358
#define RT1IP__8               (0x0008)       /* RTC Prescale Timer 1 Interrupt Interval /8 */
3359
#define RT1IP__16              (0x000C)       /* RTC Prescale Timer 1 Interrupt Interval /16 */
3360
#define RT1IP__32              (0x0010)       /* RTC Prescale Timer 1 Interrupt Interval /32 */
3361
#define RT1IP__64              (0x0014)       /* RTC Prescale Timer 1 Interrupt Interval /64 */
3362
#define RT1IP__128             (0x0018)       /* RTC Prescale Timer 1 Interrupt Interval /128 */
3363
#define RT1IP__256             (0x001C)       /* RTC Prescale Timer 1 Interrupt Interval /256 */
3364
 
3365
/* RTC Definitions */
3366
#define RTCIV_NONE             (0x0000)       /* No Interrupt pending */
3367
#define RTCIV_RTCRDYIFG        (0x0002)       /* RTC ready: RTCRDYIFG */
3368
#define RTCIV_RTCTEVIFG        (0x0004)       /* RTC interval timer: RTCTEVIFG */
3369
#define RTCIV_RTCAIFG          (0x0006)       /* RTC user alarm: RTCAIFG */
3370
#define RTCIV_RT0PSIFG         (0x0008)       /* RTC prescaler 0: RT0PSIFG */
3371
#define RTCIV_RT1PSIFG         (0x000A)       /* RTC prescaler 1: RT1PSIFG */
3372
#define RTCIV_RTCOFIFG         (0x000C)       /* RTC Oscillator fault */
3373
 
3374
/* Legacy Definitions */
3375
#define RTC_NONE               (0x0000)       /* No Interrupt pending */
3376
#define RTC_RTCRDYIFG          (0x0002)       /* RTC ready: RTCRDYIFG */
3377
#define RTC_RTCTEVIFG          (0x0004)       /* RTC interval timer: RTCTEVIFG */
3378
#define RTC_RTCAIFG            (0x0006)       /* RTC user alarm: RTCAIFG */
3379
#define RTC_RT0PSIFG           (0x0008)       /* RTC prescaler 0: RT0PSIFG */
3380
#define RTC_RT1PSIFG           (0x000A)       /* RTC prescaler 1: RT1PSIFG */
3381
#define RTC_RTCOFIFG           (0x000C)       /* RTC Oscillator fault */
3382
 
3383
/************************************************************
3384
* SFR - Special Function Register Module
3385
************************************************************/
3386
#define __MSP430_HAS_SFR__                    /* Definition to show that Module is available */
3387
#define __MSP430_BASEADDRESS_SFR__ 0x0100
3388
 
3389
SFR_16BIT(SFRIE1);                            /* Interrupt Enable 1 */
3390
SFR_8BIT(SFRIE1_L);                           /* Interrupt Enable 1 */
3391
SFR_8BIT(SFRIE1_H);                           /* Interrupt Enable 1 */
3392
 
3393
/* SFRIE1 Control Bits */
3394
#define WDTIE                  (0x0001)       /* WDT Interrupt Enable */
3395
#define OFIE                   (0x0002)       /* Osc Fault Enable */
3396
//#define Reserved          (0x0004)
3397
#define VMAIE                  (0x0008)       /* Vacant Memory Interrupt Enable */
3398
#define NMIIE                  (0x0010)       /* NMI Interrupt Enable */
3399
#define ACCVIE                 (0x0020)       /* Flash Access Violation Interrupt Enable */
3400
#define JMBINIE                (0x0040)       /* JTAG Mail Box input Interrupt Enable */
3401
#define JMBOUTIE               (0x0080)       /* JTAG Mail Box output Interrupt Enable */
3402
 
3403
#define WDTIE_L                (0x0001)       /* WDT Interrupt Enable */
3404
#define OFIE_L                 (0x0002)       /* Osc Fault Enable */
3405
//#define Reserved          (0x0004)
3406
#define VMAIE_L                (0x0008)       /* Vacant Memory Interrupt Enable */
3407
#define NMIIE_L                (0x0010)       /* NMI Interrupt Enable */
3408
#define ACCVIE_L               (0x0020)       /* Flash Access Violation Interrupt Enable */
3409
#define JMBINIE_L              (0x0040)       /* JTAG Mail Box input Interrupt Enable */
3410
#define JMBOUTIE_L             (0x0080)       /* JTAG Mail Box output Interrupt Enable */
3411
 
3412
//#define Reserved          (0x0004)
3413
 
3414
SFR_16BIT(SFRIFG1);                           /* Interrupt Flag 1 */
3415
SFR_8BIT(SFRIFG1_L);                          /* Interrupt Flag 1 */
3416
SFR_8BIT(SFRIFG1_H);                          /* Interrupt Flag 1 */
3417
/* SFRIFG1 Control Bits */
3418
#define WDTIFG                 (0x0001)       /* WDT Interrupt Flag */
3419
#define OFIFG                  (0x0002)       /* Osc Fault Flag */
3420
//#define Reserved          (0x0004)
3421
#define VMAIFG                 (0x0008)       /* Vacant Memory Interrupt Flag */
3422
#define NMIIFG                 (0x0010)       /* NMI Interrupt Flag */
3423
//#define Reserved          (0x0020)
3424
#define JMBINIFG               (0x0040)       /* JTAG Mail Box input Interrupt Flag */
3425
#define JMBOUTIFG              (0x0080)       /* JTAG Mail Box output Interrupt Flag */
3426
 
3427
#define WDTIFG_L               (0x0001)       /* WDT Interrupt Flag */
3428
#define OFIFG_L                (0x0002)       /* Osc Fault Flag */
3429
//#define Reserved          (0x0004)
3430
#define VMAIFG_L               (0x0008)       /* Vacant Memory Interrupt Flag */
3431
#define NMIIFG_L               (0x0010)       /* NMI Interrupt Flag */
3432
//#define Reserved          (0x0020)
3433
#define JMBINIFG_L             (0x0040)       /* JTAG Mail Box input Interrupt Flag */
3434
#define JMBOUTIFG_L            (0x0080)       /* JTAG Mail Box output Interrupt Flag */
3435
 
3436
//#define Reserved          (0x0004)
3437
//#define Reserved          (0x0020)
3438
 
3439
SFR_16BIT(SFRRPCR);                           /* RESET Pin Control Register */
3440
SFR_8BIT(SFRRPCR_L);                          /* RESET Pin Control Register */
3441
SFR_8BIT(SFRRPCR_H);                          /* RESET Pin Control Register */
3442
/* SFRRPCR Control Bits */
3443
#define SYSNMI                 (0x0001)       /* NMI select */
3444
#define SYSNMIIES              (0x0002)       /* NMI edge select */
3445
#define SYSRSTUP               (0x0004)       /* RESET Pin pull down/up select */
3446
#define SYSRSTRE               (0x0008)       /* RESET Pin Resistor enable */
3447
 
3448
#define SYSNMI_L               (0x0001)       /* NMI select */
3449
#define SYSNMIIES_L            (0x0002)       /* NMI edge select */
3450
#define SYSRSTUP_L             (0x0004)       /* RESET Pin pull down/up select */
3451
#define SYSRSTRE_L             (0x0008)       /* RESET Pin Resistor enable */
3452
 
3453
/************************************************************
3454
* SYS - System Module
3455
************************************************************/
3456
#define __MSP430_HAS_SYS__                    /* Definition to show that Module is available */
3457
#define __MSP430_BASEADDRESS_SYS__ 0x0180
3458
 
3459
SFR_16BIT(SYSCTL);                            /* System control */
3460
SFR_8BIT(SYSCTL_L);                           /* System control */
3461
SFR_8BIT(SYSCTL_H);                           /* System control */
3462
SFR_16BIT(SYSBSLC);                           /* Boot strap configuration area */
3463
SFR_8BIT(SYSBSLC_L);                          /* Boot strap configuration area */
3464
SFR_8BIT(SYSBSLC_H);                          /* Boot strap configuration area */
3465
SFR_16BIT(SYSJMBC);                           /* JTAG mailbox control */
3466
SFR_8BIT(SYSJMBC_L);                          /* JTAG mailbox control */
3467
SFR_8BIT(SYSJMBC_H);                          /* JTAG mailbox control */
3468
SFR_16BIT(SYSJMBI0);                          /* JTAG mailbox input 0 */
3469
SFR_8BIT(SYSJMBI0_L);                         /* JTAG mailbox input 0 */
3470
SFR_8BIT(SYSJMBI0_H);                         /* JTAG mailbox input 0 */
3471
SFR_16BIT(SYSJMBI1);                          /* JTAG mailbox input 1 */
3472
SFR_8BIT(SYSJMBI1_L);                         /* JTAG mailbox input 1 */
3473
SFR_8BIT(SYSJMBI1_H);                         /* JTAG mailbox input 1 */
3474
SFR_16BIT(SYSJMBO0);                          /* JTAG mailbox output 0 */
3475
SFR_8BIT(SYSJMBO0_L);                         /* JTAG mailbox output 0 */
3476
SFR_8BIT(SYSJMBO0_H);                         /* JTAG mailbox output 0 */
3477
SFR_16BIT(SYSJMBO1);                          /* JTAG mailbox output 1 */
3478
SFR_8BIT(SYSJMBO1_L);                         /* JTAG mailbox output 1 */
3479
SFR_8BIT(SYSJMBO1_H);                         /* JTAG mailbox output 1 */
3480
 
3481
SFR_16BIT(SYSBERRIV);                         /* Bus Error vector generator */
3482
SFR_8BIT(SYSBERRIV_L);                        /* Bus Error vector generator */
3483
SFR_8BIT(SYSBERRIV_H);                        /* Bus Error vector generator */
3484
SFR_16BIT(SYSUNIV);                           /* User NMI vector generator */
3485
SFR_8BIT(SYSUNIV_L);                          /* User NMI vector generator */
3486
SFR_8BIT(SYSUNIV_H);                          /* User NMI vector generator */
3487
SFR_16BIT(SYSSNIV);                           /* System NMI vector generator */
3488
SFR_8BIT(SYSSNIV_L);                          /* System NMI vector generator */
3489
SFR_8BIT(SYSSNIV_H);                          /* System NMI vector generator */
3490
SFR_16BIT(SYSRSTIV);                          /* Reset vector generator */
3491
SFR_8BIT(SYSRSTIV_L);                         /* Reset vector generator */
3492
SFR_8BIT(SYSRSTIV_H);                         /* Reset vector generator */
3493
 
3494
/* SYSCTL Control Bits */
3495
#define SYSRIVECT              (0x0001)       /* SYS - RAM based interrupt vectors */
3496
//#define RESERVED            (0x0002)  /* SYS - Reserved */
3497
#define SYSPMMPE               (0x0004)       /* SYS - PMM access protect */
3498
//#define RESERVED            (0x0008)  /* SYS - Reserved */
3499
#define SYSBSLIND              (0x0010)       /* SYS - TCK/RST indication detected */
3500
#define SYSJTAGPIN             (0x0020)       /* SYS - Dedicated JTAG pins enabled */
3501
//#define RESERVED            (0x0040)  /* SYS - Reserved */
3502
//#define RESERVED            (0x0080)  /* SYS - Reserved */
3503
//#define RESERVED            (0x0100)  /* SYS - Reserved */
3504
//#define RESERVED            (0x0200)  /* SYS - Reserved */
3505
//#define RESERVED            (0x0400)  /* SYS - Reserved */
3506
//#define RESERVED            (0x0800)  /* SYS - Reserved */
3507
//#define RESERVED            (0x1000)  /* SYS - Reserved */
3508
//#define RESERVED            (0x2000)  /* SYS - Reserved */
3509
//#define RESERVED            (0x4000)  /* SYS - Reserved */
3510
//#define RESERVED            (0x8000)  /* SYS - Reserved */
3511
 
3512
/* SYSCTL Control Bits */
3513
#define SYSRIVECT_L            (0x0001)       /* SYS - RAM based interrupt vectors */
3514
//#define RESERVED            (0x0002)  /* SYS - Reserved */
3515
#define SYSPMMPE_L             (0x0004)       /* SYS - PMM access protect */
3516
//#define RESERVED            (0x0008)  /* SYS - Reserved */
3517
#define SYSBSLIND_L            (0x0010)       /* SYS - TCK/RST indication detected */
3518
#define SYSJTAGPIN_L           (0x0020)       /* SYS - Dedicated JTAG pins enabled */
3519
//#define RESERVED            (0x0040)  /* SYS - Reserved */
3520
//#define RESERVED            (0x0080)  /* SYS - Reserved */
3521
//#define RESERVED            (0x0100)  /* SYS - Reserved */
3522
//#define RESERVED            (0x0200)  /* SYS - Reserved */
3523
//#define RESERVED            (0x0400)  /* SYS - Reserved */
3524
//#define RESERVED            (0x0800)  /* SYS - Reserved */
3525
//#define RESERVED            (0x1000)  /* SYS - Reserved */
3526
//#define RESERVED            (0x2000)  /* SYS - Reserved */
3527
//#define RESERVED            (0x4000)  /* SYS - Reserved */
3528
//#define RESERVED            (0x8000)  /* SYS - Reserved */
3529
 
3530
/* SYSCTL Control Bits */
3531
//#define RESERVED            (0x0002)  /* SYS - Reserved */
3532
//#define RESERVED            (0x0008)  /* SYS - Reserved */
3533
//#define RESERVED            (0x0040)  /* SYS - Reserved */
3534
//#define RESERVED            (0x0080)  /* SYS - Reserved */
3535
//#define RESERVED            (0x0100)  /* SYS - Reserved */
3536
//#define RESERVED            (0x0200)  /* SYS - Reserved */
3537
//#define RESERVED            (0x0400)  /* SYS - Reserved */
3538
//#define RESERVED            (0x0800)  /* SYS - Reserved */
3539
//#define RESERVED            (0x1000)  /* SYS - Reserved */
3540
//#define RESERVED            (0x2000)  /* SYS - Reserved */
3541
//#define RESERVED            (0x4000)  /* SYS - Reserved */
3542
//#define RESERVED            (0x8000)  /* SYS - Reserved */
3543
 
3544
/* SYSBSLC Control Bits */
3545
#define SYSBSLSIZE0            (0x0001)       /* SYS - BSL Protection Size 0 */
3546
#define SYSBSLSIZE1            (0x0002)       /* SYS - BSL Protection Size 1 */
3547
#define SYSBSLR                (0x0004)       /* SYS - RAM assigned to BSL */
3548
//#define RESERVED            (0x0008)  /* SYS - Reserved */
3549
//#define RESERVED            (0x0010)  /* SYS - Reserved */
3550
//#define RESERVED            (0x0020)  /* SYS - Reserved */
3551
//#define RESERVED            (0x0040)  /* SYS - Reserved */
3552
//#define RESERVED            (0x0080)  /* SYS - Reserved */
3553
//#define RESERVED            (0x0100)  /* SYS - Reserved */
3554
//#define RESERVED            (0x0200)  /* SYS - Reserved */
3555
//#define RESERVED            (0x0400)  /* SYS - Reserved */
3556
//#define RESERVED            (0x0800)  /* SYS - Reserved */
3557
//#define RESERVED            (0x1000)  /* SYS - Reserved */
3558
//#define RESERVED            (0x2000)  /* SYS - Reserved */
3559
#define SYSBSLOFF              (0x4000)       /* SYS - BSL Memeory disabled */
3560
#define SYSBSLPE               (0x8000)       /* SYS - BSL Memory protection enabled */
3561
 
3562
/* SYSBSLC Control Bits */
3563
#define SYSBSLSIZE0_L          (0x0001)       /* SYS - BSL Protection Size 0 */
3564
#define SYSBSLSIZE1_L          (0x0002)       /* SYS - BSL Protection Size 1 */
3565
#define SYSBSLR_L              (0x0004)       /* SYS - RAM assigned to BSL */
3566
//#define RESERVED            (0x0008)  /* SYS - Reserved */
3567
//#define RESERVED            (0x0010)  /* SYS - Reserved */
3568
//#define RESERVED            (0x0020)  /* SYS - Reserved */
3569
//#define RESERVED            (0x0040)  /* SYS - Reserved */
3570
//#define RESERVED            (0x0080)  /* SYS - Reserved */
3571
//#define RESERVED            (0x0100)  /* SYS - Reserved */
3572
//#define RESERVED            (0x0200)  /* SYS - Reserved */
3573
//#define RESERVED            (0x0400)  /* SYS - Reserved */
3574
//#define RESERVED            (0x0800)  /* SYS - Reserved */
3575
//#define RESERVED            (0x1000)  /* SYS - Reserved */
3576
//#define RESERVED            (0x2000)  /* SYS - Reserved */
3577
 
3578
/* SYSBSLC Control Bits */
3579
//#define RESERVED            (0x0008)  /* SYS - Reserved */
3580
//#define RESERVED            (0x0010)  /* SYS - Reserved */
3581
//#define RESERVED            (0x0020)  /* SYS - Reserved */
3582
//#define RESERVED            (0x0040)  /* SYS - Reserved */
3583
//#define RESERVED            (0x0080)  /* SYS - Reserved */
3584
//#define RESERVED            (0x0100)  /* SYS - Reserved */
3585
//#define RESERVED            (0x0200)  /* SYS - Reserved */
3586
//#define RESERVED            (0x0400)  /* SYS - Reserved */
3587
//#define RESERVED            (0x0800)  /* SYS - Reserved */
3588
//#define RESERVED            (0x1000)  /* SYS - Reserved */
3589
//#define RESERVED            (0x2000)  /* SYS - Reserved */
3590
#define SYSBSLOFF_H            (0x0040)       /* SYS - BSL Memeory disabled */
3591
#define SYSBSLPE_H             (0x0080)       /* SYS - BSL Memory protection enabled */
3592
 
3593
/* SYSJMBC Control Bits */
3594
#define JMBIN0FG               (0x0001)       /* SYS - Incoming JTAG Mailbox 0 Flag */
3595
#define JMBIN1FG               (0x0002)       /* SYS - Incoming JTAG Mailbox 1 Flag */
3596
#define JMBOUT0FG              (0x0004)       /* SYS - Outgoing JTAG Mailbox 0 Flag */
3597
#define JMBOUT1FG              (0x0008)       /* SYS - Outgoing JTAG Mailbox 1 Flag */
3598
#define JMBMODE                (0x0010)       /* SYS - JMB 16/32 Bit Mode */
3599
//#define RESERVED            (0x0020)  /* SYS - Reserved */
3600
#define JMBCLR0OFF             (0x0040)       /* SYS - Incoming JTAG Mailbox 0 Flag auto-clear disalbe */
3601
#define JMBCLR1OFF             (0x0080)       /* SYS - Incoming JTAG Mailbox 1 Flag auto-clear disalbe */
3602
//#define RESERVED            (0x0100)  /* SYS - Reserved */
3603
//#define RESERVED            (0x0200)  /* SYS - Reserved */
3604
//#define RESERVED            (0x0400)  /* SYS - Reserved */
3605
//#define RESERVED            (0x0800)  /* SYS - Reserved */
3606
//#define RESERVED            (0x1000)  /* SYS - Reserved */
3607
//#define RESERVED            (0x2000)  /* SYS - Reserved */
3608
//#define RESERVED            (0x4000)  /* SYS - Reserved */
3609
//#define RESERVED            (0x8000)  /* SYS - Reserved */
3610
 
3611
/* SYSJMBC Control Bits */
3612
#define JMBIN0FG_L             (0x0001)       /* SYS - Incoming JTAG Mailbox 0 Flag */
3613
#define JMBIN1FG_L             (0x0002)       /* SYS - Incoming JTAG Mailbox 1 Flag */
3614
#define JMBOUT0FG_L            (0x0004)       /* SYS - Outgoing JTAG Mailbox 0 Flag */
3615
#define JMBOUT1FG_L            (0x0008)       /* SYS - Outgoing JTAG Mailbox 1 Flag */
3616
#define JMBMODE_L              (0x0010)       /* SYS - JMB 16/32 Bit Mode */
3617
//#define RESERVED            (0x0020)  /* SYS - Reserved */
3618
#define JMBCLR0OFF_L           (0x0040)       /* SYS - Incoming JTAG Mailbox 0 Flag auto-clear disalbe */
3619
#define JMBCLR1OFF_L           (0x0080)       /* SYS - Incoming JTAG Mailbox 1 Flag auto-clear disalbe */
3620
//#define RESERVED            (0x0100)  /* SYS - Reserved */
3621
//#define RESERVED            (0x0200)  /* SYS - Reserved */
3622
//#define RESERVED            (0x0400)  /* SYS - Reserved */
3623
//#define RESERVED            (0x0800)  /* SYS - Reserved */
3624
//#define RESERVED            (0x1000)  /* SYS - Reserved */
3625
//#define RESERVED            (0x2000)  /* SYS - Reserved */
3626
//#define RESERVED            (0x4000)  /* SYS - Reserved */
3627
//#define RESERVED            (0x8000)  /* SYS - Reserved */
3628
 
3629
/* SYSJMBC Control Bits */
3630
//#define RESERVED            (0x0020)  /* SYS - Reserved */
3631
//#define RESERVED            (0x0100)  /* SYS - Reserved */
3632
//#define RESERVED            (0x0200)  /* SYS - Reserved */
3633
//#define RESERVED            (0x0400)  /* SYS - Reserved */
3634
//#define RESERVED            (0x0800)  /* SYS - Reserved */
3635
//#define RESERVED            (0x1000)  /* SYS - Reserved */
3636
//#define RESERVED            (0x2000)  /* SYS - Reserved */
3637
//#define RESERVED            (0x4000)  /* SYS - Reserved */
3638
//#define RESERVED            (0x8000)  /* SYS - Reserved */
3639
 
3640
/* SYSUNIV Definitions */
3641
#define SYSUNIV_NONE           (0x0000)       /* No Interrupt pending */
3642
#define SYSUNIV_NMIIFG         (0x0002)       /* SYSUNIV : NMIIFG */
3643
#define SYSUNIV_OFIFG          (0x0004)       /* SYSUNIV : Osc. Fail - OFIFG */
3644
#define SYSUNIV_ACCVIFG        (0x0006)       /* SYSUNIV : Access Violation - ACCVIFG */
3645
#define SYSUNIV_BUSIFG         (0x0008)       /* SYSUNIV : Bus Error */
3646
 
3647
/* SYSBERRIV Definitions */
3648
#define SYSBERRIV_NONE         (0x0000)       /* No Interrupt pending */
3649
#define SYSBERRIV_USB          (0x0002)       /* SYSBERRIV : USB Waitstate Error */
3650
 
3651
/* SYSSNIV Definitions */
3652
#define SYSSNIV_NONE           (0x0000)       /* No Interrupt pending */
3653
#define SYSSNIV_SVMLIFG        (0x0002)       /* SYSSNIV : SVMLIFG */
3654
#define SYSSNIV_SVMHIFG        (0x0004)       /* SYSSNIV : SVMHIFG */
3655
#define SYSSNIV_DLYLIFG        (0x0006)       /* SYSSNIV : DLYLIFG */
3656
#define SYSSNIV_DLYHIFG        (0x0008)       /* SYSSNIV : DLYHIFG */
3657
#define SYSSNIV_VMAIFG         (0x000A)       /* SYSSNIV : VMAIFG */
3658
#define SYSSNIV_JMBINIFG       (0x000C)       /* SYSSNIV : JMBINIFG */
3659
#define SYSSNIV_JMBOUTIFG      (0x000E)       /* SYSSNIV : JMBOUTIFG */
3660
#define SYSSNIV_VLRLIFG        (0x0010)       /* SYSSNIV : VLRLIFG */
3661
#define SYSSNIV_VLRHIFG        (0x0012)       /* SYSSNIV : VLRHIFG */
3662
 
3663
/* SYSRSTIV Definitions */
3664
#define SYSRSTIV_NONE          (0x0000)       /* No Interrupt pending */
3665
#define SYSRSTIV_BOR           (0x0002)       /* SYSRSTIV : BOR */
3666
#define SYSRSTIV_RSTNMI        (0x0004)       /* SYSRSTIV : RST/NMI */
3667
#define SYSRSTIV_DOBOR         (0x0006)       /* SYSRSTIV : Do BOR */
3668
#define SYSRSTIV_LPM5WU        (0x0008)       /* SYSRSTIV : Port LPM5 Wake Up */
3669
#define SYSRSTIV_SECYV         (0x000A)       /* SYSRSTIV : Security violation */
3670
#define SYSRSTIV_SVSL          (0x000C)       /* SYSRSTIV : SVSL */
3671
#define SYSRSTIV_SVSH          (0x000E)       /* SYSRSTIV : SVSH */
3672
#define SYSRSTIV_SVML_OVP      (0x0010)       /* SYSRSTIV : SVML_OVP */
3673
#define SYSRSTIV_SVMH_OVP      (0x0012)       /* SYSRSTIV : SVMH_OVP */
3674
#define SYSRSTIV_DOPOR         (0x0014)       /* SYSRSTIV : Do POR */
3675
#define SYSRSTIV_WDTTO         (0x0016)       /* SYSRSTIV : WDT Time out */
3676
#define SYSRSTIV_WDTKEY        (0x0018)       /* SYSRSTIV : WDTKEY violation */
3677
#define SYSRSTIV_KEYV          (0x001A)       /* SYSRSTIV : Flash Key violation */
3678
#define SYSRSTIV_FLLUL         (0x001C)       /* SYSRSTIV : FLL unlock */
3679
#define SYSRSTIV_PERF          (0x001E)       /* SYSRSTIV : peripheral/config area fetch */
3680
#define SYSRSTIV_PMMKEY        (0x0020)       /* SYSRSTIV : PMMKEY violation */
3681
 
3682
/************************************************************
3683
* Timer0_A5
3684
************************************************************/
3685
#define __MSP430_HAS_T0A5__                   /* Definition to show that Module is available */
3686
#define __MSP430_BASEADDRESS_T0A5__ 0x0340
3687
 
3688
SFR_16BIT(TA0CTL);                            /* Timer0_A5 Control */
3689
SFR_16BIT(TA0CCTL0);                          /* Timer0_A5 Capture/Compare Control 0 */
3690
SFR_16BIT(TA0CCTL1);                          /* Timer0_A5 Capture/Compare Control 1 */
3691
SFR_16BIT(TA0CCTL2);                          /* Timer0_A5 Capture/Compare Control 2 */
3692
SFR_16BIT(TA0CCTL3);                          /* Timer0_A5 Capture/Compare Control 3 */
3693
SFR_16BIT(TA0CCTL4);                          /* Timer0_A5 Capture/Compare Control 4 */
3694
SFR_16BIT(TA0R);                              /* Timer0_A5 */
3695
SFR_16BIT(TA0CCR0);                           /* Timer0_A5 Capture/Compare 0 */
3696
SFR_16BIT(TA0CCR1);                           /* Timer0_A5 Capture/Compare 1 */
3697
SFR_16BIT(TA0CCR2);                           /* Timer0_A5 Capture/Compare 2 */
3698
SFR_16BIT(TA0CCR3);                           /* Timer0_A5 Capture/Compare 3 */
3699
SFR_16BIT(TA0CCR4);                           /* Timer0_A5 Capture/Compare 4 */
3700
SFR_16BIT(TA0IV);                             /* Timer0_A5 Interrupt Vector Word */
3701
SFR_16BIT(TA0EX0);                            /* Timer0_A5 Expansion Register 0 */
3702
 
3703
/* TAxCTL Control Bits */
3704
#define TASSEL1                (0x0200)       /* Timer A clock source select 0 */
3705
#define TASSEL0                (0x0100)       /* Timer A clock source select 1 */
3706
#define ID1                    (0x0080)       /* Timer A clock input divider 1 */
3707
#define ID0                    (0x0040)       /* Timer A clock input divider 0 */
3708
#define MC1                    (0x0020)       /* Timer A mode control 1 */
3709
#define MC0                    (0x0010)       /* Timer A mode control 0 */
3710
#define TACLR                  (0x0004)       /* Timer A counter clear */
3711
#define TAIE                   (0x0002)       /* Timer A counter interrupt enable */
3712
#define TAIFG                  (0x0001)       /* Timer A counter interrupt flag */
3713
 
3714
#define MC_0                   (0*0x10u)      /* Timer A mode control: 0 - Stop */
3715
#define MC_1                   (1*0x10u)      /* Timer A mode control: 1 - Up to CCR0 */
3716
#define MC_2                   (2*0x10u)      /* Timer A mode control: 2 - Continous up */
3717
#define MC_3                   (3*0x10u)      /* Timer A mode control: 3 - Up/Down */
3718
#define ID_0                   (0*0x40u)      /* Timer A input divider: 0 - /1 */
3719
#define ID_1                   (1*0x40u)      /* Timer A input divider: 1 - /2 */
3720
#define ID_2                   (2*0x40u)      /* Timer A input divider: 2 - /4 */
3721
#define ID_3                   (3*0x40u)      /* Timer A input divider: 3 - /8 */
3722
#define TASSEL_0               (0*0x100u)     /* Timer A clock source select: 0 - TACLK */
3723
#define TASSEL_1               (1*0x100u)     /* Timer A clock source select: 1 - ACLK  */
3724
#define TASSEL_2               (2*0x100u)     /* Timer A clock source select: 2 - SMCLK */
3725
#define TASSEL_3               (3*0x100u)     /* Timer A clock source select: 3 - INCLK */
3726
#define MC__STOP               (0*0x10u)      /* Timer A mode control: 0 - Stop */
3727
#define MC__UP                 (1*0x10u)      /* Timer A mode control: 1 - Up to CCR0 */
3728
#define MC__CONTINOUS          (2*0x10u)      /* Timer A mode control: 2 - Continous up */
3729
#define MC__UPDOWN             (3*0x10u)      /* Timer A mode control: 3 - Up/Down */
3730
#define ID__1                  (0*0x40u)      /* Timer A input divider: 0 - /1 */
3731
#define ID__2                  (1*0x40u)      /* Timer A input divider: 1 - /2 */
3732
#define ID__4                  (2*0x40u)      /* Timer A input divider: 2 - /4 */
3733
#define ID__8                  (3*0x40u)      /* Timer A input divider: 3 - /8 */
3734
#define TASSEL__TACLK          (0*0x100u)     /* Timer A clock source select: 0 - TACLK */
3735
#define TASSEL__ACLK           (1*0x100u)     /* Timer A clock source select: 1 - ACLK  */
3736
#define TASSEL__SMCLK          (2*0x100u)     /* Timer A clock source select: 2 - SMCLK */
3737
#define TASSEL__INCLK          (3*0x100u)     /* Timer A clock source select: 3 - INCLK */
3738
 
3739
/* TAxCCTLx Control Bits */
3740
#define CM1                    (0x8000)       /* Capture mode 1 */
3741
#define CM0                    (0x4000)       /* Capture mode 0 */
3742
#define CCIS1                  (0x2000)       /* Capture input select 1 */
3743
#define CCIS0                  (0x1000)       /* Capture input select 0 */
3744
#define SCS                    (0x0800)       /* Capture sychronize */
3745
#define SCCI                   (0x0400)       /* Latched capture signal (read) */
3746
#define CAP                    (0x0100)       /* Capture mode: 1 /Compare mode : 0 */
3747
#define OUTMOD2                (0x0080)       /* Output mode 2 */
3748
#define OUTMOD1                (0x0040)       /* Output mode 1 */
3749
#define OUTMOD0                (0x0020)       /* Output mode 0 */
3750
#define CCIE                   (0x0010)       /* Capture/compare interrupt enable */
3751
#define CCI                    (0x0008)       /* Capture input signal (read) */
3752
#define OUT                    (0x0004)       /* PWM Output signal if output mode 0 */
3753
#define COV                    (0x0002)       /* Capture/compare overflow flag */
3754
#define CCIFG                  (0x0001)       /* Capture/compare interrupt flag */
3755
 
3756
#define OUTMOD_0               (0*0x20u)      /* PWM output mode: 0 - output only */
3757
#define OUTMOD_1               (1*0x20u)      /* PWM output mode: 1 - set */
3758
#define OUTMOD_2               (2*0x20u)      /* PWM output mode: 2 - PWM toggle/reset */
3759
#define OUTMOD_3               (3*0x20u)      /* PWM output mode: 3 - PWM set/reset */
3760
#define OUTMOD_4               (4*0x20u)      /* PWM output mode: 4 - toggle */
3761
#define OUTMOD_5               (5*0x20u)      /* PWM output mode: 5 - Reset */
3762
#define OUTMOD_6               (6*0x20u)      /* PWM output mode: 6 - PWM toggle/set */
3763
#define OUTMOD_7               (7*0x20u)      /* PWM output mode: 7 - PWM reset/set */
3764
#define CCIS_0                 (0*0x1000u)    /* Capture input select: 0 - CCIxA */
3765
#define CCIS_1                 (1*0x1000u)    /* Capture input select: 1 - CCIxB */
3766
#define CCIS_2                 (2*0x1000u)    /* Capture input select: 2 - GND */
3767
#define CCIS_3                 (3*0x1000u)    /* Capture input select: 3 - Vcc */
3768
#define CM_0                   (0*0x4000u)    /* Capture mode: 0 - disabled */
3769
#define CM_1                   (1*0x4000u)    /* Capture mode: 1 - pos. edge */
3770
#define CM_2                   (2*0x4000u)    /* Capture mode: 1 - neg. edge */
3771
#define CM_3                   (3*0x4000u)    /* Capture mode: 1 - both edges */
3772
 
3773
/* TAxEX0 Control Bits */
3774
#define TAIDEX0                (0x0001)       /* Timer A Input divider expansion Bit: 0 */
3775
#define TAIDEX1                (0x0002)       /* Timer A Input divider expansion Bit: 1 */
3776
#define TAIDEX2                (0x0004)       /* Timer A Input divider expansion Bit: 2 */
3777
 
3778
#define TAIDEX_0               (0*0x0001u)    /* Timer A Input divider expansion : /1 */
3779
#define TAIDEX_1               (1*0x0001u)    /* Timer A Input divider expansion : /2 */
3780
#define TAIDEX_2               (2*0x0001u)    /* Timer A Input divider expansion : /3 */
3781
#define TAIDEX_3               (3*0x0001u)    /* Timer A Input divider expansion : /4 */
3782
#define TAIDEX_4               (4*0x0001u)    /* Timer A Input divider expansion : /5 */
3783
#define TAIDEX_5               (5*0x0001u)    /* Timer A Input divider expansion : /6 */
3784
#define TAIDEX_6               (6*0x0001u)    /* Timer A Input divider expansion : /7 */
3785
#define TAIDEX_7               (7*0x0001u)    /* Timer A Input divider expansion : /8 */
3786
 
3787
/* T0A5IV Definitions */
3788
#define TA0IV_NONE             (0x0000)       /* No Interrupt pending */
3789
#define TA0IV_TA0CCR1          (0x0002)       /* TA0CCR1_CCIFG */
3790
#define TA0IV_TA0CCR2          (0x0004)       /* TA0CCR2_CCIFG */
3791
#define TA0IV_TA0CCR3          (0x0006)       /* TA0CCR3_CCIFG */
3792
#define TA0IV_TA0CCR4          (0x0008)       /* TA0CCR4_CCIFG */
3793
#define TA0IV_5                (0x000A)       /* Reserved */
3794
#define TA0IV_6                (0x000C)       /* Reserved */
3795
#define TA0IV_TA0IFG           (0x000E)       /* TA0IFG */
3796
 
3797
/************************************************************
3798
* Timer1_A3
3799
************************************************************/
3800
#define __MSP430_HAS_T1A3__                   /* Definition to show that Module is available */
3801
#define __MSP430_BASEADDRESS_T1A3__ 0x0380
3802
 
3803
SFR_16BIT(TA1CTL);                            /* Timer1_A3 Control */
3804
SFR_16BIT(TA1CCTL0);                          /* Timer1_A3 Capture/Compare Control 0 */
3805
SFR_16BIT(TA1CCTL1);                          /* Timer1_A3 Capture/Compare Control 1 */
3806
SFR_16BIT(TA1CCTL2);                          /* Timer1_A3 Capture/Compare Control 2 */
3807
SFR_16BIT(TA1R);                              /* Timer1_A3 */
3808
SFR_16BIT(TA1CCR0);                           /* Timer1_A3 Capture/Compare 0 */
3809
SFR_16BIT(TA1CCR1);                           /* Timer1_A3 Capture/Compare 1 */
3810
SFR_16BIT(TA1CCR2);                           /* Timer1_A3 Capture/Compare 2 */
3811
SFR_16BIT(TA1IV);                             /* Timer1_A3 Interrupt Vector Word */
3812
SFR_16BIT(TA1EX0);                            /* Timer1_A3 Expansion Register 0 */
3813
 
3814
/* Bits are already defined within the Timer0_Ax */
3815
 
3816
/* TA1IV Definitions */
3817
#define TA1IV_NONE             (0x0000)       /* No Interrupt pending */
3818
#define TA1IV_TA1CCR1          (0x0002)       /* TA1CCR1_CCIFG */
3819
#define TA1IV_TA1CCR2          (0x0004)       /* TA1CCR2_CCIFG */
3820
#define TA1IV_3                (0x0006)       /* Reserved */
3821
#define TA1IV_4                (0x0008)       /* Reserved */
3822
#define TA1IV_5                (0x000A)       /* Reserved */
3823
#define TA1IV_6                (0x000C)       /* Reserved */
3824
#define TA1IV_TA1IFG           (0x000E)       /* TA1IFG */
3825
 
3826
/************************************************************
3827
* Timer2_A3
3828
************************************************************/
3829
#define __MSP430_HAS_T2A3__                   /* Definition to show that Module is available */
3830
#define __MSP430_BASEADDRESS_T2A3__ 0x0400
3831
 
3832
SFR_16BIT(TA2CTL);                            /* Timer2_A3 Control */
3833
SFR_16BIT(TA2CCTL0);                          /* Timer2_A3 Capture/Compare Control 0 */
3834
SFR_16BIT(TA2CCTL1);                          /* Timer2_A3 Capture/Compare Control 1 */
3835
SFR_16BIT(TA2CCTL2);                          /* Timer2_A3 Capture/Compare Control 2 */
3836
SFR_16BIT(TA2R);                              /* Timer2_A3 */
3837
SFR_16BIT(TA2CCR0);                           /* Timer2_A3 Capture/Compare 0 */
3838
SFR_16BIT(TA2CCR1);                           /* Timer2_A3 Capture/Compare 1 */
3839
SFR_16BIT(TA2CCR2);                           /* Timer2_A3 Capture/Compare 2 */
3840
SFR_16BIT(TA2IV);                             /* Timer2_A3 Interrupt Vector Word */
3841
SFR_16BIT(TA2EX0);                            /* Timer2_A3 Expansion Register 0 */
3842
 
3843
/* Bits are already defined within the Timer0_Ax */
3844
 
3845
/* TA2IV Definitions */
3846
#define TA2IV_NONE             (0x0000)       /* No Interrupt pending */
3847
#define TA2IV_TA1CCR1          (0x0002)       /* TA2CCR1_CCIFG */
3848
#define TA2IV_TA1CCR2          (0x0004)       /* TA2CCR2_CCIFG */
3849
#define TA2IV_3                (0x0006)       /* Reserved */
3850
#define TA2IV_4                (0x0008)       /* Reserved */
3851
#define TA2IV_5                (0x000A)       /* Reserved */
3852
#define TA2IV_6                (0x000C)       /* Reserved */
3853
#define TA2IV_TA2IFG           (0x000E)       /* TA2IFG */
3854
 
3855
/************************************************************
3856
* Timer0_B7
3857
************************************************************/
3858
#define __MSP430_HAS_T0B7__                   /* Definition to show that Module is available */
3859
#define __MSP430_BASEADDRESS_T0B7__ 0x03C0
3860
 
3861
SFR_16BIT(TB0CTL);                            /* Timer0_B7 Control */
3862
SFR_16BIT(TB0CCTL0);                          /* Timer0_B7 Capture/Compare Control 0 */
3863
SFR_16BIT(TB0CCTL1);                          /* Timer0_B7 Capture/Compare Control 1 */
3864
SFR_16BIT(TB0CCTL2);                          /* Timer0_B7 Capture/Compare Control 2 */
3865
SFR_16BIT(TB0CCTL3);                          /* Timer0_B7 Capture/Compare Control 3 */
3866
SFR_16BIT(TB0CCTL4);                          /* Timer0_B7 Capture/Compare Control 4 */
3867
SFR_16BIT(TB0CCTL5);                          /* Timer0_B7 Capture/Compare Control 5 */
3868
SFR_16BIT(TB0CCTL6);                          /* Timer0_B7 Capture/Compare Control 6 */
3869
SFR_16BIT(TB0R);                              /* Timer0_B7 */
3870
SFR_16BIT(TB0CCR0);                           /* Timer0_B7 Capture/Compare 0 */
3871
SFR_16BIT(TB0CCR1);                           /* Timer0_B7 Capture/Compare 1 */
3872
SFR_16BIT(TB0CCR2);                           /* Timer0_B7 Capture/Compare 2 */
3873
SFR_16BIT(TB0CCR3);                           /* Timer0_B7 Capture/Compare 3 */
3874
SFR_16BIT(TB0CCR4);                           /* Timer0_B7 Capture/Compare 4 */
3875
SFR_16BIT(TB0CCR5);                           /* Timer0_B7 Capture/Compare 5 */
3876
SFR_16BIT(TB0CCR6);                           /* Timer0_B7 Capture/Compare 6 */
3877
SFR_16BIT(TB0EX0);                            /* Timer0_B7 Expansion Register 0 */
3878
SFR_16BIT(TB0IV);                             /* Timer0_B7 Interrupt Vector Word */
3879
 
3880
/* Legacy Type Definitions for TimerB */
3881
#define TBCTL                  TB0CTL         /* Timer0_B7 Control */
3882
#define TBCCTL0                TB0CCTL0       /* Timer0_B7 Capture/Compare Control 0 */
3883
#define TBCCTL1                TB0CCTL1       /* Timer0_B7 Capture/Compare Control 1 */
3884
#define TBCCTL2                TB0CCTL2       /* Timer0_B7 Capture/Compare Control 2 */
3885
#define TBCCTL3                TB0CCTL3       /* Timer0_B7 Capture/Compare Control 3 */
3886
#define TBCCTL4                TB0CCTL4       /* Timer0_B7 Capture/Compare Control 4 */
3887
#define TBCCTL5                TB0CCTL5       /* Timer0_B7 Capture/Compare Control 5 */
3888
#define TBCCTL6                TB0CCTL6       /* Timer0_B7 Capture/Compare Control 6 */
3889
#define TBR                    TB0R           /* Timer0_B7 */
3890
#define TBCCR0                 TB0CCR0        /* Timer0_B7 Capture/Compare 0 */
3891
#define TBCCR1                 TB0CCR1        /* Timer0_B7 Capture/Compare 1 */
3892
#define TBCCR2                 TB0CCR2        /* Timer0_B7 Capture/Compare 2 */
3893
#define TBCCR3                 TB0CCR3        /* Timer0_B7 Capture/Compare 3 */
3894
#define TBCCR4                 TB0CCR4        /* Timer0_B7 Capture/Compare 4 */
3895
#define TBCCR5                 TB0CCR5        /* Timer0_B7 Capture/Compare 5 */
3896
#define TBCCR6                 TB0CCR6        /* Timer0_B7 Capture/Compare 6 */
3897
#define TBEX0                  TB0EX0         /* Timer0_B7 Expansion Register 0 */
3898
#define TBIV                   TB0IV          /* Timer0_B7 Interrupt Vector Word */
3899
#define TIMERB1_VECTOR       TIMER0_B1_VECTOR /* Timer0_B7 CC1-6, TB */
3900
#define TIMERB0_VECTOR       TIMER0_B0_VECTOR /* Timer0_B7 CC0 */
3901
 
3902
/* TBxCTL Control Bits */
3903
#define TBCLGRP1               (0x4000)       /* Timer0_B7 Compare latch load group 1 */
3904
#define TBCLGRP0               (0x2000)       /* Timer0_B7 Compare latch load group 0 */
3905
#define CNTL1                  (0x1000)       /* Counter lenght 1 */
3906
#define CNTL0                  (0x0800)       /* Counter lenght 0 */
3907
#define TBSSEL1                (0x0200)       /* Clock source 1 */
3908
#define TBSSEL0                (0x0100)       /* Clock source 0 */
3909
#define TBCLR                  (0x0004)       /* Timer0_B7 counter clear */
3910
#define TBIE                   (0x0002)       /* Timer0_B7 interrupt enable */
3911
#define TBIFG                  (0x0001)       /* Timer0_B7 interrupt flag */
3912
 
3913
#define SHR1                   (0x4000)       /* Timer0_B7 Compare latch load group 1 */
3914
#define SHR0                   (0x2000)       /* Timer0_B7 Compare latch load group 0 */
3915
 
3916
#define TBSSEL_0               (0*0x0100u)    /* Clock Source: TBCLK */
3917
#define TBSSEL_1               (1*0x0100u)    /* Clock Source: ACLK  */
3918
#define TBSSEL_2               (2*0x0100u)    /* Clock Source: SMCLK */
3919
#define TBSSEL_3               (3*0x0100u)    /* Clock Source: INCLK */
3920
#define CNTL_0                 (0*0x0800u)    /* Counter lenght: 16 bit */
3921
#define CNTL_1                 (1*0x0800u)    /* Counter lenght: 12 bit */
3922
#define CNTL_2                 (2*0x0800u)    /* Counter lenght: 10 bit */
3923
#define CNTL_3                 (3*0x0800u)    /* Counter lenght:  8 bit */
3924
#define SHR_0                  (0*0x2000u)    /* Timer0_B7 Group: 0 - individually */
3925
#define SHR_1                  (1*0x2000u)    /* Timer0_B7 Group: 1 - 3 groups (1-2, 3-4, 5-6) */
3926
#define SHR_2                  (2*0x2000u)    /* Timer0_B7 Group: 2 - 2 groups (1-3, 4-6)*/
3927
#define SHR_3                  (3*0x2000u)    /* Timer0_B7 Group: 3 - 1 group (all) */
3928
#define TBCLGRP_0              (0*0x2000u)    /* Timer0_B7 Group: 0 - individually */
3929
#define TBCLGRP_1              (1*0x2000u)    /* Timer0_B7 Group: 1 - 3 groups (1-2, 3-4, 5-6) */
3930
#define TBCLGRP_2              (2*0x2000u)    /* Timer0_B7 Group: 2 - 2 groups (1-3, 4-6)*/
3931
#define TBCLGRP_3              (3*0x2000u)    /* Timer0_B7 Group: 3 - 1 group (all) */
3932
#define TBSSEL__TACLK          (0*0x100u)     /* Timer0_B7 clock source select: 0 - TACLK */
3933
#define TBSSEL__ACLK           (1*0x100u)     /* Timer0_B7 clock source select: 1 - ACLK  */
3934
#define TBSSEL__SMCLK          (2*0x100u)     /* Timer0_B7 clock source select: 2 - SMCLK */
3935
#define TBSSEL__INCLK          (3*0x100u)     /* Timer0_B7 clock source select: 3 - INCLK */
3936
#define CNTL__16               (0*0x0800u)    /* Counter lenght: 16 bit */
3937
#define CNTL__12               (1*0x0800u)    /* Counter lenght: 12 bit */
3938
#define CNTL__10               (2*0x0800u)    /* Counter lenght: 10 bit */
3939
#define CNTL__8                (3*0x0800u)    /* Counter lenght:  8 bit */
3940
 
3941
/* Additional Timer B Control Register bits are defined in Timer A */
3942
/* TBxCCTLx Control Bits */
3943
#define CLLD1                  (0x0400)       /* Compare latch load source 1 */
3944
#define CLLD0                  (0x0200)       /* Compare latch load source 0 */
3945
 
3946
#define SLSHR1                 (0x0400)       /* Compare latch load source 1 */
3947
#define SLSHR0                 (0x0200)       /* Compare latch load source 0 */
3948
 
3949
#define SLSHR_0                (0*0x0200u)    /* Compare latch load sourec : 0 - immediate */
3950
#define SLSHR_1                (1*0x0200u)    /* Compare latch load sourec : 1 - TBR counts to 0 */
3951
#define SLSHR_2                (2*0x0200u)    /* Compare latch load sourec : 2 - up/down */
3952
#define SLSHR_3                (3*0x0200u)    /* Compare latch load sourec : 3 - TBR counts to TBCTL0 */
3953
 
3954
#define CLLD_0                 (0*0x0200u)    /* Compare latch load sourec : 0 - immediate */
3955
#define CLLD_1                 (1*0x0200u)    /* Compare latch load sourec : 1 - TBR counts to 0 */
3956
#define CLLD_2                 (2*0x0200u)    /* Compare latch load sourec : 2 - up/down */
3957
#define CLLD_3                 (3*0x0200u)    /* Compare latch load sourec : 3 - TBR counts to TBCTL0 */
3958
 
3959
/* TBxEX0 Control Bits */
3960
#define TBIDEX0                (0x0001)       /* Timer0_B7 Input divider expansion Bit: 0 */
3961
#define TBIDEX1                (0x0002)       /* Timer0_B7 Input divider expansion Bit: 1 */
3962
#define TBIDEX2                (0x0004)       /* Timer0_B7 Input divider expansion Bit: 2 */
3963
 
3964
#define TBIDEX_0               (0*0x0001u)    /* Timer0_B7 Input divider expansion : /1 */
3965
#define TBIDEX_1               (1*0x0001u)    /* Timer0_B7 Input divider expansion : /2 */
3966
#define TBIDEX_2               (2*0x0001u)    /* Timer0_B7 Input divider expansion : /3 */
3967
#define TBIDEX_3               (3*0x0001u)    /* Timer0_B7 Input divider expansion : /4 */
3968
#define TBIDEX_4               (4*0x0001u)    /* Timer0_B7 Input divider expansion : /5 */
3969
#define TBIDEX_5               (5*0x0001u)    /* Timer0_B7 Input divider expansion : /6 */
3970
#define TBIDEX_6               (6*0x0001u)    /* Timer0_B7 Input divider expansion : /7 */
3971
#define TBIDEX_7               (7*0x0001u)    /* Timer0_B7 Input divider expansion : /8 */
3972
#define TBIDEX__1              (0*0x0001u)    /* Timer0_B7 Input divider expansion : /1 */
3973
#define TBIDEX__2              (1*0x0001u)    /* Timer0_B7 Input divider expansion : /2 */
3974
#define TBIDEX__3              (2*0x0001u)    /* Timer0_B7 Input divider expansion : /3 */
3975
#define TBIDEX__4              (3*0x0001u)    /* Timer0_B7 Input divider expansion : /4 */
3976
#define TBIDEX__5              (4*0x0001u)    /* Timer0_B7 Input divider expansion : /5 */
3977
#define TBIDEX__6              (5*0x0001u)    /* Timer0_B7 Input divider expansion : /6 */
3978
#define TBIDEX__7              (6*0x0001u)    /* Timer0_B7 Input divider expansion : /7 */
3979
#define TBIDEX__8              (7*0x0001u)    /* Timer0_B7 Input divider expansion : /8 */
3980
 
3981
/* TB0IV Definitions */
3982
#define TB0IV_NONE             (0x0000)       /* No Interrupt pending */
3983
#define TB0IV_TB1CCR1          (0x0002)       /* TBCCR1_CCIFG */
3984
#define TB0IV_TB1CCR2          (0x0004)       /* TBCCR2_CCIFG */
3985
#define TB0IV_3                (0x0006)       /* Reserved */
3986
#define TB0IV_4                (0x0008)       /* Reserved */
3987
#define TB0IV_5                (0x000A)       /* Reserved */
3988
#define TB0IV_6                (0x000C)       /* Reserved */
3989
#define TB0IV_TB0IFG           (0x000E)       /* TBIFG */
3990
 
3991
 
3992
/************************************************************
3993
* USB
3994
************************************************************/
3995
#define __MSP430_HAS_USB__                    /* Definition to show that Module is available */
3996
#define __MSP430_BASEADDRESS_USB__ 0x0900
3997
 
3998
/* ========================================================================= */
3999
/* USB Configuration Registers */
4000
/* ========================================================================= */
4001
SFR_16BIT(USBKEYID);                          /* USB Controller key register */
4002
SFR_8BIT(USBKEYID_L);                         /* USB Controller key register */
4003
SFR_8BIT(USBKEYID_H);                         /* USB Controller key register */
4004
SFR_16BIT(USBCNF);                            /* USB Module  configuration register */
4005
SFR_8BIT(USBCNF_L);                           /* USB Module  configuration register */
4006
SFR_8BIT(USBCNF_H);                           /* USB Module  configuration register */
4007
SFR_16BIT(USBPHYCTL);                         /* USB PHY control register */
4008
SFR_8BIT(USBPHYCTL_L);                        /* USB PHY control register */
4009
SFR_8BIT(USBPHYCTL_H);                        /* USB PHY control register */
4010
SFR_16BIT(USBPWRCTL);                         /* USB Power control register */
4011
SFR_8BIT(USBPWRCTL_L);                        /* USB Power control register */
4012
SFR_8BIT(USBPWRCTL_H);                        /* USB Power control register */
4013
SFR_16BIT(USBPLLCTL);                         /* USB PLL control register */
4014
SFR_8BIT(USBPLLCTL_L);                        /* USB PLL control register */
4015
SFR_8BIT(USBPLLCTL_H);                        /* USB PLL control register */
4016
SFR_16BIT(USBPLLDIVB);                        /* USB PLL Clock Divider Buffer control register */
4017
SFR_8BIT(USBPLLDIVB_L);                       /* USB PLL Clock Divider Buffer control register */
4018
SFR_8BIT(USBPLLDIVB_H);                       /* USB PLL Clock Divider Buffer control register */
4019
SFR_16BIT(USBPLLIR);                          /* USB PLL Interrupt control register */
4020
SFR_8BIT(USBPLLIR_L);                         /* USB PLL Interrupt control register */
4021
SFR_8BIT(USBPLLIR_H);                         /* USB PLL Interrupt control register */
4022
 
4023
#define USBKEYPID              USBKEYID       /* Legacy Definition: USB Controller key register */
4024
#define USBKEY                 (0x9628)       /* USB Control Register key */
4025
 
4026
/* USBCNF Control Bits */
4027
#define USB_EN                 (0x0001)       /* USB - Module enable */
4028
#define PUR_EN                 (0x0002)       /* USB - PUR pin enable */
4029
#define PUR_IN                 (0x0004)       /* USB - PUR pin input value */
4030
#define BLKRDY                 (0x0008)       /* USB - Block ready signal for DMA */
4031
#define FNTEN                  (0x0010)       /* USB - Frame Number receive Trigger enable for DMA */
4032
//#define RESERVED            (0x0020)  /* USB -  */
4033
//#define RESERVED            (0x0040)  /* USB -  */
4034
//#define RESERVED            (0x0080)  /* USB -  */
4035
//#define RESERVED            (0x0100)  /* USB -  */
4036
//#define RESERVED            (0x0200)  /* USB -  */
4037
//#define RESERVED            (0x0400)  /* USB -  */
4038
//#define RESERVED            (0x0800)  /* USB -  */
4039
//#define RESERVED            (0x1000)  /* USB -  */
4040
//#define RESERVED            (0x2000)  /* USB -  */
4041
//#define RESERVED            (0x4000)  /* USB -  */
4042
//#define RESERVED            (0x8000)  /* USB -  */
4043
 
4044
/* USBCNF Control Bits */
4045
#define USB_EN_L               (0x0001)       /* USB - Module enable */
4046
#define PUR_EN_L               (0x0002)       /* USB - PUR pin enable */
4047
#define PUR_IN_L               (0x0004)       /* USB - PUR pin input value */
4048
#define BLKRDY_L               (0x0008)       /* USB - Block ready signal for DMA */
4049
#define FNTEN_L                (0x0010)       /* USB - Frame Number receive Trigger enable for DMA */
4050
//#define RESERVED            (0x0020)  /* USB -  */
4051
//#define RESERVED            (0x0040)  /* USB -  */
4052
//#define RESERVED            (0x0080)  /* USB -  */
4053
//#define RESERVED            (0x0100)  /* USB -  */
4054
//#define RESERVED            (0x0200)  /* USB -  */
4055
//#define RESERVED            (0x0400)  /* USB -  */
4056
//#define RESERVED            (0x0800)  /* USB -  */
4057
//#define RESERVED            (0x1000)  /* USB -  */
4058
//#define RESERVED            (0x2000)  /* USB -  */
4059
//#define RESERVED            (0x4000)  /* USB -  */
4060
//#define RESERVED            (0x8000)  /* USB -  */
4061
 
4062
/* USBCNF Control Bits */
4063
//#define RESERVED            (0x0020)  /* USB -  */
4064
//#define RESERVED            (0x0040)  /* USB -  */
4065
//#define RESERVED            (0x0080)  /* USB -  */
4066
//#define RESERVED            (0x0100)  /* USB -  */
4067
//#define RESERVED            (0x0200)  /* USB -  */
4068
//#define RESERVED            (0x0400)  /* USB -  */
4069
//#define RESERVED            (0x0800)  /* USB -  */
4070
//#define RESERVED            (0x1000)  /* USB -  */
4071
//#define RESERVED            (0x2000)  /* USB -  */
4072
//#define RESERVED            (0x4000)  /* USB -  */
4073
//#define RESERVED            (0x8000)  /* USB -  */
4074
 
4075
/* USBPHYCTL Control Bits */
4076
#define PUOUT0                 (0x0001)       /* USB - USB Port Output Signal Bit 0 */
4077
#define PUOUT1                 (0x0002)       /* USB - USB Port Output Signal Bit 1 */
4078
#define PUIN0                  (0x0004)       /* USB - PU0/DP Input Data */
4079
#define PUIN1                  (0x0008)       /* USB - PU1/DM Input Data */
4080
//#define RESERVED            (0x0010)  /* USB -  */
4081
#define PUOPE                  (0x0020)       /* USB - USB Port Output Enable */
4082
//#define RESERVED            (0x0040)  /* USB -  */
4083
#define PUSEL                  (0x0080)       /* USB - USB Port Function Select */
4084
#define PUIPE                  (0x0100)       /* USB - PHY Single Ended Input enable */
4085
//#define RESERVED            (0x0200)  /* USB -  */
4086
//#define RESERVED            (0x0100)  /* USB -  */
4087
//#define RESERVED            (0x0200)  /* USB -  */
4088
//#define RESERVED            (0x0400)  /* USB -  */
4089
//#define RESERVED            (0x0800)  /* USB -  */
4090
//#define RESERVED            (0x1000)  /* USB -  */
4091
//#define RESERVED            (0x2000)  /* USB -  */
4092
//#define RESERVED            (0x4000)  /* USB -  */
4093
//#define RESERVED            (0x8000)  /* USB -  */
4094
 
4095
/* USBPHYCTL Control Bits */
4096
#define PUOUT0_L               (0x0001)       /* USB - USB Port Output Signal Bit 0 */
4097
#define PUOUT1_L               (0x0002)       /* USB - USB Port Output Signal Bit 1 */
4098
#define PUIN0_L                (0x0004)       /* USB - PU0/DP Input Data */
4099
#define PUIN1_L                (0x0008)       /* USB - PU1/DM Input Data */
4100
//#define RESERVED            (0x0010)  /* USB -  */
4101
#define PUOPE_L                (0x0020)       /* USB - USB Port Output Enable */
4102
//#define RESERVED            (0x0040)  /* USB -  */
4103
#define PUSEL_L                (0x0080)       /* USB - USB Port Function Select */
4104
//#define RESERVED            (0x0200)  /* USB -  */
4105
//#define RESERVED            (0x0100)  /* USB -  */
4106
//#define RESERVED            (0x0200)  /* USB -  */
4107
//#define RESERVED            (0x0400)  /* USB -  */
4108
//#define RESERVED            (0x0800)  /* USB -  */
4109
//#define RESERVED            (0x1000)  /* USB -  */
4110
//#define RESERVED            (0x2000)  /* USB -  */
4111
//#define RESERVED            (0x4000)  /* USB -  */
4112
//#define RESERVED            (0x8000)  /* USB -  */
4113
 
4114
/* USBPHYCTL Control Bits */
4115
//#define RESERVED            (0x0010)  /* USB -  */
4116
//#define RESERVED            (0x0040)  /* USB -  */
4117
#define PUIPE_H                (0x0001)       /* USB - PHY Single Ended Input enable */
4118
//#define RESERVED            (0x0200)  /* USB -  */
4119
//#define RESERVED            (0x0100)  /* USB -  */
4120
//#define RESERVED            (0x0200)  /* USB -  */
4121
//#define RESERVED            (0x0400)  /* USB -  */
4122
//#define RESERVED            (0x0800)  /* USB -  */
4123
//#define RESERVED            (0x1000)  /* USB -  */
4124
//#define RESERVED            (0x2000)  /* USB -  */
4125
//#define RESERVED            (0x4000)  /* USB -  */
4126
//#define RESERVED            (0x8000)  /* USB -  */
4127
 
4128
#define PUDIR                  (0x0020)       /* USB - Legacy Definition: USB Port Output Enable */
4129
#define PSEIEN                 (0x0100)       /* USB - Legacy Definition: PHY Single Ended Input enable */
4130
 
4131
/* USBPWRCTL Control Bits */
4132
#define VUOVLIFG               (0x0001)       /* USB - VUSB Overload Interrupt Flag */
4133
#define VBONIFG                (0x0002)       /* USB - VBUS "Coming ON" Interrupt Flag */
4134
#define VBOFFIFG               (0x0004)       /* USB - VBUS "Going OFF" Interrupt Flag */
4135
#define USBBGVBV               (0x0008)       /* USB - USB Bandgap and VBUS valid */
4136
#define USBDETEN               (0x0010)       /* USB - VBUS on/off events enable */
4137
#define OVLAOFF                (0x0020)       /* USB - LDO overload auto off enable */
4138
#define SLDOAON                (0x0040)       /* USB - Secondary LDO auto on enable */
4139
//#define RESERVED            (0x0080)  /* USB -  */
4140
#define VUOVLIE                (0x0100)       /* USB - Overload indication Interrupt Enable */
4141
#define VBONIE                 (0x0200)       /* USB - VBUS "Coming ON" Interrupt Enable */
4142
#define VBOFFIE                (0x0400)       /* USB - VBUS "Going OFF" Interrupt Enable */
4143
#define VUSBEN                 (0x0800)       /* USB - LDO Enable (3.3V) */
4144
#define SLDOEN                 (0x1000)       /* USB - Secondary LDO Enable (1.8V) */
4145
//#define RESERVED            (0x2000)  /* USB -  */
4146
//#define RESERVED            (0x4000)  /* USB -  */
4147
//#define RESERVED            (0x8000)  /* USB -  */
4148
 
4149
/* USBPWRCTL Control Bits */
4150
#define VUOVLIFG_L             (0x0001)       /* USB - VUSB Overload Interrupt Flag */
4151
#define VBONIFG_L              (0x0002)       /* USB - VBUS "Coming ON" Interrupt Flag */
4152
#define VBOFFIFG_L             (0x0004)       /* USB - VBUS "Going OFF" Interrupt Flag */
4153
#define USBBGVBV_L             (0x0008)       /* USB - USB Bandgap and VBUS valid */
4154
#define USBDETEN_L             (0x0010)       /* USB - VBUS on/off events enable */
4155
#define OVLAOFF_L              (0x0020)       /* USB - LDO overload auto off enable */
4156
#define SLDOAON_L              (0x0040)       /* USB - Secondary LDO auto on enable */
4157
//#define RESERVED            (0x0080)  /* USB -  */
4158
//#define RESERVED            (0x2000)  /* USB -  */
4159
//#define RESERVED            (0x4000)  /* USB -  */
4160
//#define RESERVED            (0x8000)  /* USB -  */
4161
 
4162
/* USBPWRCTL Control Bits */
4163
//#define RESERVED            (0x0080)  /* USB -  */
4164
#define VUOVLIE_H              (0x0001)       /* USB - Overload indication Interrupt Enable */
4165
#define VBONIE_H               (0x0002)       /* USB - VBUS "Coming ON" Interrupt Enable */
4166
#define VBOFFIE_H              (0x0004)       /* USB - VBUS "Going OFF" Interrupt Enable */
4167
#define VUSBEN_H               (0x0008)       /* USB - LDO Enable (3.3V) */
4168
#define SLDOEN_H               (0x0010)       /* USB - Secondary LDO Enable (1.8V) */
4169
//#define RESERVED            (0x2000)  /* USB -  */
4170
//#define RESERVED            (0x4000)  /* USB -  */
4171
//#define RESERVED            (0x8000)  /* USB -  */
4172
 
4173
/* USBPLLCTL Control Bits */
4174
//#define RESERVED            (0x0001)  /* USB -  */
4175
//#define RESERVED            (0x0002)  /* USB -  */
4176
//#define RESERVED            (0x0004)  /* USB -  */
4177
//#define RESERVED            (0x0008)  /* USB -  */
4178
//#define RESERVED            (0x0010)  /* USB -  */
4179
//#define RESERVED            (0x0020)  /* USB -  */
4180
#define UCLKSEL0               (0x0040)       /* USB - Module Clock Select Bit 0 */
4181
#define UCLKSEL1               (0x0080)       /* USB - Module Clock Select Bit 1 */
4182
#define UPLLEN                 (0x0100)       /* USB - PLL enable */
4183
#define UPFDEN                 (0x0200)       /* USB - Phase Freq. Discriminator enable */
4184
//#define RESERVED            (0x0400)  /* USB -  */
4185
//#define RESERVED            (0x0800)  /* USB -  */
4186
#define UPCS0                  (0x1000)       /* USB - PLL Clock Select Bit 0 */
4187
//#define RESERVED            (0x2000)  /* USB -  */
4188
//#define RESERVED            (0x4000)  /* USB -  */
4189
//#define RESERVED            (0x8000)  /* USB -  */
4190
 
4191
/* USBPLLCTL Control Bits */
4192
//#define RESERVED            (0x0001)  /* USB -  */
4193
//#define RESERVED            (0x0002)  /* USB -  */
4194
//#define RESERVED            (0x0004)  /* USB -  */
4195
//#define RESERVED            (0x0008)  /* USB -  */
4196
//#define RESERVED            (0x0010)  /* USB -  */
4197
//#define RESERVED            (0x0020)  /* USB -  */
4198
#define UCLKSEL0_L             (0x0040)       /* USB - Module Clock Select Bit 0 */
4199
#define UCLKSEL1_L             (0x0080)       /* USB - Module Clock Select Bit 1 */
4200
//#define RESERVED            (0x0400)  /* USB -  */
4201
//#define RESERVED            (0x0800)  /* USB -  */
4202
//#define RESERVED            (0x2000)  /* USB -  */
4203
//#define RESERVED            (0x4000)  /* USB -  */
4204
//#define RESERVED            (0x8000)  /* USB -  */
4205
 
4206
/* USBPLLCTL Control Bits */
4207
//#define RESERVED            (0x0001)  /* USB -  */
4208
//#define RESERVED            (0x0002)  /* USB -  */
4209
//#define RESERVED            (0x0004)  /* USB -  */
4210
//#define RESERVED            (0x0008)  /* USB -  */
4211
//#define RESERVED            (0x0010)  /* USB -  */
4212
//#define RESERVED            (0x0020)  /* USB -  */
4213
#define UPLLEN_H               (0x0001)       /* USB - PLL enable */
4214
#define UPFDEN_H               (0x0002)       /* USB - Phase Freq. Discriminator enable */
4215
//#define RESERVED            (0x0400)  /* USB -  */
4216
//#define RESERVED            (0x0800)  /* USB -  */
4217
#define UPCS0_H                (0x0010)       /* USB - PLL Clock Select Bit 0 */
4218
//#define RESERVED            (0x2000)  /* USB -  */
4219
//#define RESERVED            (0x4000)  /* USB -  */
4220
//#define RESERVED            (0x8000)  /* USB -  */
4221
 
4222
#define UCLKSEL_0              (0x0000)       /* USB - Module Clock Select: 0 */
4223
#define UCLKSEL_1              (0x0040)       /* USB - Module Clock Select: 1 */
4224
#define UCLKSEL_2              (0x0080)       /* USB - Module Clock Select: 2 */
4225
#define UCLKSEL_3              (0x00C0)       /* USB - Module Clock Select: 3 (Reserved) */
4226
 
4227
#define UCLKSEL__PLLCLK        (0x0000)       /* USB - Module Clock Select: PLLCLK */
4228
#define UCLKSEL__XT1CLK        (0x0040)       /* USB - Module Clock Select: XT1CLK */
4229
#define UCLKSEL__XT2CLK        (0x0080)       /* USB - Module Clock Select: XT2CLK */
4230
 
4231
/* USBPLLDIVB Control Bits */
4232
#define UPMB0                  (0x0001)       /* USB - PLL feedback divider buffer Bit 0 */
4233
#define UPMB1                  (0x0002)       /* USB - PLL feedback divider buffer Bit 1 */
4234
#define UPMB2                  (0x0004)       /* USB - PLL feedback divider buffer Bit 2 */
4235
#define UPMB3                  (0x0008)       /* USB - PLL feedback divider buffer Bit 3 */
4236
#define UPMB4                  (0x0010)       /* USB - PLL feedback divider buffer Bit 4 */
4237
#define UPMB5                  (0x0020)       /* USB - PLL feedback divider buffer Bit 5 */
4238
//#define RESERVED            (0x0040)  /* USB -  */
4239
//#define RESERVED            (0x0080)  /* USB -  */
4240
#define UPQB0                  (0x0100)       /* USB - PLL prescale divider buffer Bit 0 */
4241
#define UPQB1                  (0x0200)       /* USB - PLL prescale divider buffer Bit 1 */
4242
#define UPQB2                  (0x0400)       /* USB - PLL prescale divider buffer Bit 2 */
4243
//#define RESERVED            (0x0800)  /* USB -  */
4244
//#define RESERVED            (0x1000)  /* USB -  */
4245
//#define RESERVED            (0x2000)  /* USB -  */
4246
//#define RESERVED            (0x4000)  /* USB -  */
4247
//#define RESERVED            (0x8000)  /* USB -  */
4248
 
4249
/* USBPLLDIVB Control Bits */
4250
#define UPMB0_L                (0x0001)       /* USB - PLL feedback divider buffer Bit 0 */
4251
#define UPMB1_L                (0x0002)       /* USB - PLL feedback divider buffer Bit 1 */
4252
#define UPMB2_L                (0x0004)       /* USB - PLL feedback divider buffer Bit 2 */
4253
#define UPMB3_L                (0x0008)       /* USB - PLL feedback divider buffer Bit 3 */
4254
#define UPMB4_L                (0x0010)       /* USB - PLL feedback divider buffer Bit 4 */
4255
#define UPMB5_L                (0x0020)       /* USB - PLL feedback divider buffer Bit 5 */
4256
//#define RESERVED            (0x0040)  /* USB -  */
4257
//#define RESERVED            (0x0080)  /* USB -  */
4258
//#define RESERVED            (0x0800)  /* USB -  */
4259
//#define RESERVED            (0x1000)  /* USB -  */
4260
//#define RESERVED            (0x2000)  /* USB -  */
4261
//#define RESERVED            (0x4000)  /* USB -  */
4262
//#define RESERVED            (0x8000)  /* USB -  */
4263
 
4264
/* USBPLLDIVB Control Bits */
4265
//#define RESERVED            (0x0040)  /* USB -  */
4266
//#define RESERVED            (0x0080)  /* USB -  */
4267
#define UPQB0_H                (0x0001)       /* USB - PLL prescale divider buffer Bit 0 */
4268
#define UPQB1_H                (0x0002)       /* USB - PLL prescale divider buffer Bit 1 */
4269
#define UPQB2_H                (0x0004)       /* USB - PLL prescale divider buffer Bit 2 */
4270
//#define RESERVED            (0x0800)  /* USB -  */
4271
//#define RESERVED            (0x1000)  /* USB -  */
4272
//#define RESERVED            (0x2000)  /* USB -  */
4273
//#define RESERVED            (0x4000)  /* USB -  */
4274
//#define RESERVED            (0x8000)  /* USB -  */
4275
 
4276
#define USBPLL_SETCLK_1_5      (UPMB0*31      | UPQB0*0)  /* USB - PLL Set for 1.5 MHz input clock */
4277
#define USBPLL_SETCLK_1_6      (UPMB0*29      | UPQB0*0)  /* USB - PLL Set for 1.6 MHz input clock */
4278
#define USBPLL_SETCLK_1_7778   (UPMB0*26      | UPQB0*0)  /* USB - PLL Set for 1.7778 MHz input clock */
4279
#define USBPLL_SETCLK_1_8432   (UPMB0*25      | UPQB0*0)  /* USB - PLL Set for 1.8432 MHz input clock */
4280
#define USBPLL_SETCLK_1_8461   (UPMB0*25      | UPQB0*0)  /* USB - PLL Set for 1.8461 MHz input clock */
4281
#define USBPLL_SETCLK_1_92     (UPMB0*24      | UPQB0*0)  /* USB - PLL Set for 1.92 MHz input clock */
4282
#define USBPLL_SETCLK_2_0      (UPMB0*23      | UPQB0*0)  /* USB - PLL Set for 2.0 MHz input clock */
4283
#define USBPLL_SETCLK_2_4      (UPMB0*19      | UPQB0*0)  /* USB - PLL Set for 2.4 MHz input clock */
4284
#define USBPLL_SETCLK_2_6667   (UPMB0*17      | UPQB0*0)  /* USB - PLL Set for 2.6667 MHz input clock */
4285
#define USBPLL_SETCLK_3_0      (UPMB0*15      | UPQB0*0)  /* USB - PLL Set for 3.0 MHz input clock */
4286
#define USBPLL_SETCLK_3_2      (UPMB0*29      | UPQB0*1)  /* USB - PLL Set for 3.2 MHz input clock */
4287
#define USBPLL_SETCLK_3_5556   (UPMB0*26      | UPQB0*1)  /* USB - PLL Set for 3.5556 MHz input clock */
4288
#define USBPLL_SETCLK_3_579545 (UPMB0*26      | UPQB0*1)  /* USB - PLL Set for 3.579546 MHz input clock */
4289
#define USBPLL_SETCLK_3_84     (UPMB0*24      | UPQB0*1)  /* USB - PLL Set for 3.84 MHz input clock */
4290
#define USBPLL_SETCLK_4_0      (UPMB0*23      | UPQB0*1)  /* USB - PLL Set for 4.0 MHz input clock */
4291
#define USBPLL_SETCLK_4_1739   (UPMB0*22      | UPQB0*1)  /* USB - PLL Set for 4.1739 MHz input clock */
4292
#define USBPLL_SETCLK_4_1943   (UPMB0*22      | UPQB0*1)  /* USB - PLL Set for 4.1943 MHz input clock */
4293
#define USBPLL_SETCLK_4_332    (UPMB0*21      | UPQB0*1)  /* USB - PLL Set for 4.332 MHz input clock */
4294
#define USBPLL_SETCLK_4_3636   (UPMB0*21      | UPQB0*1)  /* USB - PLL Set for 4.3636 MHz input clock */
4295
#define USBPLL_SETCLK_4_5      (UPMB0*31      | UPQB0*2)  /* USB - PLL Set for 4.5 MHz input clock */
4296
#define USBPLL_SETCLK_4_8      (UPMB0*19      | UPQB0*1)  /* USB - PLL Set for 4.8 MHz input clock */
4297
#define USBPLL_SETCLK_5_33     (UPMB0*17      | UPQB0*1)  /* USB - PLL Set for 5.33 MHz input clock */
4298
#define USBPLL_SETCLK_5_76     (UPMB0*24      | UPQB0*2)  /* USB - PLL Set for 5.76 MHz input clock */
4299
#define USBPLL_SETCLK_6_0      (UPMB0*23      | UPQB0*2)  /* USB - PLL Set for 6.0 MHz input clock */
4300
#define USBPLL_SETCLK_6_4      (UPMB0*29      | UPQB0*3)  /* USB - PLL Set for 6.4 MHz input clock */
4301
#define USBPLL_SETCLK_7_2      (UPMB0*19      | UPQB0*2)  /* USB - PLL Set for 7.2 MHz input clock */
4302
#define USBPLL_SETCLK_7_68     (UPMB0*24      | UPQB0*3)  /* USB - PLL Set for 7.68 MHz input clock */
4303
#define USBPLL_SETCLK_8_0      (UPMB0*17      | UPQB0*2)  /* USB - PLL Set for 8.0 MHz input clock */
4304
#define USBPLL_SETCLK_9_0      (UPMB0*15      | UPQB0*2)  /* USB - PLL Set for 9.0 MHz input clock */
4305
#define USBPLL_SETCLK_9_6      (UPMB0*19      | UPQB0*3)  /* USB - PLL Set for 9.6 MHz input clock */
4306
#define USBPLL_SETCLK_10_66    (UPMB0*17      | UPQB0*3)  /* USB - PLL Set for 10.66 MHz input clock */
4307
#define USBPLL_SETCLK_12_0     (UPMB0*15      | UPQB0*3)  /* USB - PLL Set for 12.0 MHz input clock */
4308
#define USBPLL_SETCLK_12_8     (UPMB0*29      | UPQB0*5)  /* USB - PLL Set for 12.8 MHz input clock */
4309
#define USBPLL_SETCLK_14_4     (UPMB0*19      | UPQB0*4)  /* USB - PLL Set for 14.4 MHz input clock */
4310
#define USBPLL_SETCLK_16_0     (UPMB0*17      | UPQB0*4)  /* USB - PLL Set for 16.0 MHz input clock */
4311
#define USBPLL_SETCLK_16_9344  (UPMB0*16      | UPQB0*4)  /* USB - PLL Set for 16.9344 MHz input clock */
4312
#define USBPLL_SETCLK_16_94118 (UPMB0*16      | UPQB0*4)  /* USB - PLL Set for 16.94118 MHz input clock */
4313
#define USBPLL_SETCLK_18_0     (UPMB0*15      | UPQB0*4)  /* USB - PLL Set for 18.0 MHz input clock */
4314
#define USBPLL_SETCLK_19_2     (UPMB0*19      | UPQB0*5)  /* USB - PLL Set for 19.2 MHz input clock */
4315
#define USBPLL_SETCLK_24_0     (UPMB0*15      | UPQB0*5)  /* USB - PLL Set for 24.0 MHz input clock */
4316
#define USBPLL_SETCLK_25_6     (UPMB0*29      | UPQB0*7)  /* USB - PLL Set for 25.6 MHz input clock */
4317
#define USBPLL_SETCLK_26_0     (UPMB0*23      | UPQB0*6)  /* USB - PLL Set for 26.0 MHz input clock */
4318
#define USBPLL_SETCLK_32_0     (UPMB0*23      | UPQB0*7)  /* USB - PLL Set for 32.0 MHz input clock */
4319
 
4320
/* USBPLLIR Control Bits */
4321
#define USBOOLIFG              (0x0001)       /* USB - PLL out of lock Interrupt Flag */
4322
#define USBLOSIFG              (0x0002)       /* USB - PLL loss of signal Interrupt Flag */
4323
#define USBOORIFG              (0x0004)       /* USB - PLL out of range Interrupt Flag */
4324
//#define RESERVED            (0x0008)  /* USB -  */
4325
//#define RESERVED            (0x0010)  /* USB -  */
4326
//#define RESERVED            (0x0020)  /* USB -  */
4327
//#define RESERVED            (0x0040)  /* USB -  */
4328
//#define RESERVED            (0x0080)  /* USB -  */
4329
#define USBOOLIE               (0x0100)       /* USB - PLL out of lock Interrupt enable */
4330
#define USBLOSIE               (0x0200)       /* USB - PLL loss of signal Interrupt enable */
4331
#define USBOORIE               (0x0400)       /* USB - PLL out of range Interrupt enable */
4332
//#define RESERVED            (0x0800)  /* USB -  */
4333
//#define RESERVED            (0x1000)  /* USB -  */
4334
//#define RESERVED            (0x2000)  /* USB -  */
4335
//#define RESERVED            (0x4000)  /* USB -  */
4336
//#define RESERVED            (0x8000)  /* USB -  */
4337
 
4338
/* USBPLLIR Control Bits */
4339
#define USBOOLIFG_L            (0x0001)       /* USB - PLL out of lock Interrupt Flag */
4340
#define USBLOSIFG_L            (0x0002)       /* USB - PLL loss of signal Interrupt Flag */
4341
#define USBOORIFG_L            (0x0004)       /* USB - PLL out of range Interrupt Flag */
4342
//#define RESERVED            (0x0008)  /* USB -  */
4343
//#define RESERVED            (0x0010)  /* USB -  */
4344
//#define RESERVED            (0x0020)  /* USB -  */
4345
//#define RESERVED            (0x0040)  /* USB -  */
4346
//#define RESERVED            (0x0080)  /* USB -  */
4347
//#define RESERVED            (0x0800)  /* USB -  */
4348
//#define RESERVED            (0x1000)  /* USB -  */
4349
//#define RESERVED            (0x2000)  /* USB -  */
4350
//#define RESERVED            (0x4000)  /* USB -  */
4351
//#define RESERVED            (0x8000)  /* USB -  */
4352
 
4353
/* USBPLLIR Control Bits */
4354
//#define RESERVED            (0x0008)  /* USB -  */
4355
//#define RESERVED            (0x0010)  /* USB -  */
4356
//#define RESERVED            (0x0020)  /* USB -  */
4357
//#define RESERVED            (0x0040)  /* USB -  */
4358
//#define RESERVED            (0x0080)  /* USB -  */
4359
#define USBOOLIE_H             (0x0001)       /* USB - PLL out of lock Interrupt enable */
4360
#define USBLOSIE_H             (0x0002)       /* USB - PLL loss of signal Interrupt enable */
4361
#define USBOORIE_H             (0x0004)       /* USB - PLL out of range Interrupt enable */
4362
//#define RESERVED            (0x0800)  /* USB -  */
4363
//#define RESERVED            (0x1000)  /* USB -  */
4364
//#define RESERVED            (0x2000)  /* USB -  */
4365
//#define RESERVED            (0x4000)  /* USB -  */
4366
//#define RESERVED            (0x8000)  /* USB -  */
4367
 
4368
/* ========================================================================= */
4369
/* USB Control Registers */
4370
/* ========================================================================= */
4371
SFR_8BIT(USBIEPCNF_0);                        /* USB Input endpoint_0: Configuration */
4372
SFR_8BIT(USBIEPCNT_0);                        /* USB Input endpoint_0: Byte Count */
4373
SFR_8BIT(USBOEPCNF_0);                        /* USB Output endpoint_0: Configuration */
4374
SFR_8BIT(USBOEPCNT_0);                        /* USB Output endpoint_0: byte count */
4375
SFR_8BIT(USBIEPIE);                           /* USB Input endpoint interrupt enable flags */
4376
SFR_8BIT(USBOEPIE);                           /* USB Output endpoint interrupt enable flags */
4377
SFR_8BIT(USBIEPIFG);                          /* USB Input endpoint interrupt flags */
4378
SFR_8BIT(USBOEPIFG);                          /* USB Output endpoint interrupt flags */
4379
SFR_16BIT(USBVECINT);                         /* USB Vector interrupt register */
4380
SFR_8BIT(USBVECINT_L);                        /* USB Vector interrupt register */
4381
SFR_8BIT(USBVECINT_H);                        /* USB Vector interrupt register */
4382
SFR_16BIT(USBMAINT);                          /* USB maintenance register */
4383
SFR_8BIT(USBMAINT_L);                         /* USB maintenance register */
4384
SFR_8BIT(USBMAINT_H);                         /* USB maintenance register */
4385
SFR_16BIT(USBTSREG);                          /* USB Time Stamp register */
4386
SFR_8BIT(USBTSREG_L);                         /* USB Time Stamp register */
4387
SFR_8BIT(USBTSREG_H);                         /* USB Time Stamp register */
4388
SFR_16BIT(USBFN);                             /* USB Frame number */
4389
SFR_8BIT(USBFN_L);                            /* USB Frame number */
4390
SFR_8BIT(USBFN_H);                            /* USB Frame number */
4391
SFR_8BIT(USBCTL);                             /* USB control register */
4392
SFR_8BIT(USBIE);                              /* USB interrupt enable register */
4393
SFR_8BIT(USBIFG);                             /* USB interrupt flag register */
4394
SFR_8BIT(USBFUNADR);                          /* USB Function address register */
4395
 
4396
#define USBIV                  USBVECINT      /* USB Vector interrupt register (alternate define) */
4397
 
4398
/* USBIEPCNF_0 Control Bits */
4399
/* USBOEPCNF_0 Control Bits */
4400
//#define RESERVED       (0x0001)  /* USB -  */
4401
//#define RESERVED       (0x0001)  /* USB -  */
4402
#define USBIIE                 (0x0004)       /* USB - Transaction Interrupt indication enable */
4403
#define STALL                  (0x0008)       /* USB - Stall Condition */
4404
//#define RESERVED       (0x0010)  /* USB -  */
4405
#define TOGGLE                 (0x0020)       /* USB - Toggle Bit */
4406
//#define RESERVED       (0x0040)  /* USB -  */
4407
#define UBME                   (0x0080)       /* USB - UBM In-Endpoint Enable */
4408
 
4409
/* USBIEPBCNT_0 Control Bits */
4410
/* USBOEPBCNT_0 Control Bits */
4411
#define CNT0                   (0x0001)       /* USB - Byte Count Bit 0 */
4412
#define CNT1                   (0x0001)       /* USB - Byte Count Bit 1 */
4413
#define CNT2                   (0x0004)       /* USB - Byte Count Bit 2 */
4414
#define CNT3                   (0x0008)       /* USB - Byte Count Bit 3 */
4415
//#define RESERVED       (0x0010)  /* USB -  */
4416
//#define RESERVED       (0x0020)  /* USB -  */
4417
//#define RESERVED       (0x0040)  /* USB -  */
4418
#define NAK                    (0x0080)       /* USB - No Acknowledge Status Bit */
4419
 
4420
/* USBMAINT Control Bits */
4421
#define UTIFG                  (0x0001)       /* USB - Timer Interrupt Flag */
4422
#define UTIE                   (0x0002)       /* USB - Timer Interrupt Enable */
4423
//#define RESERVED       (0x0004)  /* USB -  */
4424
//#define RESERVED       (0x0008)  /* USB -  */
4425
//#define RESERVED       (0x0010)  /* USB -  */
4426
//#define RESERVED       (0x0020)  /* USB -  */
4427
//#define RESERVED       (0x0040)  /* USB -  */
4428
//#define RESERVED       (0x0080)  /* USB -  */
4429
#define TSGEN                  (0x0100)       /* USB - Time Stamp Generator Enable */
4430
#define TSESEL0                (0x0200)       /* USB - Time Stamp Event Select Bit 0 */
4431
#define TSESEL1                (0x0400)       /* USB - Time Stamp Event Select Bit 1 */
4432
#define TSE3                   (0x0800)       /* USB - Time Stamp Event #3 Bit */
4433
//#define RESERVED       (0x1000)  /* USB -  */
4434
#define UTSEL0                 (0x2000)       /* USB - Timer Select Bit 0 */
4435
#define UTSEL1                 (0x4000)       /* USB - Timer Select Bit 1 */
4436
#define UTSEL2                 (0x8000)       /* USB - Timer Select Bit 2 */
4437
 
4438
/* USBMAINT Control Bits */
4439
#define UTIFG_L                (0x0001)       /* USB - Timer Interrupt Flag */
4440
#define UTIE_L                 (0x0002)       /* USB - Timer Interrupt Enable */
4441
//#define RESERVED       (0x0004)  /* USB -  */
4442
//#define RESERVED       (0x0008)  /* USB -  */
4443
//#define RESERVED       (0x0010)  /* USB -  */
4444
//#define RESERVED       (0x0020)  /* USB -  */
4445
//#define RESERVED       (0x0040)  /* USB -  */
4446
//#define RESERVED       (0x0080)  /* USB -  */
4447
//#define RESERVED       (0x1000)  /* USB -  */
4448
 
4449
/* USBMAINT Control Bits */
4450
//#define RESERVED       (0x0004)  /* USB -  */
4451
//#define RESERVED       (0x0008)  /* USB -  */
4452
//#define RESERVED       (0x0010)  /* USB -  */
4453
//#define RESERVED       (0x0020)  /* USB -  */
4454
//#define RESERVED       (0x0040)  /* USB -  */
4455
//#define RESERVED       (0x0080)  /* USB -  */
4456
#define TSGEN_H                (0x0001)       /* USB - Time Stamp Generator Enable */
4457
#define TSESEL0_H              (0x0002)       /* USB - Time Stamp Event Select Bit 0 */
4458
#define TSESEL1_H              (0x0004)       /* USB - Time Stamp Event Select Bit 1 */
4459
#define TSE3_H                 (0x0008)       /* USB - Time Stamp Event #3 Bit */
4460
//#define RESERVED       (0x1000)  /* USB -  */
4461
#define UTSEL0_H               (0x0020)       /* USB - Timer Select Bit 0 */
4462
#define UTSEL1_H               (0x0040)       /* USB - Timer Select Bit 1 */
4463
#define UTSEL2_H               (0x0080)       /* USB - Timer Select Bit 2 */
4464
 
4465
#define TSESEL_0               (0x0000)       /* USB - Time Stamp Event Select: 0 */
4466
#define TSESEL_1               (0x0200)       /* USB - Time Stamp Event Select: 1 */
4467
#define TSESEL_2               (0x0400)       /* USB - Time Stamp Event Select: 2 */
4468
#define TSESEL_3               (0x0600)       /* USB - Time Stamp Event Select: 3 */
4469
 
4470
#define UTSEL_0                (0x0000)       /* USB - Timer Select: 0 */
4471
#define UTSEL_1                (0x2000)       /* USB - Timer Select: 1 */
4472
#define UTSEL_2                (0x4000)       /* USB - Timer Select: 2 */
4473
#define UTSEL_3                (0x6000)       /* USB - Timer Select: 3 */
4474
#define UTSEL_4                (0x8000)       /* USB - Timer Select: 4 */
4475
#define UTSEL_5                (0xA000)       /* USB - Timer Select: 5 */
4476
#define UTSEL_6                (0xC000)       /* USB - Timer Select: 6 */
4477
#define UTSEL_7                (0xE000)       /* USB - Timer Select: 7 */
4478
 
4479
/* USBCTL Control Bits */
4480
#define DIR                    (0x0001)       /* USB - Data Response Bit */
4481
//#define RESERVED       (0x0002)  /* USB -  */
4482
//#define RESERVED       (0x0004)  /* USB -  */
4483
//#define RESERVED       (0x0008)  /* USB -  */
4484
#define FRSTE                  (0x0010)       /* USB - Function Reset Connection Enable */
4485
#define RWUP                   (0x0020)       /* USB - Device Remote Wakeup Request */
4486
#define FEN                    (0x0040)       /* USB - Function Enable Bit */
4487
//#define RESERVED       (0x0080)  /* USB -  */
4488
 
4489
/* USBIE Control Bits */
4490
#define STPOWIE                (0x0001)       /* USB - Setup Overwrite Interrupt Enable */
4491
//#define RESERVED       (0x0002)  /* USB -  */
4492
#define SETUPIE                (0x0004)       /* USB - Setup Interrupt Enable */
4493
//#define RESERVED       (0x0008)  /* USB -  */
4494
//#define RESERVED       (0x0010)  /* USB -  */
4495
#define RESRIE                 (0x0020)       /* USB - Function Resume Request Interrupt Enable */
4496
#define SUSRIE                 (0x0040)       /* USB - Function Suspend Request Interrupt Enable */
4497
#define RSTRIE                 (0x0080)       /* USB - Function Reset Request Interrupt Enable */
4498
 
4499
/* USBIFG Control Bits */
4500
#define STPOWIFG               (0x0001)       /* USB - Setup Overwrite Interrupt Flag */
4501
//#define RESERVED       (0x0002)  /* USB -  */
4502
#define SETUPIFG               (0x0004)       /* USB - Setup Interrupt Flag */
4503
//#define RESERVED       (0x0008)  /* USB -  */
4504
//#define RESERVED       (0x0010)  /* USB -  */
4505
#define RESRIFG                (0x0020)       /* USB - Function Resume Request Interrupt Flag */
4506
#define SUSRIFG                (0x0040)       /* USB - Function Suspend Request Interrupt Flag */
4507
#define RSTRIFG                (0x0080)       /* USB - Function Reset Request Interrupt Flag */
4508
 
4509
//values of USBVECINT when USB-interrupt occured
4510
#define     USBVECINT_NONE     0x00
4511
#define     USBVECINT_PWR_DROP 0x02
4512
#define     USBVECINT_PLL_LOCK 0x04
4513
#define     USBVECINT_PLL_SIGNAL 0x06
4514
#define     USBVECINT_PLL_RANGE 0x08
4515
#define     USBVECINT_PWR_VBUSOn 0x0A
4516
#define     USBVECINT_PWR_VBUSOff 0x0C
4517
#define     USBVECINT_USB_TIMESTAMP 0x10
4518
#define     USBVECINT_INPUT_ENDPOINT0 0x12
4519
#define     USBVECINT_OUTPUT_ENDPOINT0 0x14
4520
#define     USBVECINT_RSTR     0x16
4521
#define     USBVECINT_SUSR     0x18
4522
#define     USBVECINT_RESR     0x1A
4523
#define     USBVECINT_SETUP_PACKET_RECEIVED 0x20
4524
#define     USBVECINT_STPOW_PACKET_RECEIVED 0x22
4525
#define     USBVECINT_INPUT_ENDPOINT1 0x24
4526
#define     USBVECINT_INPUT_ENDPOINT2 0x26
4527
#define     USBVECINT_INPUT_ENDPOINT3 0x28
4528
#define     USBVECINT_INPUT_ENDPOINT4 0x2A
4529
#define     USBVECINT_INPUT_ENDPOINT5 0x2C
4530
#define     USBVECINT_INPUT_ENDPOINT6 0x2E
4531
#define     USBVECINT_INPUT_ENDPOINT7 0x30
4532
#define     USBVECINT_OUTPUT_ENDPOINT1 0x32
4533
#define     USBVECINT_OUTPUT_ENDPOINT2 0x34
4534
#define     USBVECINT_OUTPUT_ENDPOINT3 0x36
4535
#define     USBVECINT_OUTPUT_ENDPOINT4 0x38
4536
#define     USBVECINT_OUTPUT_ENDPOINT5 0x3A
4537
#define     USBVECINT_OUTPUT_ENDPOINT6 0x3C
4538
#define     USBVECINT_OUTPUT_ENDPOINT7 0x3E
4539
 
4540
 
4541
/* ========================================================================= */
4542
/* USB Operation Registers */
4543
/* ========================================================================= */
4544
 
4545
SFR_8BIT(USBIEPSIZXY_7);                      /* Input Endpoint_7: X/Y-buffer size  */
4546
SFR_8BIT(USBIEPBCTY_7);                       /* Input Endpoint_7: Y-byte count  */
4547
SFR_8BIT(USBIEPBBAY_7);                       /* Input Endpoint_7: Y-buffer base addr.  */
4548
//sfrb    Spare    (0x23FC)   /* Not used  */
4549
//sfrb    Spare    (0x23FB)   /* Not used  */
4550
SFR_8BIT(USBIEPBCTX_7);                       /* Input Endpoint_7: X-byte count  */
4551
SFR_8BIT(USBIEPBBAX_7);                       /* Input Endpoint_7: X-buffer base addr. */
4552
SFR_8BIT(USBIEPCNF_7);                        /* Input Endpoint_7: Configuration  */
4553
SFR_8BIT(USBIEPSIZXY_6);                      /* Input Endpoint_6: X/Y-buffer size  */
4554
SFR_8BIT(USBIEPBCTY_6);                       /* Input Endpoint_6: Y-byte count */
4555
SFR_8BIT(USBIEPBBAY_6);                       /* Input Endpoint_6: Y-buffer base addr. */
4556
//sfrb    Spare    (0x23F4)   /* Not used  */
4557
//sfrb    Spare    (0x23F3)   /* Not used  */
4558
SFR_8BIT(USBIEPBCTX_6);                       /* Input Endpoint_6: X-byte count */
4559
SFR_8BIT(USBIEPBBAX_6);                       /* Input Endpoint_6: X-buffer base addr. */
4560
SFR_8BIT(USBIEPCNF_6);                        /* Input Endpoint_6: Configuration */
4561
SFR_8BIT(USBIEPSIZXY_5);                      /* Input Endpoint_5: X/Y-buffer size */
4562
SFR_8BIT(USBIEPBCTY_5);                       /* Input Endpoint_5: Y-byte count */
4563
SFR_8BIT(USBIEPBBAY_5);                       /* Input Endpoint_5: Y-buffer base addr. */
4564
//sfrb    Spare    (0x23EC)   /* Not used */
4565
//sfrb    Spare    (0x23EB)   /* Not used */
4566
SFR_8BIT(USBIEPBCTX_5);                       /* Input Endpoint_5: X-byte count */
4567
SFR_8BIT(USBIEPBBAX_5);                       /* Input Endpoint_5: X-buffer base addr. */
4568
SFR_8BIT(USBIEPCNF_5);                        /* Input Endpoint_5: Configuration */
4569
SFR_8BIT(USBIEPSIZXY_4);                      /* Input Endpoint_4: X/Y-buffer size */
4570
SFR_8BIT(USBIEPBCTY_4);                       /* Input Endpoint_4: Y-byte count */
4571
SFR_8BIT(USBIEPBBAY_4);                       /* Input Endpoint_4: Y-buffer base addr. */
4572
//sfrb    Spare    (0x23E4)   /* Not used */
4573
//sfrb    Spare    (0x23E3)   /* Not used */
4574
SFR_8BIT(USBIEPBCTX_4);                       /* Input Endpoint_4: X-byte count */
4575
SFR_8BIT(USBIEPBBAX_4);                       /* Input Endpoint_4: X-buffer base addr. */
4576
SFR_8BIT(USBIEPCNF_4);                        /* Input Endpoint_4: Configuration */
4577
SFR_8BIT(USBIEPSIZXY_3);                      /* Input Endpoint_3: X/Y-buffer size */
4578
SFR_8BIT(USBIEPBCTY_3);                       /* Input Endpoint_3: Y-byte count */
4579
SFR_8BIT(USBIEPBBAY_3);                       /* Input Endpoint_3: Y-buffer base addr. */
4580
//sfrb    Spare    (0x23DC)   /* Not used */
4581
//sfrb    Spare    (0x23DB)   /* Not used */
4582
SFR_8BIT(USBIEPBCTX_3);                       /* Input Endpoint_3: X-byte count */
4583
SFR_8BIT(USBIEPBBAX_3);                       /* Input Endpoint_3: X-buffer base addr. */
4584
SFR_8BIT(USBIEPCNF_3);                        /* Input Endpoint_3: Configuration */
4585
SFR_8BIT(USBIEPSIZXY_2);                      /* Input Endpoint_2: X/Y-buffer size */
4586
SFR_8BIT(USBIEPBCTY_2);                       /* Input Endpoint_2: Y-byte count */
4587
SFR_8BIT(USBIEPBBAY_2);                       /* Input Endpoint_2: Y-buffer base addr. */
4588
//sfrb    Spare    (0x23D4)   /* Not used */
4589
//sfrb    Spare    (0x23D3)   /* Not used */
4590
SFR_8BIT(USBIEPBCTX_2);                       /* Input Endpoint_2: X-byte count */
4591
SFR_8BIT(USBIEPBBAX_2);                       /* Input Endpoint_2: X-buffer base addr. */
4592
SFR_8BIT(USBIEPCNF_2);                        /* Input Endpoint_2: Configuration */
4593
SFR_8BIT(USBIEPSIZXY_1);                      /* Input Endpoint_1: X/Y-buffer size */
4594
SFR_8BIT(USBIEPBCTY_1);                       /* Input Endpoint_1: Y-byte count */
4595
SFR_8BIT(USBIEPBBAY_1);                       /* Input Endpoint_1: Y-buffer base addr. */
4596
//sfrb    Spare    (0x23CC)   /* Not used */
4597
//sfrb    Spare    (0x23CB)   /* Not used */
4598
SFR_8BIT(USBIEPBCTX_1);                       /* Input Endpoint_1: X-byte count */
4599
SFR_8BIT(USBIEPBBAX_1);                       /* Input Endpoint_1: X-buffer base addr. */
4600
SFR_8BIT(USBIEPCNF_1);                        /* Input Endpoint_1: Configuration */
4601
//sfrb       (0x23C7)   0x0000 */
4602
//sfrb     RESERVED      (0x1C00)    /* */
4603
//sfrb       (0x23C0)   0x0000 */
4604
SFR_8BIT(USBOEPSIZXY_7);                      /* Output Endpoint_7: X/Y-buffer size */
4605
SFR_8BIT(USBOEPBCTY_7);                       /* Output Endpoint_7: Y-byte count */
4606
SFR_8BIT(USBOEPBBAY_7);                       /* Output Endpoint_7: Y-buffer base addr. */
4607
//sfrb    Spare    (0x23BC)   /* Not used */
4608
//sfrb    Spare    (0x23BB)   /* Not used */
4609
SFR_8BIT(USBOEPBCTX_7);                       /* Output Endpoint_7: X-byte count */
4610
SFR_8BIT(USBOEPBBAX_7);                       /* Output Endpoint_7: X-buffer base addr. */
4611
SFR_8BIT(USBOEPCNF_7);                        /* Output Endpoint_7: Configuration */
4612
SFR_8BIT(USBOEPSIZXY_6);                      /* Output Endpoint_6: X/Y-buffer size */
4613
SFR_8BIT(USBOEPBCTY_6);                       /* Output Endpoint_6: Y-byte count */
4614
SFR_8BIT(USBOEPBBAY_6);                       /* Output Endpoint_6: Y-buffer base addr. */
4615
//sfrb    Spare    (0x23B4)   /* Not used */
4616
//sfrb    Spare    (0x23B3)   /* Not used */
4617
SFR_8BIT(USBOEPBCTX_6);                       /* Output Endpoint_6: X-byte count */
4618
SFR_8BIT(USBOEPBBAX_6);                       /* Output Endpoint_6: X-buffer base addr. */
4619
SFR_8BIT(USBOEPCNF_6);                        /* Output Endpoint_6: Configuration */
4620
SFR_8BIT(USBOEPSIZXY_5);                      /* Output Endpoint_5: X/Y-buffer size */
4621
SFR_8BIT(USBOEPBCTY_5);                       /* Output Endpoint_5: Y-byte count */
4622
SFR_8BIT(USBOEPBBAY_5);                       /* Output Endpoint_5: Y-buffer base addr. */
4623
//sfrb    Spare    (0x23AC)   /* Not used */
4624
//sfrb    Spare    (0x23AB)   /* Not used */
4625
SFR_8BIT(USBOEPBCTX_5);                       /* Output Endpoint_5: X-byte count */
4626
SFR_8BIT(USBOEPBBAX_5);                       /* Output Endpoint_5: X-buffer base addr. */
4627
SFR_8BIT(USBOEPCNF_5);                        /* Output Endpoint_5: Configuration */
4628
SFR_8BIT(USBOEPSIZXY_4);                      /* Output Endpoint_4: X/Y-buffer size */
4629
SFR_8BIT(USBOEPBCTY_4);                       /* Output Endpoint_4: Y-byte count */
4630
SFR_8BIT(USBOEPBBAY_4);                       /* Output Endpoint_4: Y-buffer base addr. */
4631
//sfrb    Spare    (0x23A4)   /* Not used */
4632
//sfrb    Spare    (0x23A3)   /* Not used */
4633
SFR_8BIT(USBOEPBCTX_4);                       /* Output Endpoint_4: X-byte count */
4634
SFR_8BIT(USBOEPBBAX_4);                       /* Output Endpoint_4: X-buffer base addr. */
4635
SFR_8BIT(USBOEPCNF_4);                        /* Output Endpoint_4: Configuration */
4636
SFR_8BIT(USBOEPSIZXY_3);                      /* Output Endpoint_3: X/Y-buffer size */
4637
SFR_8BIT(USBOEPBCTY_3);                       /* Output Endpoint_3: Y-byte count */
4638
SFR_8BIT(USBOEPBBAY_3);                       /* Output Endpoint_3: Y-buffer base addr. */
4639
//sfrb    Spare    (0x239C)   /* Not used */
4640
//sfrb    Spare    (0x239B)   /* Not used */
4641
SFR_8BIT(USBOEPBCTX_3);                       /* Output Endpoint_3: X-byte count */
4642
SFR_8BIT(USBOEPBBAX_3);                       /* Output Endpoint_3: X-buffer base addr. */
4643
SFR_8BIT(USBOEPCNF_3);                        /* Output Endpoint_3: Configuration */
4644
SFR_8BIT(USBOEPSIZXY_2);                      /* Output Endpoint_2: X/Y-buffer size */
4645
SFR_8BIT(USBOEPBCTY_2);                       /* Output Endpoint_2: Y-byte count */
4646
SFR_8BIT(USBOEPBBAY_2);                       /* Output Endpoint_2: Y-buffer base addr. */
4647
//sfrb    Spare    (0x2394)   /* Not used */
4648
//sfrb    Spare    (0x2393)   /* Not used */
4649
SFR_8BIT(USBOEPBCTX_2);                       /* Output Endpoint_2: X-byte count */
4650
SFR_8BIT(USBOEPBBAX_2);                       /* Output Endpoint_2: X-buffer base addr. */
4651
SFR_8BIT(USBOEPCNF_2);                        /* Output Endpoint_2: Configuration */
4652
SFR_8BIT(USBOEPSIZXY_1);                      /* Output Endpoint_1: X/Y-buffer size */
4653
SFR_8BIT(USBOEPBCTY_1);                       /* Output Endpoint_1: Y-byte count */
4654
SFR_8BIT(USBOEPBBAY_1);                       /* Output Endpoint_1: Y-buffer base addr. */
4655
//sfrb    Spare    (0x238C)   /* Not used */
4656
//sfrb    Spare    (0x238B)   /* Not used */
4657
SFR_8BIT(USBOEPBCTX_1);                       /* Output Endpoint_1: X-byte count */
4658
SFR_8BIT(USBOEPBBAX_1);                       /* Output Endpoint_1: X-buffer base addr. */
4659
SFR_8BIT(USBOEPCNF_1);                        /* Output Endpoint_1: Configuration */
4660
SFR_8BIT(USBSUBLK);                           /* Setup Packet Block */
4661
SFR_8BIT(USBIEP0BUF);                         /* Input endpoint_0 buffer */
4662
SFR_8BIT(USBOEP0BUF);                         /* Output endpoint_0 buffer */
4663
SFR_8BIT(USBTOPBUFF);                         /* Top of buffer space */
4664
//         (1904 Bytes)               /* Buffer space */
4665
SFR_8BIT(USBSTABUFF);                         /* Start of buffer space */
4666
 
4667
/* USBIEPCNF_n Control Bits */
4668
/* USBOEPCNF_n Control Bits */
4669
//#define RESERVED       (0x0001)  /* USB -  */
4670
//#define RESERVED       (0x0001)  /* USB -  */
4671
#define DBUF                   (0x0010)       /* USB - Double Buffer Enable */
4672
//#define RESERVED       (0x0040)  /* USB -  */
4673
 
4674
/* USBIEPBCNT_n Control Bits */
4675
/* USBOEPBCNT_n Control Bits */
4676
#define CNT4                   (0x0010)       /* USB - Byte Count Bit 3 */
4677
#define CNT5                   (0x0020)       /* USB - Byte Count Bit 3 */
4678
#define CNT6                   (0x0040)       /* USB - Byte Count Bit 3 */
4679
/************************************************************
4680
* UNIFIED CLOCK SYSTEM
4681
************************************************************/
4682
#define __MSP430_HAS_UCS__                    /* Definition to show that Module is available */
4683
#define __MSP430_BASEADDRESS_UCS__ 0x0160
4684
 
4685
SFR_16BIT(UCSCTL0);                           /* UCS Control Register 0 */
4686
SFR_8BIT(UCSCTL0_L);                          /* UCS Control Register 0 */
4687
SFR_8BIT(UCSCTL0_H);                          /* UCS Control Register 0 */
4688
SFR_16BIT(UCSCTL1);                           /* UCS Control Register 1 */
4689
SFR_8BIT(UCSCTL1_L);                          /* UCS Control Register 1 */
4690
SFR_8BIT(UCSCTL1_H);                          /* UCS Control Register 1 */
4691
SFR_16BIT(UCSCTL2);                           /* UCS Control Register 2 */
4692
SFR_8BIT(UCSCTL2_L);                          /* UCS Control Register 2 */
4693
SFR_8BIT(UCSCTL2_H);                          /* UCS Control Register 2 */
4694
SFR_16BIT(UCSCTL3);                           /* UCS Control Register 3 */
4695
SFR_8BIT(UCSCTL3_L);                          /* UCS Control Register 3 */
4696
SFR_8BIT(UCSCTL3_H);                          /* UCS Control Register 3 */
4697
SFR_16BIT(UCSCTL4);                           /* UCS Control Register 4 */
4698
SFR_8BIT(UCSCTL4_L);                          /* UCS Control Register 4 */
4699
SFR_8BIT(UCSCTL4_H);                          /* UCS Control Register 4 */
4700
SFR_16BIT(UCSCTL5);                           /* UCS Control Register 5 */
4701
SFR_8BIT(UCSCTL5_L);                          /* UCS Control Register 5 */
4702
SFR_8BIT(UCSCTL5_H);                          /* UCS Control Register 5 */
4703
SFR_16BIT(UCSCTL6);                           /* UCS Control Register 6 */
4704
SFR_8BIT(UCSCTL6_L);                          /* UCS Control Register 6 */
4705
SFR_8BIT(UCSCTL6_H);                          /* UCS Control Register 6 */
4706
SFR_16BIT(UCSCTL7);                           /* UCS Control Register 7 */
4707
SFR_8BIT(UCSCTL7_L);                          /* UCS Control Register 7 */
4708
SFR_8BIT(UCSCTL7_H);                          /* UCS Control Register 7 */
4709
SFR_16BIT(UCSCTL8);                           /* UCS Control Register 8 */
4710
SFR_8BIT(UCSCTL8_L);                          /* UCS Control Register 8 */
4711
SFR_8BIT(UCSCTL8_H);                          /* UCS Control Register 8 */
4712
 
4713
/* UCSCTL0 Control Bits */
4714
//#define RESERVED            (0x0001)    /* RESERVED */
4715
//#define RESERVED            (0x0002)    /* RESERVED */
4716
//#define RESERVED            (0x0004)    /* RESERVED */
4717
#define MOD0                   (0x0008)       /* Modulation Bit Counter Bit : 0 */
4718
#define MOD1                   (0x0010)       /* Modulation Bit Counter Bit : 1 */
4719
#define MOD2                   (0x0020)       /* Modulation Bit Counter Bit : 2 */
4720
#define MOD3                   (0x0040)       /* Modulation Bit Counter Bit : 3 */
4721
#define MOD4                   (0x0080)       /* Modulation Bit Counter Bit : 4 */
4722
#define DCO0                   (0x0100)       /* DCO TAP Bit : 0 */
4723
#define DCO1                   (0x0200)       /* DCO TAP Bit : 1 */
4724
#define DCO2                   (0x0400)       /* DCO TAP Bit : 2 */
4725
#define DCO3                   (0x0800)       /* DCO TAP Bit : 3 */
4726
#define DCO4                   (0x1000)       /* DCO TAP Bit : 4 */
4727
//#define RESERVED            (0x2000)    /* RESERVED */
4728
//#define RESERVED            (0x4000)    /* RESERVED */
4729
//#define RESERVED            (0x8000)    /* RESERVED */
4730
 
4731
/* UCSCTL0 Control Bits */
4732
//#define RESERVED            (0x0001)    /* RESERVED */
4733
//#define RESERVED            (0x0002)    /* RESERVED */
4734
//#define RESERVED            (0x0004)    /* RESERVED */
4735
#define MOD0_L                 (0x0008)       /* Modulation Bit Counter Bit : 0 */
4736
#define MOD1_L                 (0x0010)       /* Modulation Bit Counter Bit : 1 */
4737
#define MOD2_L                 (0x0020)       /* Modulation Bit Counter Bit : 2 */
4738
#define MOD3_L                 (0x0040)       /* Modulation Bit Counter Bit : 3 */
4739
#define MOD4_L                 (0x0080)       /* Modulation Bit Counter Bit : 4 */
4740
//#define RESERVED            (0x2000)    /* RESERVED */
4741
//#define RESERVED            (0x4000)    /* RESERVED */
4742
//#define RESERVED            (0x8000)    /* RESERVED */
4743
 
4744
/* UCSCTL0 Control Bits */
4745
//#define RESERVED            (0x0001)    /* RESERVED */
4746
//#define RESERVED            (0x0002)    /* RESERVED */
4747
//#define RESERVED            (0x0004)    /* RESERVED */
4748
#define DCO0_H                 (0x0001)       /* DCO TAP Bit : 0 */
4749
#define DCO1_H                 (0x0002)       /* DCO TAP Bit : 1 */
4750
#define DCO2_H                 (0x0004)       /* DCO TAP Bit : 2 */
4751
#define DCO3_H                 (0x0008)       /* DCO TAP Bit : 3 */
4752
#define DCO4_H                 (0x0010)       /* DCO TAP Bit : 4 */
4753
//#define RESERVED            (0x2000)    /* RESERVED */
4754
//#define RESERVED            (0x4000)    /* RESERVED */
4755
//#define RESERVED            (0x8000)    /* RESERVED */
4756
 
4757
/* UCSCTL1 Control Bits */
4758
#define DISMOD                 (0x0001)       /* Disable Modulation */
4759
//#define RESERVED            (0x0002)    /* RESERVED */
4760
//#define RESERVED            (0x0004)    /* RESERVED */
4761
//#define RESERVED            (0x0008)    /* RESERVED */
4762
#define DCORSEL0               (0x0010)       /* DCO Freq. Range Select Bit : 0 */
4763
#define DCORSEL1               (0x0020)       /* DCO Freq. Range Select Bit : 1 */
4764
#define DCORSEL2               (0x0040)       /* DCO Freq. Range Select Bit : 2 */
4765
//#define RESERVED            (0x0080)    /* RESERVED */
4766
//#define RESERVED            (0x0100)    /* RESERVED */
4767
//#define RESERVED            (0x0200)    /* RESERVED */
4768
//#define RESERVED            (0x0400)    /* RESERVED */
4769
//#define RESERVED            (0x0800)    /* RESERVED */
4770
//#define RESERVED            (0x1000)    /* RESERVED */
4771
//#define RESERVED            (0x2000)    /* RESERVED */
4772
//#define RESERVED            (0x4000)    /* RESERVED */
4773
//#define RESERVED            (0x8000)    /* RESERVED */
4774
 
4775
/* UCSCTL1 Control Bits */
4776
#define DISMOD_L               (0x0001)       /* Disable Modulation */
4777
//#define RESERVED            (0x0002)    /* RESERVED */
4778
//#define RESERVED            (0x0004)    /* RESERVED */
4779
//#define RESERVED            (0x0008)    /* RESERVED */
4780
#define DCORSEL0_L             (0x0010)       /* DCO Freq. Range Select Bit : 0 */
4781
#define DCORSEL1_L             (0x0020)       /* DCO Freq. Range Select Bit : 1 */
4782
#define DCORSEL2_L             (0x0040)       /* DCO Freq. Range Select Bit : 2 */
4783
//#define RESERVED            (0x0080)    /* RESERVED */
4784
//#define RESERVED            (0x0100)    /* RESERVED */
4785
//#define RESERVED            (0x0200)    /* RESERVED */
4786
//#define RESERVED            (0x0400)    /* RESERVED */
4787
//#define RESERVED            (0x0800)    /* RESERVED */
4788
//#define RESERVED            (0x1000)    /* RESERVED */
4789
//#define RESERVED            (0x2000)    /* RESERVED */
4790
//#define RESERVED            (0x4000)    /* RESERVED */
4791
//#define RESERVED            (0x8000)    /* RESERVED */
4792
 
4793
/* UCSCTL1 Control Bits */
4794
//#define RESERVED            (0x0002)    /* RESERVED */
4795
//#define RESERVED            (0x0004)    /* RESERVED */
4796
//#define RESERVED            (0x0008)    /* RESERVED */
4797
//#define RESERVED            (0x0080)    /* RESERVED */
4798
//#define RESERVED            (0x0100)    /* RESERVED */
4799
//#define RESERVED            (0x0200)    /* RESERVED */
4800
//#define RESERVED            (0x0400)    /* RESERVED */
4801
//#define RESERVED            (0x0800)    /* RESERVED */
4802
//#define RESERVED            (0x1000)    /* RESERVED */
4803
//#define RESERVED            (0x2000)    /* RESERVED */
4804
//#define RESERVED            (0x4000)    /* RESERVED */
4805
//#define RESERVED            (0x8000)    /* RESERVED */
4806
 
4807
#define DCORSEL_0              (0x0000)       /* DCO RSEL 0 */
4808
#define DCORSEL_1              (0x0010)       /* DCO RSEL 1 */
4809
#define DCORSEL_2              (0x0020)       /* DCO RSEL 2 */
4810
#define DCORSEL_3              (0x0030)       /* DCO RSEL 3 */
4811
#define DCORSEL_4              (0x0040)       /* DCO RSEL 4 */
4812
#define DCORSEL_5              (0x0050)       /* DCO RSEL 5 */
4813
#define DCORSEL_6              (0x0060)       /* DCO RSEL 6 */
4814
#define DCORSEL_7              (0x0070)       /* DCO RSEL 7 */
4815
 
4816
/* UCSCTL2 Control Bits */
4817
#define FLLN0                  (0x0001)       /* FLL Multipier Bit : 0 */
4818
#define FLLN1                  (0x0002)       /* FLL Multipier Bit : 1 */
4819
#define FLLN2                  (0x0004)       /* FLL Multipier Bit : 2 */
4820
#define FLLN3                  (0x0008)       /* FLL Multipier Bit : 3 */
4821
#define FLLN4                  (0x0010)       /* FLL Multipier Bit : 4 */
4822
#define FLLN5                  (0x0020)       /* FLL Multipier Bit : 5 */
4823
#define FLLN6                  (0x0040)       /* FLL Multipier Bit : 6 */
4824
#define FLLN7                  (0x0080)       /* FLL Multipier Bit : 7 */
4825
#define FLLN8                  (0x0100)       /* FLL Multipier Bit : 8 */
4826
#define FLLN9                  (0x0200)       /* FLL Multipier Bit : 9 */
4827
//#define RESERVED            (0x0400)    /* RESERVED */
4828
//#define RESERVED            (0x0800)    /* RESERVED */
4829
#define FLLD0                  (0x1000)       /* Loop Divider Bit : 0 */
4830
#define FLLD1                  (0x2000)       /* Loop Divider Bit : 1 */
4831
#define FLLD2                  (0x4000)       /* Loop Divider Bit : 1 */
4832
//#define RESERVED            (0x8000)    /* RESERVED */
4833
 
4834
/* UCSCTL2 Control Bits */
4835
#define FLLN0_L                (0x0001)       /* FLL Multipier Bit : 0 */
4836
#define FLLN1_L                (0x0002)       /* FLL Multipier Bit : 1 */
4837
#define FLLN2_L                (0x0004)       /* FLL Multipier Bit : 2 */
4838
#define FLLN3_L                (0x0008)       /* FLL Multipier Bit : 3 */
4839
#define FLLN4_L                (0x0010)       /* FLL Multipier Bit : 4 */
4840
#define FLLN5_L                (0x0020)       /* FLL Multipier Bit : 5 */
4841
#define FLLN6_L                (0x0040)       /* FLL Multipier Bit : 6 */
4842
#define FLLN7_L                (0x0080)       /* FLL Multipier Bit : 7 */
4843
//#define RESERVED            (0x0400)    /* RESERVED */
4844
//#define RESERVED            (0x0800)    /* RESERVED */
4845
//#define RESERVED            (0x8000)    /* RESERVED */
4846
 
4847
/* UCSCTL2 Control Bits */
4848
#define FLLN8_H                (0x0001)       /* FLL Multipier Bit : 8 */
4849
#define FLLN9_H                (0x0002)       /* FLL Multipier Bit : 9 */
4850
//#define RESERVED            (0x0400)    /* RESERVED */
4851
//#define RESERVED            (0x0800)    /* RESERVED */
4852
#define FLLD0_H                (0x0010)       /* Loop Divider Bit : 0 */
4853
#define FLLD1_H                (0x0020)       /* Loop Divider Bit : 1 */
4854
#define FLLD2_H                (0x0040)       /* Loop Divider Bit : 1 */
4855
//#define RESERVED            (0x8000)    /* RESERVED */
4856
 
4857
#define FLLD_0                 (0x0000)       /* Multiply Selected Loop Freq. 1 */
4858
#define FLLD_1                 (0x1000)       /* Multiply Selected Loop Freq. 2 */
4859
#define FLLD_2                 (0x2000)       /* Multiply Selected Loop Freq. 4 */
4860
#define FLLD_3                 (0x3000)       /* Multiply Selected Loop Freq. 8 */
4861
#define FLLD_4                 (0x4000)       /* Multiply Selected Loop Freq. 16 */
4862
#define FLLD_5                 (0x5000)       /* Multiply Selected Loop Freq. 32 */
4863
#define FLLD_6                 (0x6000)       /* Multiply Selected Loop Freq. 32 */
4864
#define FLLD_7                 (0x7000)       /* Multiply Selected Loop Freq. 32 */
4865
#define FLLD__1                (0x0000)       /* Multiply Selected Loop Freq. By 1 */
4866
#define FLLD__2                (0x1000)       /* Multiply Selected Loop Freq. By 2 */
4867
#define FLLD__4                (0x2000)       /* Multiply Selected Loop Freq. By 4 */
4868
#define FLLD__8                (0x3000)       /* Multiply Selected Loop Freq. By 8 */
4869
#define FLLD__16               (0x4000)       /* Multiply Selected Loop Freq. By 16 */
4870
#define FLLD__32               (0x5000)       /* Multiply Selected Loop Freq. By 32 */
4871
 
4872
/* UCSCTL3 Control Bits */
4873
#define FLLREFDIV0             (0x0001)       /* Reference Divider Bit : 0 */
4874
#define FLLREFDIV1             (0x0002)       /* Reference Divider Bit : 1 */
4875
#define FLLREFDIV2             (0x0004)       /* Reference Divider Bit : 2 */
4876
//#define RESERVED            (0x0008)    /* RESERVED */
4877
#define SELREF0                (0x0010)       /* FLL Reference Clock Select Bit : 0 */
4878
#define SELREF1                (0x0020)       /* FLL Reference Clock Select Bit : 1 */
4879
#define SELREF2                (0x0040)       /* FLL Reference Clock Select Bit : 2 */
4880
//#define RESERVED            (0x0080)    /* RESERVED */
4881
//#define RESERVED            (0x0100)    /* RESERVED */
4882
//#define RESERVED            (0x0200)    /* RESERVED */
4883
//#define RESERVED            (0x0400)    /* RESERVED */
4884
//#define RESERVED            (0x0800)    /* RESERVED */
4885
//#define RESERVED            (0x1000)    /* RESERVED */
4886
//#define RESERVED            (0x2000)    /* RESERVED */
4887
//#define RESERVED            (0x4000)    /* RESERVED */
4888
//#define RESERVED            (0x8000)    /* RESERVED */
4889
 
4890
/* UCSCTL3 Control Bits */
4891
#define FLLREFDIV0_L           (0x0001)       /* Reference Divider Bit : 0 */
4892
#define FLLREFDIV1_L           (0x0002)       /* Reference Divider Bit : 1 */
4893
#define FLLREFDIV2_L           (0x0004)       /* Reference Divider Bit : 2 */
4894
//#define RESERVED            (0x0008)    /* RESERVED */
4895
#define SELREF0_L              (0x0010)       /* FLL Reference Clock Select Bit : 0 */
4896
#define SELREF1_L              (0x0020)       /* FLL Reference Clock Select Bit : 1 */
4897
#define SELREF2_L              (0x0040)       /* FLL Reference Clock Select Bit : 2 */
4898
//#define RESERVED            (0x0080)    /* RESERVED */
4899
//#define RESERVED            (0x0100)    /* RESERVED */
4900
//#define RESERVED            (0x0200)    /* RESERVED */
4901
//#define RESERVED            (0x0400)    /* RESERVED */
4902
//#define RESERVED            (0x0800)    /* RESERVED */
4903
//#define RESERVED            (0x1000)    /* RESERVED */
4904
//#define RESERVED            (0x2000)    /* RESERVED */
4905
//#define RESERVED            (0x4000)    /* RESERVED */
4906
//#define RESERVED            (0x8000)    /* RESERVED */
4907
 
4908
/* UCSCTL3 Control Bits */
4909
//#define RESERVED            (0x0008)    /* RESERVED */
4910
//#define RESERVED            (0x0080)    /* RESERVED */
4911
//#define RESERVED            (0x0100)    /* RESERVED */
4912
//#define RESERVED            (0x0200)    /* RESERVED */
4913
//#define RESERVED            (0x0400)    /* RESERVED */
4914
//#define RESERVED            (0x0800)    /* RESERVED */
4915
//#define RESERVED            (0x1000)    /* RESERVED */
4916
//#define RESERVED            (0x2000)    /* RESERVED */
4917
//#define RESERVED            (0x4000)    /* RESERVED */
4918
//#define RESERVED            (0x8000)    /* RESERVED */
4919
 
4920
#define FLLREFDIV_0            (0x0000)       /* Reference Divider: f(LFCLK)/1 */
4921
#define FLLREFDIV_1            (0x0001)       /* Reference Divider: f(LFCLK)/2 */
4922
#define FLLREFDIV_2            (0x0002)       /* Reference Divider: f(LFCLK)/4 */
4923
#define FLLREFDIV_3            (0x0003)       /* Reference Divider: f(LFCLK)/8 */
4924
#define FLLREFDIV_4            (0x0004)       /* Reference Divider: f(LFCLK)/12 */
4925
#define FLLREFDIV_5            (0x0005)       /* Reference Divider: f(LFCLK)/16 */
4926
#define FLLREFDIV_6            (0x0006)       /* Reference Divider: f(LFCLK)/16 */
4927
#define FLLREFDIV_7            (0x0007)       /* Reference Divider: f(LFCLK)/16 */
4928
#define FLLREFDIV__1           (0x0000)       /* Reference Divider: f(LFCLK)/1 */
4929
#define FLLREFDIV__2           (0x0001)       /* Reference Divider: f(LFCLK)/2 */
4930
#define FLLREFDIV__4           (0x0002)       /* Reference Divider: f(LFCLK)/4 */
4931
#define FLLREFDIV__8           (0x0003)       /* Reference Divider: f(LFCLK)/8 */
4932
#define FLLREFDIV__12          (0x0004)       /* Reference Divider: f(LFCLK)/12 */
4933
#define FLLREFDIV__16          (0x0005)       /* Reference Divider: f(LFCLK)/16 */
4934
#define SELREF_0               (0x0000)       /* FLL Reference Clock Select 0 */
4935
#define SELREF_1               (0x0010)       /* FLL Reference Clock Select 1 */
4936
#define SELREF_2               (0x0020)       /* FLL Reference Clock Select 2 */
4937
#define SELREF_3               (0x0030)       /* FLL Reference Clock Select 3 */
4938
#define SELREF_4               (0x0040)       /* FLL Reference Clock Select 4 */
4939
#define SELREF_5               (0x0050)       /* FLL Reference Clock Select 5 */
4940
#define SELREF_6               (0x0060)       /* FLL Reference Clock Select 6 */
4941
#define SELREF_7               (0x0070)       /* FLL Reference Clock Select 7 */
4942
#define SELREF__XT1CLK         (0x0000)       /* Multiply Selected Loop Freq. By XT1CLK */
4943
#define SELREF__REFOCLK        (0x0020)       /* Multiply Selected Loop Freq. By REFOCLK */
4944
#define SELREF__XT2CLK         (0x0050)       /* Multiply Selected Loop Freq. By XT2CLK */
4945
 
4946
/* UCSCTL4 Control Bits */
4947
#define SELM0                  (0x0001)       /* MCLK Source Select Bit: 0 */
4948
#define SELM1                  (0x0002)       /* MCLK Source Select Bit: 1 */
4949
#define SELM2                  (0x0004)       /* MCLK Source Select Bit: 2 */
4950
//#define RESERVED            (0x0008)    /* RESERVED */
4951
#define SELS0                  (0x0010)       /* SMCLK Source Select Bit: 0 */
4952
#define SELS1                  (0x0020)       /* SMCLK Source Select Bit: 1 */
4953
#define SELS2                  (0x0040)       /* SMCLK Source Select Bit: 2 */
4954
//#define RESERVED            (0x0080)    /* RESERVED */
4955
#define SELA0                  (0x0100)       /* ACLK Source Select Bit: 0 */
4956
#define SELA1                  (0x0200)       /* ACLK Source Select Bit: 1 */
4957
#define SELA2                  (0x0400)       /* ACLK Source Select Bit: 2 */
4958
//#define RESERVED            (0x0800)    /* RESERVED */
4959
//#define RESERVED            (0x1000)    /* RESERVED */
4960
//#define RESERVED            (0x2000)    /* RESERVED */
4961
//#define RESERVED            (0x4000)    /* RESERVED */
4962
//#define RESERVED            (0x8000)    /* RESERVED */
4963
 
4964
/* UCSCTL4 Control Bits */
4965
#define SELM0_L                (0x0001)       /* MCLK Source Select Bit: 0 */
4966
#define SELM1_L                (0x0002)       /* MCLK Source Select Bit: 1 */
4967
#define SELM2_L                (0x0004)       /* MCLK Source Select Bit: 2 */
4968
//#define RESERVED            (0x0008)    /* RESERVED */
4969
#define SELS0_L                (0x0010)       /* SMCLK Source Select Bit: 0 */
4970
#define SELS1_L                (0x0020)       /* SMCLK Source Select Bit: 1 */
4971
#define SELS2_L                (0x0040)       /* SMCLK Source Select Bit: 2 */
4972
//#define RESERVED            (0x0080)    /* RESERVED */
4973
//#define RESERVED            (0x0800)    /* RESERVED */
4974
//#define RESERVED            (0x1000)    /* RESERVED */
4975
//#define RESERVED            (0x2000)    /* RESERVED */
4976
//#define RESERVED            (0x4000)    /* RESERVED */
4977
//#define RESERVED            (0x8000)    /* RESERVED */
4978
 
4979
/* UCSCTL4 Control Bits */
4980
//#define RESERVED            (0x0008)    /* RESERVED */
4981
//#define RESERVED            (0x0080)    /* RESERVED */
4982
#define SELA0_H                (0x0001)       /* ACLK Source Select Bit: 0 */
4983
#define SELA1_H                (0x0002)       /* ACLK Source Select Bit: 1 */
4984
#define SELA2_H                (0x0004)       /* ACLK Source Select Bit: 2 */
4985
//#define RESERVED            (0x0800)    /* RESERVED */
4986
//#define RESERVED            (0x1000)    /* RESERVED */
4987
//#define RESERVED            (0x2000)    /* RESERVED */
4988
//#define RESERVED            (0x4000)    /* RESERVED */
4989
//#define RESERVED            (0x8000)    /* RESERVED */
4990
 
4991
#define SELM_0                 (0x0000)       /* MCLK Source Select 0 */
4992
#define SELM_1                 (0x0001)       /* MCLK Source Select 1 */
4993
#define SELM_2                 (0x0002)       /* MCLK Source Select 2 */
4994
#define SELM_3                 (0x0003)       /* MCLK Source Select 3 */
4995
#define SELM_4                 (0x0004)       /* MCLK Source Select 4 */
4996
#define SELM_5                 (0x0005)       /* MCLK Source Select 5 */
4997
#define SELM_6                 (0x0006)       /* MCLK Source Select 6 */
4998
#define SELM_7                 (0x0007)       /* MCLK Source Select 7 */
4999
#define SELM__XT1CLK           (0x0000)       /* MCLK Source Select XT1CLK */
5000
#define SELM__VLOCLK           (0x0001)       /* MCLK Source Select VLOCLK */
5001
#define SELM__REFOCLK          (0x0002)       /* MCLK Source Select REFOCLK */
5002
#define SELM__DCOCLK           (0x0003)       /* MCLK Source Select DCOCLK */
5003
#define SELM__DCOCLKDIV        (0x0004)       /* MCLK Source Select DCOCLKDIV */
5004
#define SELM__XT2CLK           (0x0005)       /* MCLK Source Select XT2CLK */
5005
 
5006
#define SELS_0                 (0x0000)       /* SMCLK Source Select 0 */
5007
#define SELS_1                 (0x0010)       /* SMCLK Source Select 1 */
5008
#define SELS_2                 (0x0020)       /* SMCLK Source Select 2 */
5009
#define SELS_3                 (0x0030)       /* SMCLK Source Select 3 */
5010
#define SELS_4                 (0x0040)       /* SMCLK Source Select 4 */
5011
#define SELS_5                 (0x0050)       /* SMCLK Source Select 5 */
5012
#define SELS_6                 (0x0060)       /* SMCLK Source Select 6 */
5013
#define SELS_7                 (0x0070)       /* SMCLK Source Select 7 */
5014
#define SELS__XT1CLK           (0x0000)       /* SMCLK Source Select XT1CLK */
5015
#define SELS__VLOCLK           (0x0010)       /* SMCLK Source Select VLOCLK */
5016
#define SELS__REFOCLK          (0x0020)       /* SMCLK Source Select REFOCLK */
5017
#define SELS__DCOCLK           (0x0030)       /* SMCLK Source Select DCOCLK */
5018
#define SELS__DCOCLKDIV        (0x0040)       /* SMCLK Source Select DCOCLKDIV */
5019
#define SELS__XT2CLK           (0x0050)       /* SMCLK Source Select XT2CLK */
5020
 
5021
#define SELA_0                 (0x0000)       /* ACLK Source Select 0 */
5022
#define SELA_1                 (0x0100)       /* ACLK Source Select 1 */
5023
#define SELA_2                 (0x0200)       /* ACLK Source Select 2 */
5024
#define SELA_3                 (0x0300)       /* ACLK Source Select 3 */
5025
#define SELA_4                 (0x0400)       /* ACLK Source Select 4 */
5026
#define SELA_5                 (0x0500)       /* ACLK Source Select 5 */
5027
#define SELA_6                 (0x0600)       /* ACLK Source Select 6 */
5028
#define SELA_7                 (0x0700)       /* ACLK Source Select 7 */
5029
#define SELA__XT1CLK           (0x0000)       /* ACLK Source Select XT1CLK */
5030
#define SELA__VLOCLK           (0x0100)       /* ACLK Source Select VLOCLK */
5031
#define SELA__REFOCLK          (0x0200)       /* ACLK Source Select REFOCLK */
5032
#define SELA__DCOCLK           (0x0300)       /* ACLK Source Select DCOCLK */
5033
#define SELA__DCOCLKDIV        (0x0400)       /* ACLK Source Select DCOCLKDIV */
5034
#define SELA__XT2CLK           (0x0500)       /* ACLK Source Select XT2CLK */
5035
 
5036
/* UCSCTL5 Control Bits */
5037
#define DIVM0                  (0x0001)       /* MCLK Divider Bit: 0 */
5038
#define DIVM1                  (0x0002)       /* MCLK Divider Bit: 1 */
5039
#define DIVM2                  (0x0004)       /* MCLK Divider Bit: 2 */
5040
//#define RESERVED            (0x0008)    /* RESERVED */
5041
#define DIVS0                  (0x0010)       /* SMCLK Divider Bit: 0 */
5042
#define DIVS1                  (0x0020)       /* SMCLK Divider Bit: 1 */
5043
#define DIVS2                  (0x0040)       /* SMCLK Divider Bit: 2 */
5044
//#define RESERVED            (0x0080)    /* RESERVED */
5045
#define DIVA0                  (0x0100)       /* ACLK Divider Bit: 0 */
5046
#define DIVA1                  (0x0200)       /* ACLK Divider Bit: 1 */
5047
#define DIVA2                  (0x0400)       /* ACLK Divider Bit: 2 */
5048
//#define RESERVED            (0x0800)    /* RESERVED */
5049
#define DIVPA0                 (0x1000)       /* ACLK from Pin Divider Bit: 0 */
5050
#define DIVPA1                 (0x2000)       /* ACLK from Pin Divider Bit: 1 */
5051
#define DIVPA2                 (0x4000)       /* ACLK from Pin Divider Bit: 2 */
5052
//#define RESERVED            (0x8000)    /* RESERVED */
5053
 
5054
/* UCSCTL5 Control Bits */
5055
#define DIVM0_L                (0x0001)       /* MCLK Divider Bit: 0 */
5056
#define DIVM1_L                (0x0002)       /* MCLK Divider Bit: 1 */
5057
#define DIVM2_L                (0x0004)       /* MCLK Divider Bit: 2 */
5058
//#define RESERVED            (0x0008)    /* RESERVED */
5059
#define DIVS0_L                (0x0010)       /* SMCLK Divider Bit: 0 */
5060
#define DIVS1_L                (0x0020)       /* SMCLK Divider Bit: 1 */
5061
#define DIVS2_L                (0x0040)       /* SMCLK Divider Bit: 2 */
5062
//#define RESERVED            (0x0080)    /* RESERVED */
5063
//#define RESERVED            (0x0800)    /* RESERVED */
5064
//#define RESERVED            (0x8000)    /* RESERVED */
5065
 
5066
/* UCSCTL5 Control Bits */
5067
//#define RESERVED            (0x0008)    /* RESERVED */
5068
//#define RESERVED            (0x0080)    /* RESERVED */
5069
#define DIVA0_H                (0x0001)       /* ACLK Divider Bit: 0 */
5070
#define DIVA1_H                (0x0002)       /* ACLK Divider Bit: 1 */
5071
#define DIVA2_H                (0x0004)       /* ACLK Divider Bit: 2 */
5072
//#define RESERVED            (0x0800)    /* RESERVED */
5073
#define DIVPA0_H               (0x0010)       /* ACLK from Pin Divider Bit: 0 */
5074
#define DIVPA1_H               (0x0020)       /* ACLK from Pin Divider Bit: 1 */
5075
#define DIVPA2_H               (0x0040)       /* ACLK from Pin Divider Bit: 2 */
5076
//#define RESERVED            (0x8000)    /* RESERVED */
5077
 
5078
#define DIVM_0                 (0x0000)       /* MCLK Source Divider 0 */
5079
#define DIVM_1                 (0x0001)       /* MCLK Source Divider 1 */
5080
#define DIVM_2                 (0x0002)       /* MCLK Source Divider 2 */
5081
#define DIVM_3                 (0x0003)       /* MCLK Source Divider 3 */
5082
#define DIVM_4                 (0x0004)       /* MCLK Source Divider 4 */
5083
#define DIVM_5                 (0x0005)       /* MCLK Source Divider 5 */
5084
#define DIVM_6                 (0x0006)       /* MCLK Source Divider 6 */
5085
#define DIVM_7                 (0x0007)       /* MCLK Source Divider 7 */
5086
#define DIVM__1                (0x0000)       /* MCLK Source Divider f(MCLK)/1 */
5087
#define DIVM__2                (0x0001)       /* MCLK Source Divider f(MCLK)/2 */
5088
#define DIVM__4                (0x0002)       /* MCLK Source Divider f(MCLK)/4 */
5089
#define DIVM__8                (0x0003)       /* MCLK Source Divider f(MCLK)/8 */
5090
#define DIVM__16               (0x0004)       /* MCLK Source Divider f(MCLK)/16 */
5091
#define DIVM__32               (0x0005)       /* MCLK Source Divider f(MCLK)/32 */
5092
 
5093
#define DIVS_0                 (0x0000)       /* SMCLK Source Divider 0 */
5094
#define DIVS_1                 (0x0010)       /* SMCLK Source Divider 1 */
5095
#define DIVS_2                 (0x0020)       /* SMCLK Source Divider 2 */
5096
#define DIVS_3                 (0x0030)       /* SMCLK Source Divider 3 */
5097
#define DIVS_4                 (0x0040)       /* SMCLK Source Divider 4 */
5098
#define DIVS_5                 (0x0050)       /* SMCLK Source Divider 5 */
5099
#define DIVS_6                 (0x0060)       /* SMCLK Source Divider 6 */
5100
#define DIVS_7                 (0x0070)       /* SMCLK Source Divider 7 */
5101
#define DIVS__1                (0x0000)       /* SMCLK Source Divider f(SMCLK)/1 */
5102
#define DIVS__2                (0x0010)       /* SMCLK Source Divider f(SMCLK)/2 */
5103
#define DIVS__4                (0x0020)       /* SMCLK Source Divider f(SMCLK)/4 */
5104
#define DIVS__8                (0x0030)       /* SMCLK Source Divider f(SMCLK)/8 */
5105
#define DIVS__16               (0x0040)       /* SMCLK Source Divider f(SMCLK)/16 */
5106
#define DIVS__32               (0x0050)       /* SMCLK Source Divider f(SMCLK)/32 */
5107
 
5108
#define DIVA_0                 (0x0000)       /* ACLK Source Divider 0 */
5109
#define DIVA_1                 (0x0100)       /* ACLK Source Divider 1 */
5110
#define DIVA_2                 (0x0200)       /* ACLK Source Divider 2 */
5111
#define DIVA_3                 (0x0300)       /* ACLK Source Divider 3 */
5112
#define DIVA_4                 (0x0400)       /* ACLK Source Divider 4 */
5113
#define DIVA_5                 (0x0500)       /* ACLK Source Divider 5 */
5114
#define DIVA_6                 (0x0600)       /* ACLK Source Divider 6 */
5115
#define DIVA_7                 (0x0700)       /* ACLK Source Divider 7 */
5116
#define DIVA__1                (0x0000)       /* ACLK Source Divider f(ACLK)/1 */
5117
#define DIVA__2                (0x0100)       /* ACLK Source Divider f(ACLK)/2 */
5118
#define DIVA__4                (0x0200)       /* ACLK Source Divider f(ACLK)/4 */
5119
#define DIVA__8                (0x0300)       /* ACLK Source Divider f(ACLK)/8 */
5120
#define DIVA__16               (0x0400)       /* ACLK Source Divider f(ACLK)/16 */
5121
#define DIVA__32               (0x0500)       /* ACLK Source Divider f(ACLK)/32 */
5122
 
5123
#define DIVPA_0                (0x0000)       /* ACLK from Pin Source Divider 0 */
5124
#define DIVPA_1                (0x1000)       /* ACLK from Pin Source Divider 1 */
5125
#define DIVPA_2                (0x2000)       /* ACLK from Pin Source Divider 2 */
5126
#define DIVPA_3                (0x3000)       /* ACLK from Pin Source Divider 3 */
5127
#define DIVPA_4                (0x4000)       /* ACLK from Pin Source Divider 4 */
5128
#define DIVPA_5                (0x5000)       /* ACLK from Pin Source Divider 5 */
5129
#define DIVPA_6                (0x6000)       /* ACLK from Pin Source Divider 6 */
5130
#define DIVPA_7                (0x7000)       /* ACLK from Pin Source Divider 7 */
5131
#define DIVPA__1               (0x0000)       /* ACLK from Pin Source Divider f(ACLK)/1 */
5132
#define DIVPA__2               (0x1000)       /* ACLK from Pin Source Divider f(ACLK)/2 */
5133
#define DIVPA__4               (0x2000)       /* ACLK from Pin Source Divider f(ACLK)/4 */
5134
#define DIVPA__8               (0x3000)       /* ACLK from Pin Source Divider f(ACLK)/8 */
5135
#define DIVPA__16              (0x4000)       /* ACLK from Pin Source Divider f(ACLK)/16 */
5136
#define DIVPA__32              (0x5000)       /* ACLK from Pin Source Divider f(ACLK)/32 */
5137
 
5138
/* UCSCTL6 Control Bits */
5139
#define XT1OFF                 (0x0001)       /* High Frequency Oscillator 1 (XT1) disable */
5140
#define SMCLKOFF               (0x0002)       /* SMCLK Off */
5141
#define XCAP0                  (0x0004)       /* XIN/XOUT Cap Bit: 0 */
5142
#define XCAP1                  (0x0008)       /* XIN/XOUT Cap Bit: 1 */
5143
#define XT1BYPASS              (0x0010)       /* XT1 bypass mode : 0: internal 1:sourced from external pin */
5144
#define XTS                    (0x0020)       /* 1: Selects high-freq. oscillator */
5145
#define XT1DRIVE0              (0x0040)       /* XT1 Drive Level mode Bit 0 */
5146
#define XT1DRIVE1              (0x0080)       /* XT1 Drive Level mode Bit 1 */
5147
#define XT2OFF                 (0x0100)       /* High Frequency Oscillator 2 (XT2) disable */
5148
//#define RESERVED            (0x0200)    /* RESERVED */
5149
//#define RESERVED            (0x0400)    /* RESERVED */
5150
//#define RESERVED            (0x0800)    /* RESERVED */
5151
#define XT2BYPASS              (0x1000)       /* XT2 bypass mode : 0: internal 1:sourced from external pin */
5152
//#define RESERVED            (0x2000)    /* RESERVED */
5153
#define XT2DRIVE0              (0x4000)       /* XT2 Drive Level mode Bit 0 */
5154
#define XT2DRIVE1              (0x8000)       /* XT2 Drive Level mode Bit 1 */
5155
 
5156
/* UCSCTL6 Control Bits */
5157
#define XT1OFF_L               (0x0001)       /* High Frequency Oscillator 1 (XT1) disable */
5158
#define SMCLKOFF_L             (0x0002)       /* SMCLK Off */
5159
#define XCAP0_L                (0x0004)       /* XIN/XOUT Cap Bit: 0 */
5160
#define XCAP1_L                (0x0008)       /* XIN/XOUT Cap Bit: 1 */
5161
#define XT1BYPASS_L            (0x0010)       /* XT1 bypass mode : 0: internal 1:sourced from external pin */
5162
#define XTS_L                  (0x0020)       /* 1: Selects high-freq. oscillator */
5163
#define XT1DRIVE0_L            (0x0040)       /* XT1 Drive Level mode Bit 0 */
5164
#define XT1DRIVE1_L            (0x0080)       /* XT1 Drive Level mode Bit 1 */
5165
//#define RESERVED            (0x0200)    /* RESERVED */
5166
//#define RESERVED            (0x0400)    /* RESERVED */
5167
//#define RESERVED            (0x0800)    /* RESERVED */
5168
//#define RESERVED            (0x2000)    /* RESERVED */
5169
 
5170
/* UCSCTL6 Control Bits */
5171
#define XT2OFF_H               (0x0001)       /* High Frequency Oscillator 2 (XT2) disable */
5172
//#define RESERVED            (0x0200)    /* RESERVED */
5173
//#define RESERVED            (0x0400)    /* RESERVED */
5174
//#define RESERVED            (0x0800)    /* RESERVED */
5175
#define XT2BYPASS_H            (0x0010)       /* XT2 bypass mode : 0: internal 1:sourced from external pin */
5176
//#define RESERVED            (0x2000)    /* RESERVED */
5177
#define XT2DRIVE0_H            (0x0040)       /* XT2 Drive Level mode Bit 0 */
5178
#define XT2DRIVE1_H            (0x0080)       /* XT2 Drive Level mode Bit 1 */
5179
 
5180
#define XCAP_0                 (0x0000)       /* XIN/XOUT Cap 0 */
5181
#define XCAP_1                 (0x0004)       /* XIN/XOUT Cap 1 */
5182
#define XCAP_2                 (0x0008)       /* XIN/XOUT Cap 2 */
5183
#define XCAP_3                 (0x000C)       /* XIN/XOUT Cap 3 */
5184
#define XT1DRIVE_0             (0x0000)       /* XT1 Drive Level mode: 0 */
5185
#define XT1DRIVE_1             (0x0040)       /* XT1 Drive Level mode: 1 */
5186
#define XT1DRIVE_2             (0x0080)       /* XT1 Drive Level mode: 2 */
5187
#define XT1DRIVE_3             (0x00C0)       /* XT1 Drive Level mode: 3 */
5188
#define XT2DRIVE_0             (0x0000)       /* XT2 Drive Level mode: 0 */
5189
#define XT2DRIVE_1             (0x4000)       /* XT2 Drive Level mode: 1 */
5190
#define XT2DRIVE_2             (0x8000)       /* XT2 Drive Level mode: 2 */
5191
#define XT2DRIVE_3             (0xC000)       /* XT2 Drive Level mode: 3 */
5192
 
5193
/* UCSCTL7 Control Bits */
5194
#define DCOFFG                 (0x0001)       /* DCO Fault Flag */
5195
#define XT1LFOFFG              (0x0002)       /* XT1 Low Frequency Oscillator Fault Flag */
5196
#define XT1HFOFFG              (0x0004)       /* XT1 High Frequency Oscillator 1 Fault Flag */
5197
#define XT2OFFG                (0x0008)       /* High Frequency Oscillator 2 Fault Flag */
5198
//#define RESERVED            (0x0010)    /* RESERVED */
5199
//#define RESERVED            (0x0020)    /* RESERVED */
5200
//#define RESERVED            (0x0040)    /* RESERVED */
5201
//#define RESERVED            (0x0080)    /* RESERVED */
5202
//#define RESERVED            (0x0100)    /* RESERVED */
5203
//#define RESERVED            (0x0200)    /* RESERVED */
5204
//#define RESERVED            (0x0400)    /* RESERVED */
5205
//#define RESERVED            (0x0800)    /* RESERVED */
5206
//#define RESERVED            (0x1000)    /* RESERVED */
5207
//#define RESERVED            (0x2000)    /* RESERVED */
5208
//#define RESERVED            (0x4000)    /* RESERVED */
5209
//#define RESERVED            (0x8000)    /* RESERVED */
5210
 
5211
/* UCSCTL7 Control Bits */
5212
#define DCOFFG_L               (0x0001)       /* DCO Fault Flag */
5213
#define XT1LFOFFG_L            (0x0002)       /* XT1 Low Frequency Oscillator Fault Flag */
5214
#define XT1HFOFFG_L            (0x0004)       /* XT1 High Frequency Oscillator 1 Fault Flag */
5215
#define XT2OFFG_L              (0x0008)       /* High Frequency Oscillator 2 Fault Flag */
5216
//#define RESERVED            (0x0010)    /* RESERVED */
5217
//#define RESERVED            (0x0020)    /* RESERVED */
5218
//#define RESERVED            (0x0040)    /* RESERVED */
5219
//#define RESERVED            (0x0080)    /* RESERVED */
5220
//#define RESERVED            (0x0100)    /* RESERVED */
5221
//#define RESERVED            (0x0200)    /* RESERVED */
5222
//#define RESERVED            (0x0400)    /* RESERVED */
5223
//#define RESERVED            (0x0800)    /* RESERVED */
5224
//#define RESERVED            (0x1000)    /* RESERVED */
5225
//#define RESERVED            (0x2000)    /* RESERVED */
5226
//#define RESERVED            (0x4000)    /* RESERVED */
5227
//#define RESERVED            (0x8000)    /* RESERVED */
5228
 
5229
/* UCSCTL7 Control Bits */
5230
//#define RESERVED            (0x0010)    /* RESERVED */
5231
//#define RESERVED            (0x0020)    /* RESERVED */
5232
//#define RESERVED            (0x0040)    /* RESERVED */
5233
//#define RESERVED            (0x0080)    /* RESERVED */
5234
//#define RESERVED            (0x0100)    /* RESERVED */
5235
//#define RESERVED            (0x0200)    /* RESERVED */
5236
//#define RESERVED            (0x0400)    /* RESERVED */
5237
//#define RESERVED            (0x0800)    /* RESERVED */
5238
//#define RESERVED            (0x1000)    /* RESERVED */
5239
//#define RESERVED            (0x2000)    /* RESERVED */
5240
//#define RESERVED            (0x4000)    /* RESERVED */
5241
//#define RESERVED            (0x8000)    /* RESERVED */
5242
 
5243
/* UCSCTL8 Control Bits */
5244
#define ACLKREQEN              (0x0001)       /* ACLK Clock Request Enable */
5245
#define MCLKREQEN              (0x0002)       /* MCLK Clock Request Enable */
5246
#define SMCLKREQEN             (0x0004)       /* SMCLK Clock Request Enable */
5247
#define MODOSCREQEN            (0x0008)       /* MODOSC Clock Request Enable */
5248
//#define RESERVED            (0x0010)    /* RESERVED */
5249
//#define RESERVED            (0x0020)    /* RESERVED */
5250
//#define RESERVED            (0x0040)    /* RESERVED */
5251
//#define RESERVED            (0x0080)    /* RESERVED */
5252
//#define RESERVED            (0x0100)    /* RESERVED */
5253
//#define RESERVED            (0x0200)    /* RESERVED */
5254
//#define RESERVED            (0x0400)    /* RESERVED */
5255
//#define RESERVED            (0x0800)    /* RESERVED */
5256
//#define RESERVED            (0x1000)    /* RESERVED */
5257
//#define RESERVED            (0x2000)    /* RESERVED */
5258
//#define RESERVED            (0x4000)    /* RESERVED */
5259
//#define RESERVED            (0x8000)    /* RESERVED */
5260
 
5261
/* UCSCTL8 Control Bits */
5262
#define ACLKREQEN_L            (0x0001)       /* ACLK Clock Request Enable */
5263
#define MCLKREQEN_L            (0x0002)       /* MCLK Clock Request Enable */
5264
#define SMCLKREQEN_L           (0x0004)       /* SMCLK Clock Request Enable */
5265
#define MODOSCREQEN_L          (0x0008)       /* MODOSC Clock Request Enable */
5266
//#define RESERVED            (0x0010)    /* RESERVED */
5267
//#define RESERVED            (0x0020)    /* RESERVED */
5268
//#define RESERVED            (0x0040)    /* RESERVED */
5269
//#define RESERVED            (0x0080)    /* RESERVED */
5270
//#define RESERVED            (0x0100)    /* RESERVED */
5271
//#define RESERVED            (0x0200)    /* RESERVED */
5272
//#define RESERVED            (0x0400)    /* RESERVED */
5273
//#define RESERVED            (0x0800)    /* RESERVED */
5274
//#define RESERVED            (0x1000)    /* RESERVED */
5275
//#define RESERVED            (0x2000)    /* RESERVED */
5276
//#define RESERVED            (0x4000)    /* RESERVED */
5277
//#define RESERVED            (0x8000)    /* RESERVED */
5278
 
5279
/* UCSCTL8 Control Bits */
5280
//#define RESERVED            (0x0010)    /* RESERVED */
5281
//#define RESERVED            (0x0020)    /* RESERVED */
5282
//#define RESERVED            (0x0040)    /* RESERVED */
5283
//#define RESERVED            (0x0080)    /* RESERVED */
5284
//#define RESERVED            (0x0100)    /* RESERVED */
5285
//#define RESERVED            (0x0200)    /* RESERVED */
5286
//#define RESERVED            (0x0400)    /* RESERVED */
5287
//#define RESERVED            (0x0800)    /* RESERVED */
5288
//#define RESERVED            (0x1000)    /* RESERVED */
5289
//#define RESERVED            (0x2000)    /* RESERVED */
5290
//#define RESERVED            (0x4000)    /* RESERVED */
5291
//#define RESERVED            (0x8000)    /* RESERVED */
5292
 
5293
/************************************************************
5294
* USCI A0
5295
************************************************************/
5296
#define __MSP430_HAS_USCI_A0__                /* Definition to show that Module is available */
5297
#define __MSP430_BASEADDRESS_USCI_A0__ 0x05C0
5298
 
5299
SFR_16BIT(UCA0CTLW0);                         /* USCI A0 Control Word Register 0 */
5300
SFR_8BIT(UCA0CTLW0_L);                        /* USCI A0 Control Word Register 0 */
5301
SFR_8BIT(UCA0CTLW0_H);                        /* USCI A0 Control Word Register 0 */
5302
#define UCA0CTL1               UCA0CTLW0_L    /* USCI A0 Control Register 1 */
5303
#define UCA0CTL0               UCA0CTLW0_H    /* USCI A0 Control Register 0 */
5304
SFR_16BIT(UCA0BRW);                           /* USCI A0 Baud Word Rate 0 */
5305
SFR_8BIT(UCA0BRW_L);                          /* USCI A0 Baud Word Rate 0 */
5306
SFR_8BIT(UCA0BRW_H);                          /* USCI A0 Baud Word Rate 0 */
5307
#define UCA0BR0                UCA0BRW_L      /* USCI A0 Baud Rate 0 */
5308
#define UCA0BR1                UCA0BRW_H      /* USCI A0 Baud Rate 1 */
5309
SFR_8BIT(UCA0MCTL);                           /* USCI A0 Modulation Control */
5310
SFR_8BIT(UCA0STAT);                           /* USCI A0 Status Register */
5311
SFR_8BIT(UCA0RXBUF);                          /* USCI A0 Receive Buffer */
5312
SFR_8BIT(UCA0TXBUF);                          /* USCI A0 Transmit Buffer */
5313
SFR_8BIT(UCA0ABCTL);                          /* USCI A0 LIN Control */
5314
SFR_16BIT(UCA0IRCTL);                         /* USCI A0 IrDA Transmit Control */
5315
SFR_8BIT(UCA0IRCTL_L);                        /* USCI A0 IrDA Transmit Control */
5316
SFR_8BIT(UCA0IRCTL_H);                        /* USCI A0 IrDA Transmit Control */
5317
#define UCA0IRTCTL             UCA0IRCTL_L    /* USCI A0 IrDA Transmit Control */
5318
#define UCA0IRRCTL             UCA0IRCTL_H    /* USCI A0 IrDA Receive Control */
5319
SFR_16BIT(UCA0ICTL);                          /* USCI A0 Interrupt Enable Register */
5320
SFR_8BIT(UCA0ICTL_L);                         /* USCI A0 Interrupt Enable Register */
5321
SFR_8BIT(UCA0ICTL_H);                         /* USCI A0 Interrupt Enable Register */
5322
#define UCA0IE                 UCA0ICTL_L     /* USCI A0 Interrupt Enable Register */
5323
#define UCA0IFG                UCA0ICTL_H     /* USCI A0 Interrupt Flags Register */
5324
SFR_16BIT(UCA0IV);                            /* USCI A0 Interrupt Vector Register */
5325
 
5326
 
5327
/************************************************************
5328
* USCI B0
5329
************************************************************/
5330
#define __MSP430_HAS_USCI_B0__                /* Definition to show that Module is available */
5331
#define __MSP430_BASEADDRESS_USCI_B0__ 0x05E0
5332
 
5333
 
5334
SFR_16BIT(UCB0CTLW0);                         /* USCI B0 Control Word Register 0 */
5335
SFR_8BIT(UCB0CTLW0_L);                        /* USCI B0 Control Word Register 0 */
5336
SFR_8BIT(UCB0CTLW0_H);                        /* USCI B0 Control Word Register 0 */
5337
#define UCB0CTL1               UCB0CTLW0_L    /* USCI B0 Control Register 1 */
5338
#define UCB0CTL0               UCB0CTLW0_H    /* USCI B0 Control Register 0 */
5339
SFR_16BIT(UCB0BRW);                           /* USCI B0 Baud Word Rate 0 */
5340
SFR_8BIT(UCB0BRW_L);                          /* USCI B0 Baud Word Rate 0 */
5341
SFR_8BIT(UCB0BRW_H);                          /* USCI B0 Baud Word Rate 0 */
5342
#define UCB0BR0                UCB0BRW_L      /* USCI B0 Baud Rate 0 */
5343
#define UCB0BR1                UCB0BRW_H      /* USCI B0 Baud Rate 1 */
5344
SFR_8BIT(UCB0STAT);                           /* USCI B0 Status Register */
5345
SFR_8BIT(UCB0RXBUF);                          /* USCI B0 Receive Buffer */
5346
SFR_8BIT(UCB0TXBUF);                          /* USCI B0 Transmit Buffer */
5347
SFR_16BIT(UCB0I2COA);                         /* USCI B0 I2C Own Address */
5348
SFR_8BIT(UCB0I2COA_L);                        /* USCI B0 I2C Own Address */
5349
SFR_8BIT(UCB0I2COA_H);                        /* USCI B0 I2C Own Address */
5350
SFR_16BIT(UCB0I2CSA);                         /* USCI B0 I2C Slave Address */
5351
SFR_8BIT(UCB0I2CSA_L);                        /* USCI B0 I2C Slave Address */
5352
SFR_8BIT(UCB0I2CSA_H);                        /* USCI B0 I2C Slave Address */
5353
SFR_16BIT(UCB0ICTL);                          /* USCI B0 Interrupt Enable Register */
5354
SFR_8BIT(UCB0ICTL_L);                         /* USCI B0 Interrupt Enable Register */
5355
SFR_8BIT(UCB0ICTL_H);                         /* USCI B0 Interrupt Enable Register */
5356
#define UCB0IE                 UCB0ICTL_L     /* USCI B0 Interrupt Enable Register */
5357
#define UCB0IFG                UCB0ICTL_H     /* USCI B0 Interrupt Flags Register */
5358
SFR_16BIT(UCB0IV);                            /* USCI B0 Interrupt Vector Register */
5359
 
5360
// UCAxCTL0 UART-Mode Control Bits
5361
#define UCPEN                  (0x80)         /* Async. Mode: Parity enable */
5362
#define UCPAR                  (0x40)         /* Async. Mode: Parity     0:odd / 1:even */
5363
#define UCMSB                  (0x20)         /* Async. Mode: MSB first  0:LSB / 1:MSB */
5364
#define UC7BIT                 (0x10)         /* Async. Mode: Data Bits  0:8-bits / 1:7-bits */
5365
#define UCSPB                  (0x08)         /* Async. Mode: Stop Bits  0:one / 1: two */
5366
#define UCMODE1                (0x04)         /* Async. Mode: USCI Mode 1 */
5367
#define UCMODE0                (0x02)         /* Async. Mode: USCI Mode 0 */
5368
#define UCSYNC                 (0x01)         /* Sync-Mode  0:UART-Mode / 1:SPI-Mode */
5369
 
5370
// UCxxCTL0 SPI-Mode Control Bits
5371
#define UCCKPH                 (0x80)         /* Sync. Mode: Clock Phase */
5372
#define UCCKPL                 (0x40)         /* Sync. Mode: Clock Polarity */
5373
#define UCMST                  (0x08)         /* Sync. Mode: Master Select */
5374
 
5375
// UCBxCTL0 I2C-Mode Control Bits
5376
#define UCA10                  (0x80)         /* 10-bit Address Mode */
5377
#define UCSLA10                (0x40)         /* 10-bit Slave Address Mode */
5378
#define UCMM                   (0x20)         /* Multi-Master Environment */
5379
//#define res               (0x10)    /* reserved */
5380
#define UCMODE_0               (0x00)         /* Sync. Mode: USCI Mode: 0 */
5381
#define UCMODE_1               (0x02)         /* Sync. Mode: USCI Mode: 1 */
5382
#define UCMODE_2               (0x04)         /* Sync. Mode: USCI Mode: 2 */
5383
#define UCMODE_3               (0x06)         /* Sync. Mode: USCI Mode: 3 */
5384
 
5385
// UCAxCTL1 UART-Mode Control Bits
5386
#define UCSSEL1                (0x80)         /* USCI 0 Clock Source Select 1 */
5387
#define UCSSEL0                (0x40)         /* USCI 0 Clock Source Select 0 */
5388
#define UCRXEIE                (0x20)         /* RX Error interrupt enable */
5389
#define UCBRKIE                (0x10)         /* Break interrupt enable */
5390
#define UCDORM                 (0x08)         /* Dormant (Sleep) Mode */
5391
#define UCTXADDR               (0x04)         /* Send next Data as Address */
5392
#define UCTXBRK                (0x02)         /* Send next Data as Break */
5393
#define UCSWRST                (0x01)         /* USCI Software Reset */
5394
 
5395
// UCxxCTL1 SPI-Mode Control Bits
5396
//#define res               (0x20)    /* reserved */
5397
//#define res               (0x10)    /* reserved */
5398
//#define res               (0x08)    /* reserved */
5399
//#define res               (0x04)    /* reserved */
5400
//#define res               (0x02)    /* reserved */
5401
 
5402
// UCBxCTL1 I2C-Mode Control Bits
5403
//#define res               (0x20)    /* reserved */
5404
#define UCTR                   (0x10)         /* Transmit/Receive Select/Flag */
5405
#define UCTXNACK               (0x08)         /* Transmit NACK */
5406
#define UCTXSTP                (0x04)         /* Transmit STOP */
5407
#define UCTXSTT                (0x02)         /* Transmit START */
5408
#define UCSSEL_0               (0x00)         /* USCI 0 Clock Source: 0 */
5409
#define UCSSEL_1               (0x40)         /* USCI 0 Clock Source: 1 */
5410
#define UCSSEL_2               (0x80)         /* USCI 0 Clock Source: 2 */
5411
#define UCSSEL_3               (0xC0)         /* USCI 0 Clock Source: 3 */
5412
#define UCSSEL__UCLK           (0x00)         /* USCI 0 Clock Source: UCLK */
5413
#define UCSSEL__ACLK           (0x40)         /* USCI 0 Clock Source: ACLK */
5414
#define UCSSEL__SMCLK          (0x80)         /* USCI 0 Clock Source: SMCLK */
5415
 
5416
/* UCAxMCTL Control Bits */
5417
#define UCBRF3                 (0x80)         /* USCI First Stage Modulation Select 3 */
5418
#define UCBRF2                 (0x40)         /* USCI First Stage Modulation Select 2 */
5419
#define UCBRF1                 (0x20)         /* USCI First Stage Modulation Select 1 */
5420
#define UCBRF0                 (0x10)         /* USCI First Stage Modulation Select 0 */
5421
#define UCBRS2                 (0x08)         /* USCI Second Stage Modulation Select 2 */
5422
#define UCBRS1                 (0x04)         /* USCI Second Stage Modulation Select 1 */
5423
#define UCBRS0                 (0x02)         /* USCI Second Stage Modulation Select 0 */
5424
#define UCOS16                 (0x01)         /* USCI 16-times Oversampling enable */
5425
 
5426
#define UCBRF_0                (0x00)         /* USCI First Stage Modulation: 0 */
5427
#define UCBRF_1                (0x10)         /* USCI First Stage Modulation: 1 */
5428
#define UCBRF_2                (0x20)         /* USCI First Stage Modulation: 2 */
5429
#define UCBRF_3                (0x30)         /* USCI First Stage Modulation: 3 */
5430
#define UCBRF_4                (0x40)         /* USCI First Stage Modulation: 4 */
5431
#define UCBRF_5                (0x50)         /* USCI First Stage Modulation: 5 */
5432
#define UCBRF_6                (0x60)         /* USCI First Stage Modulation: 6 */
5433
#define UCBRF_7                (0x70)         /* USCI First Stage Modulation: 7 */
5434
#define UCBRF_8                (0x80)         /* USCI First Stage Modulation: 8 */
5435
#define UCBRF_9                (0x90)         /* USCI First Stage Modulation: 9 */
5436
#define UCBRF_10               (0xA0)         /* USCI First Stage Modulation: A */
5437
#define UCBRF_11               (0xB0)         /* USCI First Stage Modulation: B */
5438
#define UCBRF_12               (0xC0)         /* USCI First Stage Modulation: C */
5439
#define UCBRF_13               (0xD0)         /* USCI First Stage Modulation: D */
5440
#define UCBRF_14               (0xE0)         /* USCI First Stage Modulation: E */
5441
#define UCBRF_15               (0xF0)         /* USCI First Stage Modulation: F */
5442
 
5443
#define UCBRS_0                (0x00)         /* USCI Second Stage Modulation: 0 */
5444
#define UCBRS_1                (0x02)         /* USCI Second Stage Modulation: 1 */
5445
#define UCBRS_2                (0x04)         /* USCI Second Stage Modulation: 2 */
5446
#define UCBRS_3                (0x06)         /* USCI Second Stage Modulation: 3 */
5447
#define UCBRS_4                (0x08)         /* USCI Second Stage Modulation: 4 */
5448
#define UCBRS_5                (0x0A)         /* USCI Second Stage Modulation: 5 */
5449
#define UCBRS_6                (0x0C)         /* USCI Second Stage Modulation: 6 */
5450
#define UCBRS_7                (0x0E)         /* USCI Second Stage Modulation: 7 */
5451
 
5452
/* UCAxSTAT Control Bits */
5453
#define UCLISTEN               (0x80)         /* USCI Listen mode */
5454
#define UCFE                   (0x40)         /* USCI Frame Error Flag */
5455
#define UCOE                   (0x20)         /* USCI Overrun Error Flag */
5456
#define UCPE                   (0x10)         /* USCI Parity Error Flag */
5457
#define UCBRK                  (0x08)         /* USCI Break received */
5458
#define UCRXERR                (0x04)         /* USCI RX Error Flag */
5459
#define UCADDR                 (0x02)         /* USCI Address received Flag */
5460
#define UCBUSY                 (0x01)         /* USCI Busy Flag */
5461
#define UCIDLE                 (0x02)         /* USCI Idle line detected Flag */
5462
 
5463
/* UCBxSTAT Control Bits */
5464
#define UCSCLLOW               (0x40)         /* SCL low */
5465
#define UCGC                   (0x20)         /* General Call address received Flag */
5466
#define UCBBUSY                (0x10)         /* Bus Busy Flag */
5467
 
5468
/* UCAxIRTCTL Control Bits */
5469
#define UCIRTXPL5              (0x80)         /* IRDA Transmit Pulse Length 5 */
5470
#define UCIRTXPL4              (0x40)         /* IRDA Transmit Pulse Length 4 */
5471
#define UCIRTXPL3              (0x20)         /* IRDA Transmit Pulse Length 3 */
5472
#define UCIRTXPL2              (0x10)         /* IRDA Transmit Pulse Length 2 */
5473
#define UCIRTXPL1              (0x08)         /* IRDA Transmit Pulse Length 1 */
5474
#define UCIRTXPL0              (0x04)         /* IRDA Transmit Pulse Length 0 */
5475
#define UCIRTXCLK              (0x02)         /* IRDA Transmit Pulse Clock Select */
5476
#define UCIREN                 (0x01)         /* IRDA Encoder/Decoder enable */
5477
 
5478
/* UCAxIRRCTL Control Bits */
5479
#define UCIRRXFL5              (0x80)         /* IRDA Receive Filter Length 5 */
5480
#define UCIRRXFL4              (0x40)         /* IRDA Receive Filter Length 4 */
5481
#define UCIRRXFL3              (0x20)         /* IRDA Receive Filter Length 3 */
5482
#define UCIRRXFL2              (0x10)         /* IRDA Receive Filter Length 2 */
5483
#define UCIRRXFL1              (0x08)         /* IRDA Receive Filter Length 1 */
5484
#define UCIRRXFL0              (0x04)         /* IRDA Receive Filter Length 0 */
5485
#define UCIRRXPL               (0x02)         /* IRDA Receive Input Polarity */
5486
#define UCIRRXFE               (0x01)         /* IRDA Receive Filter enable */
5487
 
5488
/* UCAxABCTL Control Bits */
5489
//#define res               (0x80)    /* reserved */
5490
//#define res               (0x40)    /* reserved */
5491
#define UCDELIM1               (0x20)         /* Break Sync Delimiter 1 */
5492
#define UCDELIM0               (0x10)         /* Break Sync Delimiter 0 */
5493
#define UCSTOE                 (0x08)         /* Sync-Field Timeout error */
5494
#define UCBTOE                 (0x04)         /* Break Timeout error */
5495
//#define res               (0x02)    /* reserved */
5496
#define UCABDEN                (0x01)         /* Auto Baud Rate detect enable */
5497
 
5498
/* UCBxI2COA Control Bits */
5499
#define UCGCEN                 (0x8000)       /* I2C General Call enable */
5500
#define UCOA9                  (0x0200)       /* I2C Own Address 9 */
5501
#define UCOA8                  (0x0100)       /* I2C Own Address 8 */
5502
#define UCOA7                  (0x0080)       /* I2C Own Address 7 */
5503
#define UCOA6                  (0x0040)       /* I2C Own Address 6 */
5504
#define UCOA5                  (0x0020)       /* I2C Own Address 5 */
5505
#define UCOA4                  (0x0010)       /* I2C Own Address 4 */
5506
#define UCOA3                  (0x0008)       /* I2C Own Address 3 */
5507
#define UCOA2                  (0x0004)       /* I2C Own Address 2 */
5508
#define UCOA1                  (0x0002)       /* I2C Own Address 1 */
5509
#define UCOA0                  (0x0001)       /* I2C Own Address 0 */
5510
 
5511
/* UCBxI2COA Control Bits */
5512
#define UCOA7_L                (0x0080)       /* I2C Own Address 7 */
5513
#define UCOA6_L                (0x0040)       /* I2C Own Address 6 */
5514
#define UCOA5_L                (0x0020)       /* I2C Own Address 5 */
5515
#define UCOA4_L                (0x0010)       /* I2C Own Address 4 */
5516
#define UCOA3_L                (0x0008)       /* I2C Own Address 3 */
5517
#define UCOA2_L                (0x0004)       /* I2C Own Address 2 */
5518
#define UCOA1_L                (0x0002)       /* I2C Own Address 1 */
5519
#define UCOA0_L                (0x0001)       /* I2C Own Address 0 */
5520
 
5521
/* UCBxI2COA Control Bits */
5522
#define UCGCEN_H               (0x0080)       /* I2C General Call enable */
5523
#define UCOA9_H                (0x0002)       /* I2C Own Address 9 */
5524
#define UCOA8_H                (0x0001)       /* I2C Own Address 8 */
5525
 
5526
/* UCBxI2CSA Control Bits */
5527
#define UCSA9                  (0x0200)       /* I2C Slave Address 9 */
5528
#define UCSA8                  (0x0100)       /* I2C Slave Address 8 */
5529
#define UCSA7                  (0x0080)       /* I2C Slave Address 7 */
5530
#define UCSA6                  (0x0040)       /* I2C Slave Address 6 */
5531
#define UCSA5                  (0x0020)       /* I2C Slave Address 5 */
5532
#define UCSA4                  (0x0010)       /* I2C Slave Address 4 */
5533
#define UCSA3                  (0x0008)       /* I2C Slave Address 3 */
5534
#define UCSA2                  (0x0004)       /* I2C Slave Address 2 */
5535
#define UCSA1                  (0x0002)       /* I2C Slave Address 1 */
5536
#define UCSA0                  (0x0001)       /* I2C Slave Address 0 */
5537
 
5538
/* UCBxI2CSA Control Bits */
5539
#define UCSA7_L                (0x0080)       /* I2C Slave Address 7 */
5540
#define UCSA6_L                (0x0040)       /* I2C Slave Address 6 */
5541
#define UCSA5_L                (0x0020)       /* I2C Slave Address 5 */
5542
#define UCSA4_L                (0x0010)       /* I2C Slave Address 4 */
5543
#define UCSA3_L                (0x0008)       /* I2C Slave Address 3 */
5544
#define UCSA2_L                (0x0004)       /* I2C Slave Address 2 */
5545
#define UCSA1_L                (0x0002)       /* I2C Slave Address 1 */
5546
#define UCSA0_L                (0x0001)       /* I2C Slave Address 0 */
5547
 
5548
/* UCBxI2CSA Control Bits */
5549
#define UCSA9_H                (0x0002)       /* I2C Slave Address 9 */
5550
#define UCSA8_H                (0x0001)       /* I2C Slave Address 8 */
5551
 
5552
/* UCAxIE Control Bits */
5553
#define UCTXIE                 (0x0002)       /* USCI Transmit Interrupt Enable */
5554
#define UCRXIE                 (0x0001)       /* USCI Receive Interrupt Enable */
5555
 
5556
/* UCBxIE Control Bits */
5557
#define UCNACKIE               (0x0020)       /* NACK Condition interrupt enable */
5558
#define UCALIE                 (0x0010)       /* Arbitration Lost interrupt enable */
5559
#define UCSTPIE                (0x0008)       /* STOP Condition interrupt enable */
5560
#define UCSTTIE                (0x0004)       /* START Condition interrupt enable */
5561
#define UCTXIE                 (0x0002)       /* USCI Transmit Interrupt Enable */
5562
#define UCRXIE                 (0x0001)       /* USCI Receive Interrupt Enable */
5563
 
5564
/* UCAxIFG Control Bits */
5565
#define UCTXIFG                (0x0002)       /* USCI Transmit Interrupt Flag */
5566
#define UCRXIFG                (0x0001)       /* USCI Receive Interrupt Flag */
5567
 
5568
/* UCBxIFG Control Bits */
5569
#define UCNACKIFG              (0x0020)       /* NAK Condition interrupt Flag */
5570
#define UCALIFG                (0x0010)       /* Arbitration Lost interrupt Flag */
5571
#define UCSTPIFG               (0x0008)       /* STOP Condition interrupt Flag */
5572
#define UCSTTIFG               (0x0004)       /* START Condition interrupt Flag */
5573
#define UCTXIFG                (0x0002)       /* USCI Transmit Interrupt Flag */
5574
#define UCRXIFG                (0x0001)       /* USCI Receive Interrupt Flag */
5575
 
5576
/* USCI Definitions */
5577
#define USCI_NONE              (0x0000)       /* No Interrupt pending */
5578
#define USCI_UCRXIFG           (0x0002)       /* USCI UCRXIFG */
5579
#define USCI_UCTXIFG           (0x0004)       /* USCI UCTXIFG */
5580
#define USCI_I2C_UCALIFG       (0x0002)       /* USCI I2C Mode: UCALIFG */
5581
#define USCI_I2C_UCNACKIFG     (0x0004)       /* USCI I2C Mode: UCNACKIFG */
5582
#define USCI_I2C_UCSTTIFG      (0x0006)       /* USCI I2C Mode: UCSTTIFG*/
5583
#define USCI_I2C_UCSTPIFG      (0x0008)       /* USCI I2C Mode: UCSTPIFG*/
5584
#define USCI_I2C_UCRXIFG       (0x000A)       /* USCI I2C Mode: UCRXIFG */
5585
#define USCI_I2C_UCTXIFG       (0x000C)       /* USCI I2C Mode: UCTXIFG */
5586
 
5587
/************************************************************
5588
* USCI A1
5589
************************************************************/
5590
#define __MSP430_HAS_USCI_A1__                /* Definition to show that Module is available */
5591
#define __MSP430_BASEADDRESS_USCI_A1__ 0x0600
5592
 
5593
SFR_16BIT(UCA1CTLW0);                         /* USCI A1 Control Word Register 0 */
5594
SFR_8BIT(UCA1CTLW0_L);                        /* USCI A1 Control Word Register 0 */
5595
SFR_8BIT(UCA1CTLW0_H);                        /* USCI A1 Control Word Register 0 */
5596
#define UCA1CTL1               UCA1CTLW0_L    /* USCI A1 Control Register 1 */
5597
#define UCA1CTL0               UCA1CTLW0_H    /* USCI A1 Control Register 0 */
5598
SFR_16BIT(UCA1BRW);                           /* USCI A1 Baud Word Rate 0 */
5599
SFR_8BIT(UCA1BRW_L);                          /* USCI A1 Baud Word Rate 0 */
5600
SFR_8BIT(UCA1BRW_H);                          /* USCI A1 Baud Word Rate 0 */
5601
#define UCA1BR0                UCA1BRW_L      /* USCI A1 Baud Rate 0 */
5602
#define UCA1BR1                UCA1BRW_H      /* USCI A1 Baud Rate 1 */
5603
SFR_8BIT(UCA1MCTL);                           /* USCI A1 Modulation Control */
5604
SFR_8BIT(UCA1STAT);                           /* USCI A1 Status Register */
5605
SFR_8BIT(UCA1RXBUF);                          /* USCI A1 Receive Buffer */
5606
SFR_8BIT(UCA1TXBUF);                          /* USCI A1 Transmit Buffer */
5607
SFR_8BIT(UCA1ABCTL);                          /* USCI A1 LIN Control */
5608
SFR_16BIT(UCA1IRCTL);                         /* USCI A1 IrDA Transmit Control */
5609
SFR_8BIT(UCA1IRCTL_L);                        /* USCI A1 IrDA Transmit Control */
5610
SFR_8BIT(UCA1IRCTL_H);                        /* USCI A1 IrDA Transmit Control */
5611
#define UCA1IRTCTL             UCA1IRCTL_L    /* USCI A1 IrDA Transmit Control */
5612
#define UCA1IRRCTL             UCA1IRCTL_H    /* USCI A1 IrDA Receive Control */
5613
SFR_16BIT(UCA1ICTL);                          /* USCI A1 Interrupt Enable Register */
5614
SFR_8BIT(UCA1ICTL_L);                         /* USCI A1 Interrupt Enable Register */
5615
SFR_8BIT(UCA1ICTL_H);                         /* USCI A1 Interrupt Enable Register */
5616
#define UCA1IE                 UCA1ICTL_L     /* USCI A1 Interrupt Enable Register */
5617
#define UCA1IFG                UCA1ICTL_H     /* USCI A1 Interrupt Flags Register */
5618
SFR_16BIT(UCA1IV);                            /* USCI A1 Interrupt Vector Register */
5619
 
5620
 
5621
/************************************************************
5622
* USCI B1
5623
************************************************************/
5624
#define __MSP430_HAS_USCI_B1__                /* Definition to show that Module is available */
5625
#define __MSP430_BASEADDRESS_USCI_B1__ 0x0620
5626
 
5627
 
5628
SFR_16BIT(UCB1CTLW0);                         /* USCI B1 Control Word Register 0 */
5629
SFR_8BIT(UCB1CTLW0_L);                        /* USCI B1 Control Word Register 0 */
5630
SFR_8BIT(UCB1CTLW0_H);                        /* USCI B1 Control Word Register 0 */
5631
#define UCB1CTL1               UCB1CTLW0_L    /* USCI B1 Control Register 1 */
5632
#define UCB1CTL0               UCB1CTLW0_H    /* USCI B1 Control Register 0 */
5633
SFR_16BIT(UCB1BRW);                           /* USCI B1 Baud Word Rate 0 */
5634
SFR_8BIT(UCB1BRW_L);                          /* USCI B1 Baud Word Rate 0 */
5635
SFR_8BIT(UCB1BRW_H);                          /* USCI B1 Baud Word Rate 0 */
5636
#define UCB1BR0                UCB1BRW_L      /* USCI B1 Baud Rate 0 */
5637
#define UCB1BR1                UCB1BRW_H      /* USCI B1 Baud Rate 1 */
5638
SFR_8BIT(UCB1STAT);                           /* USCI B1 Status Register */
5639
SFR_8BIT(UCB1RXBUF);                          /* USCI B1 Receive Buffer */
5640
SFR_8BIT(UCB1TXBUF);                          /* USCI B1 Transmit Buffer */
5641
SFR_16BIT(UCB1I2COA);                         /* USCI B1 I2C Own Address */
5642
SFR_8BIT(UCB1I2COA_L);                        /* USCI B1 I2C Own Address */
5643
SFR_8BIT(UCB1I2COA_H);                        /* USCI B1 I2C Own Address */
5644
SFR_16BIT(UCB1I2CSA);                         /* USCI B1 I2C Slave Address */
5645
SFR_8BIT(UCB1I2CSA_L);                        /* USCI B1 I2C Slave Address */
5646
SFR_8BIT(UCB1I2CSA_H);                        /* USCI B1 I2C Slave Address */
5647
SFR_16BIT(UCB1ICTL);                          /* USCI B1 Interrupt Enable Register */
5648
SFR_8BIT(UCB1ICTL_L);                         /* USCI B1 Interrupt Enable Register */
5649
SFR_8BIT(UCB1ICTL_H);                         /* USCI B1 Interrupt Enable Register */
5650
#define UCB1IE                 UCB1ICTL_L     /* USCI B1 Interrupt Enable Register */
5651
#define UCB1IFG                UCB1ICTL_H     /* USCI B1 Interrupt Flags Register */
5652
SFR_16BIT(UCB1IV);                            /* USCI B1 Interrupt Vector Register */
5653
 
5654
/************************************************************
5655
* WATCHDOG TIMER A
5656
************************************************************/
5657
#define __MSP430_HAS_WDT_A__                  /* Definition to show that Module is available */
5658
#define __MSP430_BASEADDRESS_WDT_A__ 0x0150
5659
 
5660
SFR_16BIT(WDTCTL);                            /* Watchdog Timer Control */
5661
SFR_8BIT(WDTCTL_L);                           /* Watchdog Timer Control */
5662
SFR_8BIT(WDTCTL_H);                           /* Watchdog Timer Control */
5663
/* The bit names have been prefixed with "WDT" */
5664
/* WDTCTL Control Bits */
5665
#define WDTIS0                 (0x0001)       /* WDT - Timer Interval Select 0 */
5666
#define WDTIS1                 (0x0002)       /* WDT - Timer Interval Select 1 */
5667
#define WDTIS2                 (0x0004)       /* WDT - Timer Interval Select 2 */
5668
#define WDTCNTCL               (0x0008)       /* WDT - Timer Clear */
5669
#define WDTTMSEL               (0x0010)       /* WDT - Timer Mode Select */
5670
#define WDTSSEL0               (0x0020)       /* WDT - Timer Clock Source Select 0 */
5671
#define WDTSSEL1               (0x0040)       /* WDT - Timer Clock Source Select 1 */
5672
#define WDTHOLD                (0x0080)       /* WDT - Timer hold */
5673
 
5674
/* WDTCTL Control Bits */
5675
#define WDTIS0_L               (0x0001)       /* WDT - Timer Interval Select 0 */
5676
#define WDTIS1_L               (0x0002)       /* WDT - Timer Interval Select 1 */
5677
#define WDTIS2_L               (0x0004)       /* WDT - Timer Interval Select 2 */
5678
#define WDTCNTCL_L             (0x0008)       /* WDT - Timer Clear */
5679
#define WDTTMSEL_L             (0x0010)       /* WDT - Timer Mode Select */
5680
#define WDTSSEL0_L             (0x0020)       /* WDT - Timer Clock Source Select 0 */
5681
#define WDTSSEL1_L             (0x0040)       /* WDT - Timer Clock Source Select 1 */
5682
#define WDTHOLD_L              (0x0080)       /* WDT - Timer hold */
5683
 
5684
/* WDTCTL Control Bits */
5685
 
5686
#define WDTPW                  (0x5A00)
5687
 
5688
#define WDTIS_0                (0*0x0001u)    /* WDT - Timer Interval Select: /2G */
5689
#define WDTIS_1                (1*0x0001u)    /* WDT - Timer Interval Select: /128M */
5690
#define WDTIS_2                (2*0x0001u)    /* WDT - Timer Interval Select: /8192k */
5691
#define WDTIS_3                (3*0x0001u)    /* WDT - Timer Interval Select: /512k */
5692
#define WDTIS_4                (4*0x0001u)    /* WDT - Timer Interval Select: /32k */
5693
#define WDTIS_5                (5*0x0001u)    /* WDT - Timer Interval Select: /8192 */
5694
#define WDTIS_6                (6*0x0001u)    /* WDT - Timer Interval Select: /512 */
5695
#define WDTIS_7                (7*0x0001u)    /* WDT - Timer Interval Select: /64 */
5696
#define WDTIS__2G              (0*0x0001u)    /* WDT - Timer Interval Select: /2G */
5697
#define WDTIS__128M            (1*0x0001u)    /* WDT - Timer Interval Select: /128M */
5698
#define WDTIS__8192K           (2*0x0001u)    /* WDT - Timer Interval Select: /8192k */
5699
#define WDTIS__512K            (3*0x0001u)    /* WDT - Timer Interval Select: /512k */
5700
#define WDTIS__32K             (4*0x0001u)    /* WDT - Timer Interval Select: /32k */
5701
#define WDTIS__8192            (5*0x0001u)    /* WDT - Timer Interval Select: /8192 */
5702
#define WDTIS__512             (6*0x0001u)    /* WDT - Timer Interval Select: /512 */
5703
#define WDTIS__64              (7*0x0001u)    /* WDT - Timer Interval Select: /64 */
5704
 
5705
#define WDTSSEL_0              (0*0x0020u)    /* WDT - Timer Clock Source Select: SMCLK */
5706
#define WDTSSEL_1              (1*0x0020u)    /* WDT - Timer Clock Source Select: ACLK */
5707
#define WDTSSEL_2              (2*0x0020u)    /* WDT - Timer Clock Source Select: VLO_CLK */
5708
#define WDTSSEL_3              (3*0x0020u)    /* WDT - Timer Clock Source Select: reserved */
5709
#define WDTSSEL__SMCLK         (0*0x0020u)    /* WDT - Timer Clock Source Select: SMCLK */
5710
#define WDTSSEL__ACLK          (1*0x0020u)    /* WDT - Timer Clock Source Select: ACLK */
5711
#define WDTSSEL__VLO           (2*0x0020u)    /* WDT - Timer Clock Source Select: VLO_CLK */
5712
 
5713
/* WDT-interval times [1ms] coded with Bits 0-2 */
5714
/* WDT is clocked by fSMCLK (assumed 1MHz) */
5715
#define WDT_MDLY_32         (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2)                         /* 32ms interval (default) */
5716
#define WDT_MDLY_8          (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTIS0)                  /* 8ms     " */
5717
#define WDT_MDLY_0_5        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTIS1)                  /* 0.5ms   " */
5718
#define WDT_MDLY_0_064      (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTIS1+WDTIS0)           /* 0.064ms " */
5719
/* WDT is clocked by fACLK (assumed 32KHz) */
5720
#define WDT_ADLY_1000       (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0)                /* 1000ms  " */
5721
#define WDT_ADLY_250        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0+WDTIS0)         /* 250ms   " */
5722
#define WDT_ADLY_16         (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0+WDTIS1)         /* 16ms    " */
5723
#define WDT_ADLY_1_9        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0+WDTIS1+WDTIS0)  /* 1.9ms   " */
5724
/* Watchdog mode -> reset after expired time */
5725
/* WDT is clocked by fSMCLK (assumed 1MHz) */
5726
#define WDT_MRST_32         (WDTPW+WDTCNTCL+WDTIS2)                                  /* 32ms interval (default) */
5727
#define WDT_MRST_8          (WDTPW+WDTCNTCL+WDTIS2+WDTIS0)                           /* 8ms     " */
5728
#define WDT_MRST_0_5        (WDTPW+WDTCNTCL+WDTIS2+WDTIS1)                           /* 0.5ms   " */
5729
#define WDT_MRST_0_064      (WDTPW+WDTCNTCL+WDTIS2+WDTIS1+WDTIS0)                    /* 0.064ms " */
5730
/* WDT is clocked by fACLK (assumed 32KHz) */
5731
#define WDT_ARST_1000       (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2)                         /* 1000ms  " */
5732
#define WDT_ARST_250        (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2+WDTIS0)                  /* 250ms   " */
5733
#define WDT_ARST_16         (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2+WDTIS1)                  /* 16ms    " */
5734
#define WDT_ARST_1_9        (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2+WDTIS1+WDTIS0)           /* 1.9ms   " */
5735
 
5736
 
5737
/************************************************************
5738
* TLV Descriptors
5739
************************************************************/
5740
#define __MSP430_HAS_TLV__                    /* Definition to show that Module is available */
5741
 
5742
#define TLV_START              (0x1A08)       /* Start Address of the TLV structure */
5743
#define TLV_END                (0x1AFF)       /* End Address of the TLV structure */
5744
 
5745
#define TLV_LDTAG              (0x01)         /*  Legacy descriptor (1xx, 2xx, 4xx families) */
5746
#define TLV_PDTAG              (0x02)         /*  Peripheral discovery descriptor */
5747
#define TLV_Reserved3          (0x03)         /*  Future usage */
5748
#define TLV_Reserved4          (0x04)         /*  Future usage */
5749
#define TLV_BLANK              (0x05)         /*  Blank descriptor */
5750
#define TLV_Reserved6          (0x06)         /*  Future usage */
5751
#define TLV_Reserved7          (0x07)         /*  Serial Number */
5752
#define TLV_DIERECORD          (0x08)         /*  Die Record  */
5753
#define TLV_ADCCAL             (0x11)         /*  ADC12 calibration */
5754
#define TLV_ADC12CAL           (0x11)         /*  ADC12 calibration */
5755
#define TLV_ADC10CAL           (0x13)         /*  ADC10 calibration */
5756
#define TLV_REFCAL             (0x12)         /*  REF calibration */
5757
#define TLV_TAGEXT             (0xFE)         /*  Tag extender */
5758
#define TLV_TAGEND             (0xFF)         //  Tag End of Table
5759
 
5760
/************************************************************
5761
* Interrupt Vectors (offset from 0xFF80)
5762
************************************************************/
5763
 
5764
#pragma diag_suppress 1107
5765
#define VECTOR_NAME(name)             name##_ptr
5766
#define EMIT_PRAGMA(x)                _Pragma(#x)
5767
#define CREATE_VECTOR(name)           void * const VECTOR_NAME(name) = (void *)(long)&name
5768
#define PLACE_VECTOR(vector,section)  EMIT_PRAGMA(DATA_SECTION(vector,section))
5769
#define PLACE_INTERRUPT(func)         EMIT_PRAGMA(CODE_SECTION(func,".text:_isr"))
5770
#define ISR_VECTOR(func,offset)       CREATE_VECTOR(func); \
5771
                                      PLACE_VECTOR(VECTOR_NAME(func), offset) \
5772
                                      PLACE_INTERRUPT(func)
5773
 
5774
 
5775
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5776
#define PORT4_VECTOR            ".int37"                    /* 0xFFCA Port 4 */
5777
#else
5778
#define PORT4_VECTOR            (37 * 1u)                    /* 0xFFCA Port 4 */
5779
/*#define PORT4_ISR(func)         ISR_VECTOR(func, ".int37")  */ /* 0xFFCA Port 4 */ /* CCE V2 Style */
5780
#endif
5781
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5782
#define PORT3_VECTOR            ".int38"                    /* 0xFFCC Port 3 */
5783
#else
5784
#define PORT3_VECTOR            (38 * 1u)                    /* 0xFFCC Port 3 */
5785
/*#define PORT3_ISR(func)         ISR_VECTOR(func, ".int38")  */ /* 0xFFCC Port 3 */ /* CCE V2 Style */
5786
#endif
5787
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5788
#define TIMER2_A1_VECTOR        ".int39"                    /* 0xFFCE Timer0_A5 CC1-4, TA */
5789
#else
5790
#define TIMER2_A1_VECTOR        (39 * 1u)                    /* 0xFFCE Timer0_A5 CC1-4, TA */
5791
/*#define TIMER2_A1_ISR(func)     ISR_VECTOR(func, ".int39")  */ /* 0xFFCE Timer0_A5 CC1-4, TA */ /* CCE V2 Style */
5792
#endif
5793
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5794
#define TIMER2_A0_VECTOR        ".int40"                    /* 0xFFD0 Timer0_A5 CC0 */
5795
#else
5796
#define TIMER2_A0_VECTOR        (40 * 1u)                    /* 0xFFD0 Timer0_A5 CC0 */
5797
/*#define TIMER2_A0_ISR(func)     ISR_VECTOR(func, ".int40")  */ /* 0xFFD0 Timer0_A5 CC0 */ /* CCE V2 Style */
5798
#endif
5799
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5800
#define DAC12_VECTOR            ".int41"                    /* 0xFFD3 DAC12 */
5801
#else
5802
#define DAC12_VECTOR            (41 * 1u)                    /* 0xFFD3 DAC12 */
5803
/*#define DAC12_ISR(func)         ISR_VECTOR(func, ".int41")  */ /* 0xFFD3 DAC12 */ /* CCE V2 Style */
5804
#endif
5805
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5806
#define RTC_VECTOR              ".int42"                    /* 0xFFD4 RTC */
5807
#else
5808
#define RTC_VECTOR              (42 * 1u)                    /* 0xFFD4 RTC */
5809
/*#define RTC_ISR(func)           ISR_VECTOR(func, ".int42")  */ /* 0xFFD4 RTC */ /* CCE V2 Style */
5810
#endif
5811
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5812
#define LCD_B_VECTOR            ".int43"                    /* 0xFFD6 LCD B */
5813
#else
5814
#define LCD_B_VECTOR            (43 * 1u)                    /* 0xFFD6 LCD B */
5815
/*#define LCD_B_ISR(func)         ISR_VECTOR(func, ".int43")  */ /* 0xFFD6 LCD B */ /* CCE V2 Style */
5816
#endif
5817
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5818
#define PORT2_VECTOR            ".int44"                    /* 0xFFD8 Port 2 */
5819
#else
5820
#define PORT2_VECTOR            (44 * 1u)                    /* 0xFFD8 Port 2 */
5821
/*#define PORT2_ISR(func)         ISR_VECTOR(func, ".int44")  */ /* 0xFFD8 Port 2 */ /* CCE V2 Style */
5822
#endif
5823
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5824
#define USCI_B1_VECTOR          ".int45"                    /* 0xFFDA USCI B1 Receive/Transmit */
5825
#else
5826
#define USCI_B1_VECTOR          (45 * 1u)                    /* 0xFFDA USCI B1 Receive/Transmit */
5827
/*#define USCI_B1_ISR(func)       ISR_VECTOR(func, ".int45")  */ /* 0xFFDA USCI B1 Receive/Transmit */ /* CCE V2 Style */
5828
#endif
5829
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5830
#define USCI_A1_VECTOR          ".int46"                    /* 0xFFDC USCI A1 Receive/Transmit */
5831
#else
5832
#define USCI_A1_VECTOR          (46 * 1u)                    /* 0xFFDC USCI A1 Receive/Transmit */
5833
/*#define USCI_A1_ISR(func)       ISR_VECTOR(func, ".int46")  */ /* 0xFFDC USCI A1 Receive/Transmit */ /* CCE V2 Style */
5834
#endif
5835
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5836
#define PORT1_VECTOR            ".int47"                    /* 0xFFDE Port 1 */
5837
#else
5838
#define PORT1_VECTOR            (47 * 1u)                    /* 0xFFDE Port 1 */
5839
/*#define PORT1_ISR(func)         ISR_VECTOR(func, ".int47")  */ /* 0xFFDE Port 1 */ /* CCE V2 Style */
5840
#endif
5841
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5842
#define TIMER1_A1_VECTOR        ".int48"                    /* 0xFFE0 Timer1_A3 CC1-2, TA1 */
5843
#else
5844
#define TIMER1_A1_VECTOR        (48 * 1u)                    /* 0xFFE0 Timer1_A3 CC1-2, TA1 */
5845
/*#define TIMER1_A1_ISR(func)     ISR_VECTOR(func, ".int48")  */ /* 0xFFE0 Timer1_A3 CC1-2, TA1 */ /* CCE V2 Style */
5846
#endif
5847
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5848
#define TIMER1_A0_VECTOR        ".int49"                    /* 0xFFE2 Timer1_A3 CC0 */
5849
#else
5850
#define TIMER1_A0_VECTOR        (49 * 1u)                    /* 0xFFE2 Timer1_A3 CC0 */
5851
/*#define TIMER1_A0_ISR(func)     ISR_VECTOR(func, ".int49")  */ /* 0xFFE2 Timer1_A3 CC0 */ /* CCE V2 Style */
5852
#endif
5853
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5854
#define DMA_VECTOR              ".int50"                    /* 0xFFE4 DMA */
5855
#else
5856
#define DMA_VECTOR              (50 * 1u)                    /* 0xFFE4 DMA */
5857
/*#define DMA_ISR(func)           ISR_VECTOR(func, ".int50")  */ /* 0xFFE4 DMA */ /* CCE V2 Style */
5858
#endif
5859
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5860
#define USB_UBM_VECTOR          ".int51"                    /* 0xFFE6 USB Timer / cable event / USB reset */
5861
#else
5862
#define USB_UBM_VECTOR          (51 * 1u)                    /* 0xFFE6 USB Timer / cable event / USB reset */
5863
/*#define USB_UBM_ISR(func)       ISR_VECTOR(func, ".int51")  */ /* 0xFFE6 USB Timer / cable event / USB reset */ /* CCE V2 Style */
5864
#endif
5865
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5866
#define TIMER0_A1_VECTOR        ".int52"                    /* 0xFFE8 Timer0_A5 CC1-4, TA */
5867
#else
5868
#define TIMER0_A1_VECTOR        (52 * 1u)                    /* 0xFFE8 Timer0_A5 CC1-4, TA */
5869
/*#define TIMER0_A1_ISR(func)     ISR_VECTOR(func, ".int52")  */ /* 0xFFE8 Timer0_A5 CC1-4, TA */ /* CCE V2 Style */
5870
#endif
5871
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5872
#define TIMER0_A0_VECTOR        ".int53"                    /* 0xFFEA Timer0_A5 CC0 */
5873
#else
5874
#define TIMER0_A0_VECTOR        (53 * 1u)                    /* 0xFFEA Timer0_A5 CC0 */
5875
/*#define TIMER0_A0_ISR(func)     ISR_VECTOR(func, ".int53")  */ /* 0xFFEA Timer0_A5 CC0 */ /* CCE V2 Style */
5876
#endif
5877
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5878
#define ADC12_VECTOR            ".int54"                    /* 0xFFEC ADC */
5879
#else
5880
#define ADC12_VECTOR            (54 * 1u)                    /* 0xFFEC ADC */
5881
/*#define ADC12_ISR(func)         ISR_VECTOR(func, ".int54")  */ /* 0xFFEC ADC */ /* CCE V2 Style */
5882
#endif
5883
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5884
#define USCI_B0_VECTOR          ".int55"                    /* 0xFFEE USCI B0 Receive/Transmit */
5885
#else
5886
#define USCI_B0_VECTOR          (55 * 1u)                    /* 0xFFEE USCI B0 Receive/Transmit */
5887
/*#define USCI_B0_ISR(func)       ISR_VECTOR(func, ".int55")  */ /* 0xFFEE USCI B0 Receive/Transmit */ /* CCE V2 Style */
5888
#endif
5889
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5890
#define USCI_A0_VECTOR          ".int56"                    /* 0xFFF0 USCI A0 Receive/Transmit */
5891
#else
5892
#define USCI_A0_VECTOR          (56 * 1u)                    /* 0xFFF0 USCI A0 Receive/Transmit */
5893
/*#define USCI_A0_ISR(func)       ISR_VECTOR(func, ".int56")  */ /* 0xFFF0 USCI A0 Receive/Transmit */ /* CCE V2 Style */
5894
#endif
5895
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5896
#define WDT_VECTOR              ".int57"                    /* 0xFFF2 Watchdog Timer */
5897
#else
5898
#define WDT_VECTOR              (57 * 1u)                    /* 0xFFF2 Watchdog Timer */
5899
/*#define WDT_ISR(func)           ISR_VECTOR(func, ".int57")  */ /* 0xFFF2 Watchdog Timer */ /* CCE V2 Style */
5900
#endif
5901
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5902
#define TIMER0_B1_VECTOR        ".int58"                    /* 0xFFF4 Timer0_B7 CC1-6, TB */
5903
#else
5904
#define TIMER0_B1_VECTOR        (58 * 1u)                    /* 0xFFF4 Timer0_B7 CC1-6, TB */
5905
/*#define TIMER0_B1_ISR(func)     ISR_VECTOR(func, ".int58")  */ /* 0xFFF4 Timer0_B7 CC1-6, TB */ /* CCE V2 Style */
5906
#endif
5907
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5908
#define TIMER0_B0_VECTOR        ".int59"                    /* 0xFFF6 Timer0_B7 CC0 */
5909
#else
5910
#define TIMER0_B0_VECTOR        (59 * 1u)                    /* 0xFFF6 Timer0_B7 CC0 */
5911
/*#define TIMER0_B0_ISR(func)     ISR_VECTOR(func, ".int59")  */ /* 0xFFF6 Timer0_B7 CC0 */ /* CCE V2 Style */
5912
#endif
5913
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5914
#define COMP_B_VECTOR           ".int60"                    /* 0xFFF8 Comparator B */
5915
#else
5916
#define COMP_B_VECTOR           (60 * 1u)                    /* 0xFFF8 Comparator B */
5917
/*#define COMP_B_ISR(func)        ISR_VECTOR(func, ".int60")  */ /* 0xFFF8 Comparator B */ /* CCE V2 Style */
5918
#endif
5919
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5920
#define UNMI_VECTOR             ".int61"                    /* 0xFFFA User Non-maskable */
5921
#else
5922
#define UNMI_VECTOR             (61 * 1u)                    /* 0xFFFA User Non-maskable */
5923
/*#define UNMI_ISR(func)          ISR_VECTOR(func, ".int61")  */ /* 0xFFFA User Non-maskable */ /* CCE V2 Style */
5924
#endif
5925
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5926
#define SYSNMI_VECTOR           ".int62"                    /* 0xFFFC System Non-maskable */
5927
#else
5928
#define SYSNMI_VECTOR           (62 * 1u)                    /* 0xFFFC System Non-maskable */
5929
/*#define SYSNMI_ISR(func)        ISR_VECTOR(func, ".int62")  */ /* 0xFFFC System Non-maskable */ /* CCE V2 Style */
5930
#endif
5931
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
5932
#define RESET_VECTOR            ".reset"                    /* 0xFFFE Reset [Highest Priority] */
5933
#else
5934
#define RESET_VECTOR            (63 * 1u)                    /* 0xFFFE Reset [Highest Priority] */
5935
/*#define RESET_ISR(func)         ISR_VECTOR(func, ".int63")  */ /* 0xFFFE Reset [Highest Priority] */ /* CCE V2 Style */
5936
#endif
5937
 
5938
/************************************************************
5939
* End of Modules
5940
************************************************************/
5941
 
5942
#ifdef __cplusplus
5943
}
5944
#endif /* extern "C" */
5945
 
5946
#endif /* #ifndef __MSP430F6637 */
5947