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