Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2850 dpurdie 1
/******************************************************************************/
2
/* Legacy Header File                                                         */
3
/* Not recommended for use in new projects.                                   */
4
/* Please use the msp430.h file or the device specific header file            */
5
/******************************************************************************/
6
 
7
/********************************************************************
8
*
9
* Standard register and bit definitions for the Texas Instruments
10
* MSP430 microcontroller.
11
*
12
* This file supports assembler and C development for
13
* msp430x551x devices.
14
*
15
* Texas Instruments, Version 1.4
16
*
17
* Rev. 1.0, Setup
18
* Rev. 1.1, Fixed Error in DMA Trigger Definitons
19
* Rev. 1.2, fixed SYSUNIV_BUSIFG definition
20
*           fixed wrong bit definition in PM5CTL0 (LOCKLPM5)
21
* Rev. 1.3, Changed access type of DMAxSZ registers to word only
22
* Rev. 1.4  Changed access type of TimerA/B registers to word only
23
*
24
********************************************************************/
25
 
26
#ifndef __msp430x551x
27
#define __msp430x551x
28
 
29
#ifdef __cplusplus
30
extern "C" {
31
#endif
32
 
33
 
34
/*----------------------------------------------------------------------------*/
35
/* PERIPHERAL FILE MAP                                                        */
36
/*----------------------------------------------------------------------------*/
37
 
38
/* External references resolved by a device-specific linker command file */
39
#define SFR_8BIT(address)   extern volatile unsigned char address
40
#define SFR_16BIT(address)  extern volatile unsigned int address
41
//#define SFR_20BIT(address)  extern volatile unsigned int address
42
typedef void (* __SFR_FARPTR)();
43
#define SFR_20BIT(address) extern __SFR_FARPTR address
44
#define SFR_32BIT(address)  extern volatile unsigned long address
45
 
46
 
47
 
48
/************************************************************
49
* STANDARD BITS
50
************************************************************/
51
 
52
#define BIT0                   (0x0001)
53
#define BIT1                   (0x0002)
54
#define BIT2                   (0x0004)
55
#define BIT3                   (0x0008)
56
#define BIT4                   (0x0010)
57
#define BIT5                   (0x0020)
58
#define BIT6                   (0x0040)
59
#define BIT7                   (0x0080)
60
#define BIT8                   (0x0100)
61
#define BIT9                   (0x0200)
62
#define BITA                   (0x0400)
63
#define BITB                   (0x0800)
64
#define BITC                   (0x1000)
65
#define BITD                   (0x2000)
66
#define BITE                   (0x4000)
67
#define BITF                   (0x8000)
68
 
69
/************************************************************
70
* STATUS REGISTER BITS
71
************************************************************/
72
 
73
#define C                      (0x0001)
74
#define Z                      (0x0002)
75
#define N                      (0x0004)
76
#define V                      (0x0100)
77
#define GIE                    (0x0008)
78
#define CPUOFF                 (0x0010)
79
#define OSCOFF                 (0x0020)
80
#define SCG0                   (0x0040)
81
#define SCG1                   (0x0080)
82
 
83
/* Low Power Modes coded with Bits 4-7 in SR */
84
 
85
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
86
#define LPM0                   (CPUOFF)
87
#define LPM1                   (SCG0+CPUOFF)
88
#define LPM2                   (SCG1+CPUOFF)
89
#define LPM3                   (SCG1+SCG0+CPUOFF)
90
#define LPM4                   (SCG1+SCG0+OSCOFF+CPUOFF)
91
/* End #defines for assembler */
92
 
93
#else /* Begin #defines for C */
94
#define LPM0_bits              (CPUOFF)
95
#define LPM1_bits              (SCG0+CPUOFF)
96
#define LPM2_bits              (SCG1+CPUOFF)
97
#define LPM3_bits              (SCG1+SCG0+CPUOFF)
98
#define LPM4_bits              (SCG1+SCG0+OSCOFF+CPUOFF)
99
 
100
#include "in430.h"
101
 
102
#define LPM0         _bis_SR_register(LPM0_bits)         /* Enter Low Power Mode 0 */
103
#define LPM0_EXIT    _bic_SR_register_on_exit(LPM0_bits) /* Exit Low Power Mode 0 */
104
#define LPM1         _bis_SR_register(LPM1_bits)         /* Enter Low Power Mode 1 */
105
#define LPM1_EXIT    _bic_SR_register_on_exit(LPM1_bits) /* Exit Low Power Mode 1 */
106
#define LPM2         _bis_SR_register(LPM2_bits)         /* Enter Low Power Mode 2 */
107
#define LPM2_EXIT    _bic_SR_register_on_exit(LPM2_bits) /* Exit Low Power Mode 2 */
108
#define LPM3         _bis_SR_register(LPM3_bits)         /* Enter Low Power Mode 3 */
109
#define LPM3_EXIT    _bic_SR_register_on_exit(LPM3_bits) /* Exit Low Power Mode 3 */
110
#define LPM4         _bis_SR_register(LPM4_bits)         /* Enter Low Power Mode 4 */
111
#define LPM4_EXIT    _bic_SR_register_on_exit(LPM4_bits) /* Exit Low Power Mode 4 */
112
#endif /* End #defines for C */
113
 
114
/************************************************************
115
* CPU
116
************************************************************/
117
#define __MSP430_HAS_MSP430XV2_CPU__                /* Definition to show that it has MSP430XV2 CPU */
118
 
119
/************************************************************
120
* PERIPHERAL FILE MAP
121
************************************************************/
122
 
123
/************************************************************
124
* Comparator B
125
************************************************************/
126
#define __MSP430_HAS_COMPB__                  /* Definition to show that Module is available */
127
#define __MSP430_BASEADDRESS_COMPB__ 0x08C0
128
 
129
SFR_16BIT(CBCTL0);                            /* Comparator B Control Register 0 */
130
SFR_8BIT(CBCTL0_L);                           /* Comparator B Control Register 0 */
131
SFR_8BIT(CBCTL0_H);                           /* Comparator B Control Register 0 */
132
SFR_16BIT(CBCTL1);                            /* Comparator B Control Register 1 */
133
SFR_8BIT(CBCTL1_L);                           /* Comparator B Control Register 1 */
134
SFR_8BIT(CBCTL1_H);                           /* Comparator B Control Register 1 */
135
SFR_16BIT(CBCTL2);                            /* Comparator B Control Register 2 */
136
SFR_8BIT(CBCTL2_L);                           /* Comparator B Control Register 2 */
137
SFR_8BIT(CBCTL2_H);                           /* Comparator B Control Register 2 */
138
SFR_16BIT(CBCTL3);                            /* Comparator B Control Register 3 */
139
SFR_8BIT(CBCTL3_L);                           /* Comparator B Control Register 3 */
140
SFR_8BIT(CBCTL3_H);                           /* Comparator B Control Register 3 */
141
SFR_16BIT(CBINT);                             /* Comparator B Interrupt Register */
142
SFR_8BIT(CBINT_L);                            /* Comparator B Interrupt Register */
143
SFR_8BIT(CBINT_H);                            /* Comparator B Interrupt Register */
144
SFR_16BIT(CBIV);                              /* Comparator B Interrupt Vector Word */
145
 
146
/* CBCTL0 Control Bits */
147
#define CBIPSEL0               (0x0001)       /* Comp. B Pos. Channel Input Select 0 */
148
#define CBIPSEL1               (0x0002)       /* Comp. B Pos. Channel Input Select 1 */
149
#define CBIPSEL2               (0x0004)       /* Comp. B Pos. Channel Input Select 2 */
150
#define CBIPSEL3               (0x0008)       /* Comp. B Pos. Channel Input Select 3 */
151
//#define RESERVED            (0x0010)  /* Comp. B */
152
//#define RESERVED            (0x0020)  /* Comp. B */
153
//#define RESERVED            (0x0040)  /* Comp. B */
154
#define CBIPEN                 (0x0080)       /* Comp. B Pos. Channel Input Enable */
155
#define CBIMSEL0               (0x0100)       /* Comp. B Neg. Channel Input Select 0 */
156
#define CBIMSEL1               (0x0200)       /* Comp. B Neg. Channel Input Select 1 */
157
#define CBIMSEL2               (0x0400)       /* Comp. B Neg. Channel Input Select 2 */
158
#define CBIMSEL3               (0x0800)       /* Comp. B Neg. Channel Input Select 3 */
159
//#define RESERVED            (0x1000)  /* Comp. B */
160
//#define RESERVED            (0x2000)  /* Comp. B */
161
//#define RESERVED            (0x4000)  /* Comp. B */
162
#define CBIMEN                 (0x8000)       /* Comp. B Neg. Channel Input Enable */
163
 
164
/* CBCTL0 Control Bits */
165
#define CBIPSEL0_L             (0x0001)       /* Comp. B Pos. Channel Input Select 0 */
166
#define CBIPSEL1_L             (0x0002)       /* Comp. B Pos. Channel Input Select 1 */
167
#define CBIPSEL2_L             (0x0004)       /* Comp. B Pos. Channel Input Select 2 */
168
#define CBIPSEL3_L             (0x0008)       /* Comp. B Pos. Channel Input Select 3 */
169
//#define RESERVED            (0x0010)  /* Comp. B */
170
//#define RESERVED            (0x0020)  /* Comp. B */
171
//#define RESERVED            (0x0040)  /* Comp. B */
172
#define CBIPEN_L               (0x0080)       /* Comp. B Pos. Channel Input Enable */
173
//#define RESERVED            (0x1000)  /* Comp. B */
174
//#define RESERVED            (0x2000)  /* Comp. B */
175
//#define RESERVED            (0x4000)  /* Comp. B */
176
 
177
/* CBCTL0 Control Bits */
178
//#define RESERVED            (0x0010)  /* Comp. B */
179
//#define RESERVED            (0x0020)  /* Comp. B */
180
//#define RESERVED            (0x0040)  /* Comp. B */
181
#define CBIMSEL0_H             (0x0001)       /* Comp. B Neg. Channel Input Select 0 */
182
#define CBIMSEL1_H             (0x0002)       /* Comp. B Neg. Channel Input Select 1 */
183
#define CBIMSEL2_H             (0x0004)       /* Comp. B Neg. Channel Input Select 2 */
184
#define CBIMSEL3_H             (0x0008)       /* Comp. B Neg. Channel Input Select 3 */
185
//#define RESERVED            (0x1000)  /* Comp. B */
186
//#define RESERVED            (0x2000)  /* Comp. B */
187
//#define RESERVED            (0x4000)  /* Comp. B */
188
#define CBIMEN_H               (0x0080)       /* Comp. B Neg. Channel Input Enable */
189
 
190
#define CBIPSEL_0              (0x0000)       /* Comp. B V+ terminal Input Select: Channel 0 */
191
#define CBIPSEL_1              (0x0001)       /* Comp. B V+ terminal Input Select: Channel 1 */
192
#define CBIPSEL_2              (0x0002)       /* Comp. B V+ terminal Input Select: Channel 2 */
193
#define CBIPSEL_3              (0x0003)       /* Comp. B V+ terminal Input Select: Channel 3 */
194
#define CBIPSEL_4              (0x0004)       /* Comp. B V+ terminal Input Select: Channel 4 */
195
#define CBIPSEL_5              (0x0005)       /* Comp. B V+ terminal Input Select: Channel 5 */
196
#define CBIPSEL_6              (0x0006)       /* Comp. B V+ terminal Input Select: Channel 6 */
197
#define CBIPSEL_7              (0x0007)       /* Comp. B V+ terminal Input Select: Channel 7 */
198
#define CBIPSEL_8              (0x0008)       /* Comp. B V+ terminal Input Select: Channel 8 */
199
#define CBIPSEL_9              (0x0009)       /* Comp. B V+ terminal Input Select: Channel 9 */
200
#define CBIPSEL_10             (0x000A)       /* Comp. B V+ terminal Input Select: Channel 10 */
201
#define CBIPSEL_11             (0x000B)       /* Comp. B V+ terminal Input Select: Channel 11 */
202
#define CBIPSEL_12             (0x000C)       /* Comp. B V+ terminal Input Select: Channel 12 */
203
#define CBIPSEL_13             (0x000D)       /* Comp. B V+ terminal Input Select: Channel 13 */
204
#define CBIPSEL_14             (0x000E)       /* Comp. B V+ terminal Input Select: Channel 14 */
205
#define CBIPSEL_15             (0x000F)       /* Comp. B V+ terminal Input Select: Channel 15 */
206
 
207
#define CBIMSEL_0              (0x0000)       /* Comp. B V- Terminal Input Select: Channel 0 */
208
#define CBIMSEL_1              (0x0100)       /* Comp. B V- Terminal Input Select: Channel 1 */
209
#define CBIMSEL_2              (0x0200)       /* Comp. B V- Terminal Input Select: Channel 2 */
210
#define CBIMSEL_3              (0x0300)       /* Comp. B V- Terminal Input Select: Channel 3 */
211
#define CBIMSEL_4              (0x0400)       /* Comp. B V- Terminal Input Select: Channel 4 */
212
#define CBIMSEL_5              (0x0500)       /* Comp. B V- Terminal Input Select: Channel 5 */
213
#define CBIMSEL_6              (0x0600)       /* Comp. B V- Terminal Input Select: Channel 6 */
214
#define CBIMSEL_7              (0x0700)       /* Comp. B V- Terminal Input Select: Channel 7 */
215
#define CBIMSEL_8              (0x0800)       /* Comp. B V- terminal Input Select: Channel 8 */
216
#define CBIMSEL_9              (0x0900)       /* Comp. B V- terminal Input Select: Channel 9 */
217
#define CBIMSEL_10             (0x0A00)       /* Comp. B V- terminal Input Select: Channel 10 */
218
#define CBIMSEL_11             (0x0B00)       /* Comp. B V- terminal Input Select: Channel 11 */
219
#define CBIMSEL_12             (0x0C00)       /* Comp. B V- terminal Input Select: Channel 12 */
220
#define CBIMSEL_13             (0x0D00)       /* Comp. B V- terminal Input Select: Channel 13 */
221
#define CBIMSEL_14             (0x0E00)       /* Comp. B V- terminal Input Select: Channel 14 */
222
#define CBIMSEL_15             (0x0F00)       /* Comp. B V- terminal Input Select: Channel 15 */
223
 
224
/* CBCTL1 Control Bits */
225
#define CBOUT                  (0x0001)       /* Comp. B Output */
226
#define CBOUTPOL               (0x0002)       /* Comp. B Output Polarity */
227
#define CBF                    (0x0004)       /* Comp. B Enable Output Filter */
228
#define CBIES                  (0x0008)       /* Comp. B Interrupt Edge Select */
229
#define CBSHORT                (0x0010)       /* Comp. B Input Short */
230
#define CBEX                   (0x0020)       /* Comp. B Exchange Inputs */
231
#define CBFDLY0                (0x0040)       /* Comp. B Filter delay Bit 0 */
232
#define CBFDLY1                (0x0080)       /* Comp. B Filter delay Bit 1 */
233
#define CBPWRMD0               (0x0100)       /* Comp. B Power Mode Bit 0 */
234
#define CBPWRMD1               (0x0200)       /* Comp. B Power Mode Bit 1 */
235
#define CBON                   (0x0400)       /* Comp. B enable */
236
#define CBMRVL                 (0x0800)       /* Comp. B CBMRV Level */
237
#define CBMRVS                 (0x1000)       /* Comp. B Output selects between VREF0 or VREF1*/
238
//#define RESERVED            (0x2000)  /* Comp. B */
239
//#define RESERVED            (0x4000)  /* Comp. B */
240
//#define RESERVED            (0x8000)  /* Comp. B */
241
 
242
/* CBCTL1 Control Bits */
243
#define CBOUT_L                (0x0001)       /* Comp. B Output */
244
#define CBOUTPOL_L             (0x0002)       /* Comp. B Output Polarity */
245
#define CBF_L                  (0x0004)       /* Comp. B Enable Output Filter */
246
#define CBIES_L                (0x0008)       /* Comp. B Interrupt Edge Select */
247
#define CBSHORT_L              (0x0010)       /* Comp. B Input Short */
248
#define CBEX_L                 (0x0020)       /* Comp. B Exchange Inputs */
249
#define CBFDLY0_L              (0x0040)       /* Comp. B Filter delay Bit 0 */
250
#define CBFDLY1_L              (0x0080)       /* Comp. B Filter delay Bit 1 */
251
//#define RESERVED            (0x2000)  /* Comp. B */
252
//#define RESERVED            (0x4000)  /* Comp. B */
253
//#define RESERVED            (0x8000)  /* Comp. B */
254
 
255
/* CBCTL1 Control Bits */
256
#define CBPWRMD0_H             (0x0001)       /* Comp. B Power Mode Bit 0 */
257
#define CBPWRMD1_H             (0x0002)       /* Comp. B Power Mode Bit 1 */
258
#define CBON_H                 (0x0004)       /* Comp. B enable */
259
#define CBMRVL_H               (0x0008)       /* Comp. B CBMRV Level */
260
#define CBMRVS_H               (0x0010)       /* Comp. B Output selects between VREF0 or VREF1*/
261
//#define RESERVED            (0x2000)  /* Comp. B */
262
//#define RESERVED            (0x4000)  /* Comp. B */
263
//#define RESERVED            (0x8000)  /* Comp. B */
264
 
265
#define CBFDLY_0               (0x0000)       /* Comp. B Filter delay 0 : 450ns */
266
#define CBFDLY_1               (0x0040)       /* Comp. B Filter delay 1 : 900ns */
267
#define CBFDLY_2               (0x0080)       /* Comp. B Filter delay 2 : 1800ns */
268
#define CBFDLY_3               (0x00C0)       /* Comp. B Filter delay 3 : 3600ns */
269
 
270
#define CBPWRMD_0              (0x0000)       /* Comp. B Power Mode 0 : High speed */
271
#define CBPWRMD_1              (0x0100)       /* Comp. B Power Mode 1 : Normal */
272
#define CBPWRMD_2              (0x0200)       /* Comp. B Power Mode 2 : Ultra-Low*/
273
#define CBPWRMD_3              (0x0300)       /* Comp. B Power Mode 3 : Reserved */
274
 
275
/* CBCTL2 Control Bits */
276
#define CBREF00                (0x0001)       /* Comp. B Reference 0 Resistor Select Bit : 0 */
277
#define CBREF01                (0x0002)       /* Comp. B Reference 0 Resistor Select Bit : 1 */
278
#define CBREF02                (0x0004)       /* Comp. B Reference 0 Resistor Select Bit : 2 */
279
#define CBREF03                (0x0008)       /* Comp. B Reference 0 Resistor Select Bit : 3 */
280
#define CBREF04                (0x0010)       /* Comp. B Reference 0 Resistor Select Bit : 4 */
281
#define CBRSEL                 (0x0020)       /* Comp. B Reference select */
282
#define CBRS0                  (0x0040)       /* Comp. B Reference Source Bit : 0 */
283
#define CBRS1                  (0x0080)       /* Comp. B Reference Source Bit : 1 */
284
#define CBREF10                (0x0100)       /* Comp. B Reference 1 Resistor Select Bit : 0 */
285
#define CBREF11                (0x0200)       /* Comp. B Reference 1 Resistor Select Bit : 1 */
286
#define CBREF12                (0x0400)       /* Comp. B Reference 1 Resistor Select Bit : 2 */
287
#define CBREF13                (0x0800)       /* Comp. B Reference 1 Resistor Select Bit : 3 */
288
#define CBREF14                (0x1000)       /* Comp. B Reference 1 Resistor Select Bit : 4 */
289
#define CBREFL0                (0x2000)       /* Comp. B Reference voltage level Bit : 0 */
290
#define CBREFL1                (0x4000)       /* Comp. B Reference voltage level Bit : 1 */
291
#define CBREFACC               (0x8000)       /* Comp. B Reference Accuracy */
292
 
293
/* CBCTL2 Control Bits */
294
#define CBREF00_L              (0x0001)       /* Comp. B Reference 0 Resistor Select Bit : 0 */
295
#define CBREF01_L              (0x0002)       /* Comp. B Reference 0 Resistor Select Bit : 1 */
296
#define CBREF02_L              (0x0004)       /* Comp. B Reference 0 Resistor Select Bit : 2 */
297
#define CBREF03_L              (0x0008)       /* Comp. B Reference 0 Resistor Select Bit : 3 */
298
#define CBREF04_L              (0x0010)       /* Comp. B Reference 0 Resistor Select Bit : 4 */
299
#define CBRSEL_L               (0x0020)       /* Comp. B Reference select */
300
#define CBRS0_L                (0x0040)       /* Comp. B Reference Source Bit : 0 */
301
#define CBRS1_L                (0x0080)       /* Comp. B Reference Source Bit : 1 */
302
 
303
/* CBCTL2 Control Bits */
304
#define CBREF10_H              (0x0001)       /* Comp. B Reference 1 Resistor Select Bit : 0 */
305
#define CBREF11_H              (0x0002)       /* Comp. B Reference 1 Resistor Select Bit : 1 */
306
#define CBREF12_H              (0x0004)       /* Comp. B Reference 1 Resistor Select Bit : 2 */
307
#define CBREF13_H              (0x0008)       /* Comp. B Reference 1 Resistor Select Bit : 3 */
308
#define CBREF14_H              (0x0010)       /* Comp. B Reference 1 Resistor Select Bit : 4 */
309
#define CBREFL0_H              (0x0020)       /* Comp. B Reference voltage level Bit : 0 */
310
#define CBREFL1_H              (0x0040)       /* Comp. B Reference voltage level Bit : 1 */
311
#define CBREFACC_H             (0x0080)       /* Comp. B Reference Accuracy */
312
 
313
#define CBREF0_0               (0x0000)       /* Comp. B Int. Ref.0 Select 0 : 1/32 */
314
#define CBREF0_1               (0x0001)       /* Comp. B Int. Ref.0 Select 1 : 2/32 */
315
#define CBREF0_2               (0x0002)       /* Comp. B Int. Ref.0 Select 2 : 3/32 */
316
#define CBREF0_3               (0x0003)       /* Comp. B Int. Ref.0 Select 3 : 4/32 */
317
#define CBREF0_4               (0x0004)       /* Comp. B Int. Ref.0 Select 4 : 5/32 */
318
#define CBREF0_5               (0x0005)       /* Comp. B Int. Ref.0 Select 5 : 6/32 */
319
#define CBREF0_6               (0x0006)       /* Comp. B Int. Ref.0 Select 6 : 7/32 */
320
#define CBREF0_7               (0x0007)       /* Comp. B Int. Ref.0 Select 7 : 8/32 */
321
#define CBREF0_8               (0x0008)       /* Comp. B Int. Ref.0 Select 0 : 9/32 */
322
#define CBREF0_9               (0x0009)       /* Comp. B Int. Ref.0 Select 1 : 10/32 */
323
#define CBREF0_10              (0x000A)       /* Comp. B Int. Ref.0 Select 2 : 11/32 */
324
#define CBREF0_11              (0x000B)       /* Comp. B Int. Ref.0 Select 3 : 12/32 */
325
#define CBREF0_12              (0x000C)       /* Comp. B Int. Ref.0 Select 4 : 13/32 */
326
#define CBREF0_13              (0x000D)       /* Comp. B Int. Ref.0 Select 5 : 14/32 */
327
#define CBREF0_14              (0x000E)       /* Comp. B Int. Ref.0 Select 6 : 15/32 */
328
#define CBREF0_15              (0x000F)       /* Comp. B Int. Ref.0 Select 7 : 16/32 */
329
#define CBREF0_16              (0x0010)       /* Comp. B Int. Ref.0 Select 0 : 17/32 */
330
#define CBREF0_17              (0x0011)       /* Comp. B Int. Ref.0 Select 1 : 18/32 */
331
#define CBREF0_18              (0x0012)       /* Comp. B Int. Ref.0 Select 2 : 19/32 */
332
#define CBREF0_19              (0x0013)       /* Comp. B Int. Ref.0 Select 3 : 20/32 */
333
#define CBREF0_20              (0x0014)       /* Comp. B Int. Ref.0 Select 4 : 21/32 */
334
#define CBREF0_21              (0x0015)       /* Comp. B Int. Ref.0 Select 5 : 22/32 */
335
#define CBREF0_22              (0x0016)       /* Comp. B Int. Ref.0 Select 6 : 23/32 */
336
#define CBREF0_23              (0x0017)       /* Comp. B Int. Ref.0 Select 7 : 24/32 */
337
#define CBREF0_24              (0x0018)       /* Comp. B Int. Ref.0 Select 0 : 25/32 */
338
#define CBREF0_25              (0x0019)       /* Comp. B Int. Ref.0 Select 1 : 26/32 */
339
#define CBREF0_26              (0x001A)       /* Comp. B Int. Ref.0 Select 2 : 27/32 */
340
#define CBREF0_27              (0x001B)       /* Comp. B Int. Ref.0 Select 3 : 28/32 */
341
#define CBREF0_28              (0x001C)       /* Comp. B Int. Ref.0 Select 4 : 29/32 */
342
#define CBREF0_29              (0x001D)       /* Comp. B Int. Ref.0 Select 5 : 30/32 */
343
#define CBREF0_30              (0x001E)       /* Comp. B Int. Ref.0 Select 6 : 31/32 */
344
#define CBREF0_31              (0x001F)       /* Comp. B Int. Ref.0 Select 7 : 32/32 */
345
 
346
#define CBRS_0                 (0x0000)       /* Comp. B Reference Source 0 : Off */
347
#define CBRS_1                 (0x0040)       /* Comp. B Reference Source 1 : Vcc */
348
#define CBRS_2                 (0x0080)       /* Comp. B Reference Source 2 : Shared Ref. */
349
#define CBRS_3                 (0x00C0)       /* Comp. B Reference Source 3 : Shared Ref. / Off */
350
 
351
#define CBREF1_0               (0x0000)       /* Comp. B Int. Ref.1 Select 0 : 1/32 */
352
#define CBREF1_1               (0x0100)       /* Comp. B Int. Ref.1 Select 1 : 2/32 */
353
#define CBREF1_2               (0x0200)       /* Comp. B Int. Ref.1 Select 2 : 3/32 */
354
#define CBREF1_3               (0x0300)       /* Comp. B Int. Ref.1 Select 3 : 4/32 */
355
#define CBREF1_4               (0x0400)       /* Comp. B Int. Ref.1 Select 4 : 5/32 */
356
#define CBREF1_5               (0x0500)       /* Comp. B Int. Ref.1 Select 5 : 6/32 */
357
#define CBREF1_6               (0x0600)       /* Comp. B Int. Ref.1 Select 6 : 7/32 */
358
#define CBREF1_7               (0x0700)       /* Comp. B Int. Ref.1 Select 7 : 8/32 */
359
#define CBREF1_8               (0x0800)       /* Comp. B Int. Ref.1 Select 0 : 9/32 */
360
#define CBREF1_9               (0x0900)       /* Comp. B Int. Ref.1 Select 1 : 10/32 */
361
#define CBREF1_10              (0x0A00)       /* Comp. B Int. Ref.1 Select 2 : 11/32 */
362
#define CBREF1_11              (0x0B00)       /* Comp. B Int. Ref.1 Select 3 : 12/32 */
363
#define CBREF1_12              (0x0C00)       /* Comp. B Int. Ref.1 Select 4 : 13/32 */
364
#define CBREF1_13              (0x0D00)       /* Comp. B Int. Ref.1 Select 5 : 14/32 */
365
#define CBREF1_14              (0x0E00)       /* Comp. B Int. Ref.1 Select 6 : 15/32 */
366
#define CBREF1_15              (0x0F00)       /* Comp. B Int. Ref.1 Select 7 : 16/32 */
367
#define CBREF1_16              (0x1000)       /* Comp. B Int. Ref.1 Select 0 : 17/32 */
368
#define CBREF1_17              (0x1100)       /* Comp. B Int. Ref.1 Select 1 : 18/32 */
369
#define CBREF1_18              (0x1200)       /* Comp. B Int. Ref.1 Select 2 : 19/32 */
370
#define CBREF1_19              (0x1300)       /* Comp. B Int. Ref.1 Select 3 : 20/32 */
371
#define CBREF1_20              (0x1400)       /* Comp. B Int. Ref.1 Select 4 : 21/32 */
372
#define CBREF1_21              (0x1500)       /* Comp. B Int. Ref.1 Select 5 : 22/32 */
373
#define CBREF1_22              (0x1600)       /* Comp. B Int. Ref.1 Select 6 : 23/32 */
374
#define CBREF1_23              (0x1700)       /* Comp. B Int. Ref.1 Select 7 : 24/32 */
375
#define CBREF1_24              (0x1800)       /* Comp. B Int. Ref.1 Select 0 : 25/32 */
376
#define CBREF1_25              (0x1900)       /* Comp. B Int. Ref.1 Select 1 : 26/32 */
377
#define CBREF1_26              (0x1A00)       /* Comp. B Int. Ref.1 Select 2 : 27/32 */
378
#define CBREF1_27              (0x1B00)       /* Comp. B Int. Ref.1 Select 3 : 28/32 */
379
#define CBREF1_28              (0x1C00)       /* Comp. B Int. Ref.1 Select 4 : 29/32 */
380
#define CBREF1_29              (0x1D00)       /* Comp. B Int. Ref.1 Select 5 : 30/32 */
381
#define CBREF1_30              (0x1E00)       /* Comp. B Int. Ref.1 Select 6 : 31/32 */
382
#define CBREF1_31              (0x1F00)       /* Comp. B Int. Ref.1 Select 7 : 32/32 */
383
 
384
#define CBREFL_0               (0x0000)       /* Comp. B Reference voltage level 0 : None */
385
#define CBREFL_1               (0x2000)       /* Comp. B Reference voltage level 1 : 1.5V */
386
#define CBREFL_2               (0x4000)       /* Comp. B Reference voltage level 2 : 2.0V  */
387
#define CBREFL_3               (0x6000)       /* Comp. B Reference voltage level 3 : 2.5V  */
388
 
389
#define CBPD0                  (0x0001)       /* Comp. B Disable Input Buffer of Port Register .0 */
390
#define CBPD1                  (0x0002)       /* Comp. B Disable Input Buffer of Port Register .1 */
391
#define CBPD2                  (0x0004)       /* Comp. B Disable Input Buffer of Port Register .2 */
392
#define CBPD3                  (0x0008)       /* Comp. B Disable Input Buffer of Port Register .3 */
393
#define CBPD4                  (0x0010)       /* Comp. B Disable Input Buffer of Port Register .4 */
394
#define CBPD5                  (0x0020)       /* Comp. B Disable Input Buffer of Port Register .5 */
395
#define CBPD6                  (0x0040)       /* Comp. B Disable Input Buffer of Port Register .6 */
396
#define CBPD7                  (0x0080)       /* Comp. B Disable Input Buffer of Port Register .7 */
397
#define CBPD8                  (0x0100)       /* Comp. B Disable Input Buffer of Port Register .8 */
398
#define CBPD9                  (0x0200)       /* Comp. B Disable Input Buffer of Port Register .9 */
399
#define CBPD10                 (0x0400)       /* Comp. B Disable Input Buffer of Port Register .10 */
400
#define CBPD11                 (0x0800)       /* Comp. B Disable Input Buffer of Port Register .11 */
401
#define CBPD12                 (0x1000)       /* Comp. B Disable Input Buffer of Port Register .12 */
402
#define CBPD13                 (0x2000)       /* Comp. B Disable Input Buffer of Port Register .13 */
403
#define CBPD14                 (0x4000)       /* Comp. B Disable Input Buffer of Port Register .14 */
404
#define CBPD15                 (0x8000)       /* Comp. B Disable Input Buffer of Port Register .15 */
405
 
406
#define CBPD0_L                (0x0001)       /* Comp. B Disable Input Buffer of Port Register .0 */
407
#define CBPD1_L                (0x0002)       /* Comp. B Disable Input Buffer of Port Register .1 */
408
#define CBPD2_L                (0x0004)       /* Comp. B Disable Input Buffer of Port Register .2 */
409
#define CBPD3_L                (0x0008)       /* Comp. B Disable Input Buffer of Port Register .3 */
410
#define CBPD4_L                (0x0010)       /* Comp. B Disable Input Buffer of Port Register .4 */
411
#define CBPD5_L                (0x0020)       /* Comp. B Disable Input Buffer of Port Register .5 */
412
#define CBPD6_L                (0x0040)       /* Comp. B Disable Input Buffer of Port Register .6 */
413
#define CBPD7_L                (0x0080)       /* Comp. B Disable Input Buffer of Port Register .7 */
414
 
415
#define CBPD8_H                (0x0001)       /* Comp. B Disable Input Buffer of Port Register .8 */
416
#define CBPD9_H                (0x0002)       /* Comp. B Disable Input Buffer of Port Register .9 */
417
#define CBPD10_H               (0x0004)       /* Comp. B Disable Input Buffer of Port Register .10 */
418
#define CBPD11_H               (0x0008)       /* Comp. B Disable Input Buffer of Port Register .11 */
419
#define CBPD12_H               (0x0010)       /* Comp. B Disable Input Buffer of Port Register .12 */
420
#define CBPD13_H               (0x0020)       /* Comp. B Disable Input Buffer of Port Register .13 */
421
#define CBPD14_H               (0x0040)       /* Comp. B Disable Input Buffer of Port Register .14 */
422
#define CBPD15_H               (0x0080)       /* Comp. B Disable Input Buffer of Port Register .15 */
423
 
424
/* CBINT Control Bits */
425
#define CBIFG                  (0x0001)       /* Comp. B Interrupt Flag */
426
#define CBIIFG                 (0x0002)       /* Comp. B Interrupt Flag Inverted Polarity */
427
//#define RESERVED             (0x0004)  /* Comp. B */
428
//#define RESERVED             (0x0008)  /* Comp. B */
429
//#define RESERVED             (0x0010)  /* Comp. B */
430
//#define RESERVED             (0x0020)  /* Comp. B */
431
//#define RESERVED             (0x0040)  /* Comp. B */
432
//#define RESERVED             (0x0080)  /* Comp. B */
433
#define CBIE                   (0x0100)       /* Comp. B Interrupt Enable */
434
#define CBIIE                  (0x0200)       /* Comp. B Interrupt Enable Inverted Polarity */
435
//#define RESERVED             (0x0400)  /* Comp. B */
436
//#define RESERVED             (0x0800)  /* Comp. B */
437
//#define RESERVED             (0x1000)  /* Comp. B */
438
//#define RESERVED             (0x2000)  /* Comp. B */
439
//#define RESERVED             (0x4000)  /* Comp. B */
440
//#define RESERVED             (0x8000)  /* Comp. B */
441
 
442
/* CBINT Control Bits */
443
#define CBIFG_L                (0x0001)       /* Comp. B Interrupt Flag */
444
#define CBIIFG_L               (0x0002)       /* Comp. B Interrupt Flag Inverted Polarity */
445
//#define RESERVED             (0x0004)  /* Comp. B */
446
//#define RESERVED             (0x0008)  /* Comp. B */
447
//#define RESERVED             (0x0010)  /* Comp. B */
448
//#define RESERVED             (0x0020)  /* Comp. B */
449
//#define RESERVED             (0x0040)  /* Comp. B */
450
//#define RESERVED             (0x0080)  /* Comp. B */
451
//#define RESERVED             (0x0400)  /* Comp. B */
452
//#define RESERVED             (0x0800)  /* Comp. B */
453
//#define RESERVED             (0x1000)  /* Comp. B */
454
//#define RESERVED             (0x2000)  /* Comp. B */
455
//#define RESERVED             (0x4000)  /* Comp. B */
456
//#define RESERVED             (0x8000)  /* Comp. B */
457
 
458
/* CBINT Control Bits */
459
//#define RESERVED             (0x0004)  /* Comp. B */
460
//#define RESERVED             (0x0008)  /* Comp. B */
461
//#define RESERVED             (0x0010)  /* Comp. B */
462
//#define RESERVED             (0x0020)  /* Comp. B */
463
//#define RESERVED             (0x0040)  /* Comp. B */
464
//#define RESERVED             (0x0080)  /* Comp. B */
465
#define CBIE_H                 (0x0001)       /* Comp. B Interrupt Enable */
466
#define CBIIE_H                (0x0002)       /* Comp. B Interrupt Enable Inverted Polarity */
467
//#define RESERVED             (0x0400)  /* Comp. B */
468
//#define RESERVED             (0x0800)  /* Comp. B */
469
//#define RESERVED             (0x1000)  /* Comp. B */
470
//#define RESERVED             (0x2000)  /* Comp. B */
471
//#define RESERVED             (0x4000)  /* Comp. B */
472
//#define RESERVED             (0x8000)  /* Comp. B */
473
 
474
/* CBIV Definitions */
475
#define CBIV_NONE              (0x0000)       /* No Interrupt pending */
476
#define CBIV_CBIFG             (0x0002)       /* CBIFG */
477
#define CBIV_CBIIFG            (0x0004)       /* CBIIFG */
478
 
479
/*************************************************************
480
* CRC Module
481
*************************************************************/
482
#define __MSP430_HAS_CRC__                    /* Definition to show that Module is available */
483
#define __MSP430_BASEADDRESS_CRC__ 0x0150
484
 
485
SFR_16BIT(CRCDI);                             /* CRC Data In Register */
486
SFR_8BIT(CRCDI_L);                            /* CRC Data In Register */
487
SFR_8BIT(CRCDI_H);                            /* CRC Data In Register */
488
SFR_16BIT(CRCDIRB);                           /* CRC data in reverse byte Register */
489
SFR_8BIT(CRCDIRB_L);                          /* CRC data in reverse byte Register */
490
SFR_8BIT(CRCDIRB_H);                          /* CRC data in reverse byte Register */
491
SFR_16BIT(CRCINIRES);                         /* CRC Initialisation Register and Result Register */
492
SFR_8BIT(CRCINIRES_L);                        /* CRC Initialisation Register and Result Register */
493
SFR_8BIT(CRCINIRES_H);                        /* CRC Initialisation Register and Result Register */
494
SFR_16BIT(CRCRESR);                           /* CRC reverse result Register */
495
SFR_8BIT(CRCRESR_L);                          /* CRC reverse result Register */
496
SFR_8BIT(CRCRESR_H);                          /* CRC reverse result Register */
497
 
498
/************************************************************
499
* DMA_X
500
************************************************************/
501
#define __MSP430_HAS_DMAX_3__                 /* Definition to show that Module is available */
502
#define __MSP430_BASEADDRESS_DMAX_3__ 0x0500
503
 
504
SFR_16BIT(DMACTL0);                           /* DMA Module Control 0 */
505
SFR_8BIT(DMACTL0_L);                          /* DMA Module Control 0 */
506
SFR_8BIT(DMACTL0_H);                          /* DMA Module Control 0 */
507
SFR_16BIT(DMACTL1);                           /* DMA Module Control 1 */
508
SFR_8BIT(DMACTL1_L);                          /* DMA Module Control 1 */
509
SFR_8BIT(DMACTL1_H);                          /* DMA Module Control 1 */
510
SFR_16BIT(DMACTL2);                           /* DMA Module Control 2 */
511
SFR_8BIT(DMACTL2_L);                          /* DMA Module Control 2 */
512
SFR_8BIT(DMACTL2_H);                          /* DMA Module Control 2 */
513
SFR_16BIT(DMACTL3);                           /* DMA Module Control 3 */
514
SFR_8BIT(DMACTL3_L);                          /* DMA Module Control 3 */
515
SFR_8BIT(DMACTL3_H);                          /* DMA Module Control 3 */
516
SFR_16BIT(DMACTL4);                           /* DMA Module Control 4 */
517
SFR_8BIT(DMACTL4_L);                          /* DMA Module Control 4 */
518
SFR_8BIT(DMACTL4_H);                          /* DMA Module Control 4 */
519
SFR_16BIT(DMAIV);                             /* DMA Interrupt Vector Word */
520
SFR_8BIT(DMAIV_L);                            /* DMA Interrupt Vector Word */
521
SFR_8BIT(DMAIV_H);                            /* DMA Interrupt Vector Word */
522
 
523
SFR_16BIT(DMA0CTL);                           /* DMA Channel 0 Control */
524
SFR_8BIT(DMA0CTL_L);                          /* DMA Channel 0 Control */
525
SFR_8BIT(DMA0CTL_H);                          /* DMA Channel 0 Control */
526
SFR_20BIT(DMA0SA);                            /* DMA Channel 0 Source Address */
527
SFR_16BIT(DMA0SAL);                           /* DMA Channel 0 Source Address */
528
SFR_20BIT(DMA0DA);                            /* DMA Channel 0 Destination Address */
529
SFR_16BIT(DMA0DAL);                           /* DMA Channel 0 Destination Address */
530
SFR_16BIT(DMA0SZ);                            /* DMA Channel 0 Transfer Size */
531
 
532
SFR_16BIT(DMA1CTL);                           /* DMA Channel 1 Control */
533
SFR_8BIT(DMA1CTL_L);                          /* DMA Channel 1 Control */
534
SFR_8BIT(DMA1CTL_H);                          /* DMA Channel 1 Control */
535
SFR_20BIT(DMA1SA);                            /* DMA Channel 1 Source Address */
536
SFR_16BIT(DMA1SAL);                           /* DMA Channel 1 Source Address */
537
SFR_20BIT(DMA1DA);                            /* DMA Channel 1 Destination Address */
538
SFR_16BIT(DMA1DAL);                           /* DMA Channel 1 Destination Address */
539
SFR_16BIT(DMA1SZ);                            /* DMA Channel 1 Transfer Size */
540
 
541
SFR_16BIT(DMA2CTL);                           /* DMA Channel 2 Control */
542
SFR_8BIT(DMA2CTL_L);                          /* DMA Channel 2 Control */
543
SFR_8BIT(DMA2CTL_H);                          /* DMA Channel 2 Control */
544
SFR_20BIT(DMA2SA);                            /* DMA Channel 2 Source Address */
545
SFR_16BIT(DMA2SAL);                           /* DMA Channel 2 Source Address */
546
SFR_20BIT(DMA2DA);                            /* DMA Channel 2 Destination Address */
547
SFR_16BIT(DMA2DAL);                           /* DMA Channel 2 Destination Address */
548
SFR_16BIT(DMA2SZ);                            /* DMA Channel 2 Transfer Size */
549
 
550
/* DMACTL0 Control Bits */
551
#define DMA0TSEL0              (0x0001)       /* DMA channel 0 transfer select bit 0 */
552
#define DMA0TSEL1              (0x0002)       /* DMA channel 0 transfer select bit 1 */
553
#define DMA0TSEL2              (0x0004)       /* DMA channel 0 transfer select bit 2 */
554
#define DMA0TSEL3              (0x0008)       /* DMA channel 0 transfer select bit 3 */
555
#define DMA0TSEL4              (0x0010)       /* DMA channel 0 transfer select bit 4 */
556
#define DMA1TSEL0              (0x0100)       /* DMA channel 1 transfer select bit 0 */
557
#define DMA1TSEL1              (0x0200)       /* DMA channel 1 transfer select bit 1 */
558
#define DMA1TSEL2              (0x0400)       /* DMA channel 1 transfer select bit 2 */
559
#define DMA1TSEL3              (0x0800)       /* DMA channel 1 transfer select bit 3 */
560
#define DMA1TSEL4              (0x1000)       /* DMA channel 1 transfer select bit 4 */
561
 
562
/* DMACTL0 Control Bits */
563
#define DMA0TSEL0_L            (0x0001)       /* DMA channel 0 transfer select bit 0 */
564
#define DMA0TSEL1_L            (0x0002)       /* DMA channel 0 transfer select bit 1 */
565
#define DMA0TSEL2_L            (0x0004)       /* DMA channel 0 transfer select bit 2 */
566
#define DMA0TSEL3_L            (0x0008)       /* DMA channel 0 transfer select bit 3 */
567
#define DMA0TSEL4_L            (0x0010)       /* DMA channel 0 transfer select bit 4 */
568
 
569
/* DMACTL0 Control Bits */
570
#define DMA1TSEL0_H            (0x0001)       /* DMA channel 1 transfer select bit 0 */
571
#define DMA1TSEL1_H            (0x0002)       /* DMA channel 1 transfer select bit 1 */
572
#define DMA1TSEL2_H            (0x0004)       /* DMA channel 1 transfer select bit 2 */
573
#define DMA1TSEL3_H            (0x0008)       /* DMA channel 1 transfer select bit 3 */
574
#define DMA1TSEL4_H            (0x0010)       /* DMA channel 1 transfer select bit 4 */
575
 
576
/* DMACTL01 Control Bits */
577
#define DMA2TSEL0              (0x0001)       /* DMA channel 2 transfer select bit 0 */
578
#define DMA2TSEL1              (0x0002)       /* DMA channel 2 transfer select bit 1 */
579
#define DMA2TSEL2              (0x0004)       /* DMA channel 2 transfer select bit 2 */
580
#define DMA2TSEL3              (0x0008)       /* DMA channel 2 transfer select bit 3 */
581
#define DMA2TSEL4              (0x0010)       /* DMA channel 2 transfer select bit 4 */
582
 
583
/* DMACTL01 Control Bits */
584
#define DMA2TSEL0_L            (0x0001)       /* DMA channel 2 transfer select bit 0 */
585
#define DMA2TSEL1_L            (0x0002)       /* DMA channel 2 transfer select bit 1 */
586
#define DMA2TSEL2_L            (0x0004)       /* DMA channel 2 transfer select bit 2 */
587
#define DMA2TSEL3_L            (0x0008)       /* DMA channel 2 transfer select bit 3 */
588
#define DMA2TSEL4_L            (0x0010)       /* DMA channel 2 transfer select bit 4 */
589
 
590
/* DMACTL01 Control Bits */
591
 
592
/* DMACTL4 Control Bits */
593
#define ENNMI                  (0x0001)       /* Enable NMI interruption of DMA */
594
#define ROUNDROBIN             (0x0002)       /* Round-Robin DMA channel priorities */
595
#define DMARMWDIS              (0x0004)       /* Inhibited DMA transfers during read-modify-write CPU operations */
596
 
597
/* DMACTL4 Control Bits */
598
#define ENNMI_L                (0x0001)       /* Enable NMI interruption of DMA */
599
#define ROUNDROBIN_L           (0x0002)       /* Round-Robin DMA channel priorities */
600
#define DMARMWDIS_L            (0x0004)       /* Inhibited DMA transfers during read-modify-write CPU operations */
601
 
602
/* DMACTL4 Control Bits */
603
 
604
/* DMAxCTL Control Bits */
605
#define DMAREQ                 (0x0001)       /* Initiate DMA transfer with DMATSEL */
606
#define DMAABORT               (0x0002)       /* DMA transfer aborted by NMI */
607
#define DMAIE                  (0x0004)       /* DMA interrupt enable */
608
#define DMAIFG                 (0x0008)       /* DMA interrupt flag */
609
#define DMAEN                  (0x0010)       /* DMA enable */
610
#define DMALEVEL               (0x0020)       /* DMA level sensitive trigger select */
611
#define DMASRCBYTE             (0x0040)       /* DMA source byte */
612
#define DMADSTBYTE             (0x0080)       /* DMA destination byte */
613
#define DMASRCINCR0            (0x0100)       /* DMA source increment bit 0 */
614
#define DMASRCINCR1            (0x0200)       /* DMA source increment bit 1 */
615
#define DMADSTINCR0            (0x0400)       /* DMA destination increment bit 0 */
616
#define DMADSTINCR1            (0x0800)       /* DMA destination increment bit 1 */
617
#define DMADT0                 (0x1000)       /* DMA transfer mode bit 0 */
618
#define DMADT1                 (0x2000)       /* DMA transfer mode bit 1 */
619
#define DMADT2                 (0x4000)       /* DMA transfer mode bit 2 */
620
 
621
/* DMAxCTL Control Bits */
622
#define DMAREQ_L               (0x0001)       /* Initiate DMA transfer with DMATSEL */
623
#define DMAABORT_L             (0x0002)       /* DMA transfer aborted by NMI */
624
#define DMAIE_L                (0x0004)       /* DMA interrupt enable */
625
#define DMAIFG_L               (0x0008)       /* DMA interrupt flag */
626
#define DMAEN_L                (0x0010)       /* DMA enable */
627
#define DMALEVEL_L             (0x0020)       /* DMA level sensitive trigger select */
628
#define DMASRCBYTE_L           (0x0040)       /* DMA source byte */
629
#define DMADSTBYTE_L           (0x0080)       /* DMA destination byte */
630
 
631
/* DMAxCTL Control Bits */
632
#define DMASRCINCR0_H          (0x0001)       /* DMA source increment bit 0 */
633
#define DMASRCINCR1_H          (0x0002)       /* DMA source increment bit 1 */
634
#define DMADSTINCR0_H          (0x0004)       /* DMA destination increment bit 0 */
635
#define DMADSTINCR1_H          (0x0008)       /* DMA destination increment bit 1 */
636
#define DMADT0_H               (0x0010)       /* DMA transfer mode bit 0 */
637
#define DMADT1_H               (0x0020)       /* DMA transfer mode bit 1 */
638
#define DMADT2_H               (0x0040)       /* DMA transfer mode bit 2 */
639
 
640
#define DMASWDW                (0*0x0040u)    /* DMA transfer: source word to destination word */
641
#define DMASBDW                (1*0x0040u)    /* DMA transfer: source byte to destination word */
642
#define DMASWDB                (2*0x0040u)    /* DMA transfer: source word to destination byte */
643
#define DMASBDB                (3*0x0040u)    /* DMA transfer: source byte to destination byte */
644
 
645
#define DMASRCINCR_0           (0*0x0100u)    /* DMA source increment 0: source address unchanged */
646
#define DMASRCINCR_1           (1*0x0100u)    /* DMA source increment 1: source address unchanged */
647
#define DMASRCINCR_2           (2*0x0100u)    /* DMA source increment 2: source address decremented */
648
#define DMASRCINCR_3           (3*0x0100u)    /* DMA source increment 3: source address incremented */
649
 
650
#define DMADSTINCR_0           (0*0x0400u)    /* DMA destination increment 0: destination address unchanged */
651
#define DMADSTINCR_1           (1*0x0400u)    /* DMA destination increment 1: destination address unchanged */
652
#define DMADSTINCR_2           (2*0x0400u)    /* DMA destination increment 2: destination address decremented */
653
#define DMADSTINCR_3           (3*0x0400u)    /* DMA destination increment 3: destination address incremented */
654
 
655
#define DMADT_0                (0*0x1000u)    /* DMA transfer mode 0: Single transfer */
656
#define DMADT_1                (1*0x1000u)    /* DMA transfer mode 1: Block transfer */
657
#define DMADT_2                (2*0x1000u)    /* DMA transfer mode 2: Burst-Block transfer */
658
#define DMADT_3                (3*0x1000u)    /* DMA transfer mode 3: Burst-Block transfer */
659
#define DMADT_4                (4*0x1000u)    /* DMA transfer mode 4: Repeated Single transfer */
660
#define DMADT_5                (5*0x1000u)    /* DMA transfer mode 5: Repeated Block transfer */
661
#define DMADT_6                (6*0x1000u)    /* DMA transfer mode 6: Repeated Burst-Block transfer */
662
#define DMADT_7                (7*0x1000u)    /* DMA transfer mode 7: Repeated Burst-Block transfer */
663
 
664
/* DMAIV Definitions */
665
#define DMAIV_NONE             (0x0000)       /* No Interrupt pending */
666
#define DMAIV_DMA0IFG          (0x0002)       /* DMA0IFG*/
667
#define DMAIV_DMA1IFG          (0x0004)       /* DMA1IFG*/
668
#define DMAIV_DMA2IFG          (0x0006)       /* DMA2IFG*/
669
 
670
#define DMA0TSEL_0             (0*0x0001u)    /* DMA channel 0 transfer select 0:  DMA_REQ (sw) */
671
#define DMA0TSEL_1             (1*0x0001u)    /* DMA channel 0 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
672
#define DMA0TSEL_2             (2*0x0001u)    /* DMA channel 0 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
673
#define DMA0TSEL_3             (3*0x0001u)    /* DMA channel 0 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
674
#define DMA0TSEL_4             (4*0x0001u)    /* DMA channel 0 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
675
#define DMA0TSEL_5             (5*0x0001u)    /* DMA channel 0 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
676
#define DMA0TSEL_6             (6*0x0001u)    /* DMA channel 0 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
677
#define DMA0TSEL_7             (7*0x0001u)    /* DMA channel 0 transfer select 7:  TimerB (TB0CCR0.IFG) */
678
#define DMA0TSEL_8             (8*0x0001u)    /* DMA channel 0 transfer select 8:  TimerB (TB0CCR2.IFG) */
679
#define DMA0TSEL_9             (9*0x0001u)    /* DMA channel 0 transfer select 9:  Reserved */
680
#define DMA0TSEL_10            (10*0x0001u)   /* DMA channel 0 transfer select 10: Reserved */
681
#define DMA0TSEL_11            (11*0x0001u)   /* DMA channel 0 transfer select 11: Reserved */
682
#define DMA0TSEL_12            (12*0x0001u)   /* DMA channel 0 transfer select 12: Reserved */
683
#define DMA0TSEL_13            (13*0x0001u)   /* DMA channel 0 transfer select 13: Reserved */
684
#define DMA0TSEL_14            (14*0x0001u)   /* DMA channel 0 transfer select 14: Reserved */
685
#define DMA0TSEL_15            (15*0x0001u)   /* DMA channel 0 transfer select 15: Reserved */
686
#define DMA0TSEL_16            (16*0x0001u)   /* DMA channel 0 transfer select 16: USCIA0 receive */
687
#define DMA0TSEL_17            (17*0x0001u)   /* DMA channel 0 transfer select 17: USCIA0 transmit */
688
#define DMA0TSEL_18            (18*0x0001u)   /* DMA channel 0 transfer select 18: USCIB0 receive */
689
#define DMA0TSEL_19            (19*0x0001u)   /* DMA channel 0 transfer select 19: USCIB0 transmit */
690
#define DMA0TSEL_20            (20*0x0001u)   /* DMA channel 0 transfer select 20: USCIA1 receive */
691
#define DMA0TSEL_21            (21*0x0001u)   /* DMA channel 0 transfer select 21: USCIA1 transmit */
692
#define DMA0TSEL_22            (22*0x0001u)   /* DMA channel 0 transfer select 22: USCIB1 receive */
693
#define DMA0TSEL_23            (23*0x0001u)   /* DMA channel 0 transfer select 23: USCIB1 transmit */
694
#define DMA0TSEL_24            (24*0x0001u)   /* DMA channel 0 transfer select 24: ADC12IFGx */
695
#define DMA0TSEL_25            (25*0x0001u)   /* DMA channel 0 transfer select 25: Reserved */
696
#define DMA0TSEL_26            (26*0x0001u)   /* DMA channel 0 transfer select 26: Reserved */
697
#define DMA0TSEL_27            (27*0x0001u)   /* DMA channel 0 transfer select 27: USB FNRXD */
698
#define DMA0TSEL_28            (28*0x0001u)   /* DMA channel 0 transfer select 28: USB ready */
699
#define DMA0TSEL_29            (29*0x0001u)   /* DMA channel 0 transfer select 29: Multiplier ready */
700
#define DMA0TSEL_30            (30*0x0001u)   /* DMA channel 0 transfer select 30: previous DMA channel DMA2IFG */
701
#define DMA0TSEL_31            (31*0x0001u)   /* DMA channel 0 transfer select 31: ext. Trigger (DMAE0) */
702
 
703
#define DMA1TSEL_0             (0*0x0100u)    /* DMA channel 1 transfer select 0:  DMA_REQ (sw) */
704
#define DMA1TSEL_1             (1*0x0100u)    /* DMA channel 1 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
705
#define DMA1TSEL_2             (2*0x0100u)    /* DMA channel 1 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
706
#define DMA1TSEL_3             (3*0x0100u)    /* DMA channel 1 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
707
#define DMA1TSEL_4             (4*0x0100u)    /* DMA channel 1 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
708
#define DMA1TSEL_5             (5*0x0100u)    /* DMA channel 1 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
709
#define DMA1TSEL_6             (6*0x0100u)    /* DMA channel 1 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
710
#define DMA1TSEL_7             (7*0x0100u)    /* DMA channel 1 transfer select 7:  TimerB (TB0CCR0.IFG) */
711
#define DMA1TSEL_8             (8*0x0100u)    /* DMA channel 1 transfer select 8:  TimerB (TB0CCR2.IFG) */
712
#define DMA1TSEL_9             (9*0x0100u)    /* DMA channel 1 transfer select 9:  Reserved */
713
#define DMA1TSEL_10            (10*0x0100u)   /* DMA channel 1 transfer select 10: Reserved */
714
#define DMA1TSEL_11            (11*0x0100u)   /* DMA channel 1 transfer select 11: Reserved */
715
#define DMA1TSEL_12            (12*0x0100u)   /* DMA channel 1 transfer select 12: Reserved */
716
#define DMA1TSEL_13            (13*0x0100u)   /* DMA channel 1 transfer select 13: Reserved */
717
#define DMA1TSEL_14            (14*0x0100u)   /* DMA channel 1 transfer select 14: Reserved */
718
#define DMA1TSEL_15            (15*0x0100u)   /* DMA channel 1 transfer select 15: Reserved */
719
#define DMA1TSEL_16            (16*0x0100u)   /* DMA channel 1 transfer select 16: USCIA0 receive */
720
#define DMA1TSEL_17            (17*0x0100u)   /* DMA channel 1 transfer select 17: USCIA0 transmit */
721
#define DMA1TSEL_18            (18*0x0100u)   /* DMA channel 1 transfer select 18: USCIB0 receive */
722
#define DMA1TSEL_19            (19*0x0100u)   /* DMA channel 1 transfer select 19: USCIB0 transmit */
723
#define DMA1TSEL_20            (20*0x0100u)   /* DMA channel 1 transfer select 20: USCIA1 receive */
724
#define DMA1TSEL_21            (21*0x0100u)   /* DMA channel 1 transfer select 21: USCIA1 transmit */
725
#define DMA1TSEL_22            (22*0x0100u)   /* DMA channel 1 transfer select 22: USCIB1 receive */
726
#define DMA1TSEL_23            (23*0x0100u)   /* DMA channel 1 transfer select 23: USCIB1 transmit */
727
#define DMA1TSEL_24            (24*0x0100u)   /* DMA channel 1 transfer select 24: ADC12IFGx */
728
#define DMA1TSEL_25            (25*0x0100u)   /* DMA channel 1 transfer select 25: Reserved */
729
#define DMA1TSEL_26            (26*0x0100u)   /* DMA channel 1 transfer select 26: Reserved */
730
#define DMA1TSEL_27            (27*0x0100u)   /* DMA channel 1 transfer select 27: USB FNRXD */
731
#define DMA1TSEL_28            (28*0x0100u)   /* DMA channel 1 transfer select 28: USB ready */
732
#define DMA1TSEL_29            (29*0x0100u)   /* DMA channel 1 transfer select 29: Multiplier ready */
733
#define DMA1TSEL_30            (30*0x0100u)   /* DMA channel 1 transfer select 30: previous DMA channel DMA0IFG */
734
#define DMA1TSEL_31            (31*0x0100u)   /* DMA channel 1 transfer select 31: ext. Trigger (DMAE0) */
735
 
736
#define DMA2TSEL_0             (0*0x0001u)    /* DMA channel 2 transfer select 0:  DMA_REQ (sw) */
737
#define DMA2TSEL_1             (1*0x0001u)    /* DMA channel 2 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
738
#define DMA2TSEL_2             (2*0x0001u)    /* DMA channel 2 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
739
#define DMA2TSEL_3             (3*0x0001u)    /* DMA channel 2 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
740
#define DMA2TSEL_4             (4*0x0001u)    /* DMA channel 2 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
741
#define DMA2TSEL_5             (5*0x0001u)    /* DMA channel 2 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
742
#define DMA2TSEL_6             (6*0x0001u)    /* DMA channel 2 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
743
#define DMA2TSEL_7             (7*0x0001u)    /* DMA channel 2 transfer select 7:  TimerB (TB0CCR0.IFG) */
744
#define DMA2TSEL_8             (8*0x0001u)    /* DMA channel 2 transfer select 8:  TimerB (TB0CCR2.IFG) */
745
#define DMA2TSEL_9             (9*0x0001u)    /* DMA channel 2 transfer select 9:  Reserved */
746
#define DMA2TSEL_10            (10*0x0001u)   /* DMA channel 2 transfer select 10: Reserved */
747
#define DMA2TSEL_11            (11*0x0001u)   /* DMA channel 2 transfer select 11: Reserved */
748
#define DMA2TSEL_12            (12*0x0001u)   /* DMA channel 2 transfer select 12: Reserved */
749
#define DMA2TSEL_13            (13*0x0001u)   /* DMA channel 2 transfer select 13: Reserved */
750
#define DMA2TSEL_14            (14*0x0001u)   /* DMA channel 2 transfer select 14: Reserved */
751
#define DMA2TSEL_15            (15*0x0001u)   /* DMA channel 2 transfer select 15: Reserved */
752
#define DMA2TSEL_16            (16*0x0001u)   /* DMA channel 2 transfer select 16: USCIA0 receive */
753
#define DMA2TSEL_17            (17*0x0001u)   /* DMA channel 2 transfer select 17: USCIA0 transmit */
754
#define DMA2TSEL_18            (18*0x0001u)   /* DMA channel 2 transfer select 18: USCIB0 receive */
755
#define DMA2TSEL_19            (19*0x0001u)   /* DMA channel 2 transfer select 19: USCIB0 transmit */
756
#define DMA2TSEL_20            (20*0x0001u)   /* DMA channel 2 transfer select 20: USCIA1 receive */
757
#define DMA2TSEL_21            (21*0x0001u)   /* DMA channel 2 transfer select 21: USCIA1 transmit */
758
#define DMA2TSEL_22            (22*0x0001u)   /* DMA channel 2 transfer select 22: USCIB1 receive */
759
#define DMA2TSEL_23            (23*0x0001u)   /* DMA channel 2 transfer select 23: USCIB1 transmit */
760
#define DMA2TSEL_24            (24*0x0001u)   /* DMA channel 2 transfer select 24: ADC12IFGx */
761
#define DMA2TSEL_25            (25*0x0001u)   /* DMA channel 2 transfer select 25: Reserved */
762
#define DMA2TSEL_26            (26*0x0001u)   /* DMA channel 2 transfer select 26: Reserved */
763
#define DMA2TSEL_27            (27*0x0001u)   /* DMA channel 2 transfer select 27: USB FNRXD */
764
#define DMA2TSEL_28            (28*0x0001u)   /* DMA channel 2 transfer select 28: USB ready */
765
#define DMA2TSEL_29            (29*0x0001u)   /* DMA channel 2 transfer select 29: Multiplier ready */
766
#define DMA2TSEL_30            (30*0x0001u)   /* DMA channel 2 transfer select 30: previous DMA channel DMA1IFG */
767
#define DMA2TSEL_31            (31*0x0001u)   /* DMA channel 2 transfer select 31: ext. Trigger (DMAE0) */
768
 
769
#define DMA0TSEL__DMA_REQ      (0*0x0001u)    /* DMA channel 0 transfer select 0:  DMA_REQ (sw) */
770
#define DMA0TSEL__TA0CCR0      (1*0x0001u)    /* DMA channel 0 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
771
#define DMA0TSEL__TA0CCR2      (2*0x0001u)    /* DMA channel 0 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
772
#define DMA0TSEL__TA1CCR0      (3*0x0001u)    /* DMA channel 0 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
773
#define DMA0TSEL__TA1CCR2      (4*0x0001u)    /* DMA channel 0 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
774
#define DMA0TSEL__TA2CCR0      (5*0x0001u)    /* DMA channel 0 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
775
#define DMA0TSEL__TA2CCR2      (6*0x0001u)    /* DMA channel 0 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
776
#define DMA0TSEL__TB0CCR0      (7*0x0001u)    /* DMA channel 0 transfer select 7:  TimerB (TB0CCR0.IFG) */
777
#define DMA0TSEL__TB0CCR2      (8*0x0001u)    /* DMA channel 0 transfer select 8:  TimerB (TB0CCR2.IFG) */
778
#define DMA0TSEL__RES9         (9*0x0001u)    /* DMA channel 0 transfer select 9:  Reserved */
779
#define DMA0TSEL__RES10        (10*0x0001u)   /* DMA channel 0 transfer select 10: Reserved */
780
#define DMA0TSEL__RES11        (11*0x0001u)   /* DMA channel 0 transfer select 11: Reserved */
781
#define DMA0TSEL__RES12        (12*0x0001u)   /* DMA channel 0 transfer select 12: Reserved */
782
#define DMA0TSEL__RES13        (13*0x0001u)   /* DMA channel 0 transfer select 13: Reserved */
783
#define DMA0TSEL__RES14        (14*0x0001u)   /* DMA channel 0 transfer select 14: Reserved */
784
#define DMA0TSEL__RES15        (15*0x0001u)   /* DMA channel 0 transfer select 15: Reserved */
785
#define DMA0TSEL__USCIA0RX     (16*0x0001u)   /* DMA channel 0 transfer select 16: USCIA0 receive */
786
#define DMA0TSEL__USCIA0TX     (17*0x0001u)   /* DMA channel 0 transfer select 17: USCIA0 transmit */
787
#define DMA0TSEL__USCIB0RX     (18*0x0001u)   /* DMA channel 0 transfer select 18: USCIB0 receive */
788
#define DMA0TSEL__USCIB0TX     (19*0x0001u)   /* DMA channel 0 transfer select 19: USCIB0 transmit */
789
#define DMA0TSEL__USCIA1RX     (20*0x0001u)   /* DMA channel 0 transfer select 20: USCIA1 receive */
790
#define DMA0TSEL__USCIA1TX     (21*0x0001u)   /* DMA channel 0 transfer select 21: USCIA1 transmit */
791
#define DMA0TSEL__USCIB1RX     (22*0x0001u)   /* DMA channel 0 transfer select 22: USCIB1 receive */
792
#define DMA0TSEL__USCIB1TX     (23*0x0001u)   /* DMA channel 0 transfer select 23: USCIB1 transmit */
793
#define DMA0TSEL__RES24        (24*0x0001u)   /* DMA channel 0 transfer select 24: Reserved */
794
#define DMA0TSEL__RES25        (25*0x0001u)   /* DMA channel 0 transfer select 25: Reserved */
795
#define DMA0TSEL__RES26        (26*0x0001u)   /* DMA channel 0 transfer select 26: Reserved */
796
#define DMA0TSEL__USB_FNRXD    (27*0x0001u)   /* DMA channel 0 transfer select 27: USB FNRXD */
797
#define DMA0TSEL__USB_READY    (28*0x0001u)   /* DMA channel 0 transfer select 28: USB ready */
798
#define DMA0TSEL__MPY          (29*0x0001u)   /* DMA channel 0 transfer select 29: Multiplier ready */
799
#define DMA0TSEL__DMA2IFG      (30*0x0001u)   /* DMA channel 0 transfer select 30: previous DMA channel DMA2IFG */
800
#define DMA0TSEL__DMAE0        (31*0x0001u)   /* DMA channel 0 transfer select 31: ext. Trigger (DMAE0) */
801
 
802
#define DMA1TSEL__DMA_REQ      (0*0x0100u)    /* DMA channel 1 transfer select 0:  DMA_REQ (sw) */
803
#define DMA1TSEL__TA0CCR0      (1*0x0100u)    /* DMA channel 1 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
804
#define DMA1TSEL__TA0CCR2      (2*0x0100u)    /* DMA channel 1 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
805
#define DMA1TSEL__TA1CCR0      (3*0x0100u)    /* DMA channel 1 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
806
#define DMA1TSEL__TA1CCR2      (4*0x0100u)    /* DMA channel 1 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
807
#define DMA1TSEL__TA2CCR0      (5*0x0100u)    /* DMA channel 1 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
808
#define DMA1TSEL__TA2CCR2      (6*0x0100u)    /* DMA channel 1 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
809
#define DMA1TSEL__TB0CCR0      (7*0x0100u)    /* DMA channel 1 transfer select 7:  TimerB (TB0CCR0.IFG) */
810
#define DMA1TSEL__TB0CCR2      (8*0x0100u)    /* DMA channel 1 transfer select 8:  TimerB (TB0CCR2.IFG) */
811
#define DMA1TSEL__RES9         (9*0x0100u)    /* DMA channel 1 transfer select 9:  Reserved */
812
#define DMA1TSEL__RES10        (10*0x0100u)   /* DMA channel 1 transfer select 10: Reserved */
813
#define DMA1TSEL__RES11        (11*0x0100u)   /* DMA channel 1 transfer select 11: Reserved */
814
#define DMA1TSEL__RES12        (12*0x0100u)   /* DMA channel 1 transfer select 12: Reserved */
815
#define DMA1TSEL__RES13        (13*0x0100u)   /* DMA channel 1 transfer select 13: Reserved */
816
#define DMA1TSEL__RES14        (14*0x0100u)   /* DMA channel 1 transfer select 14: Reserved */
817
#define DMA1TSEL__RES15        (15*0x0100u)   /* DMA channel 1 transfer select 15: Reserved */
818
#define DMA1TSEL__USCIA0RX     (16*0x0100u)   /* DMA channel 1 transfer select 16: USCIA0 receive */
819
#define DMA1TSEL__USCIA0TX     (17*0x0100u)   /* DMA channel 1 transfer select 17: USCIA0 transmit */
820
#define DMA1TSEL__USCIB0RX     (18*0x0100u)   /* DMA channel 1 transfer select 18: USCIB0 receive */
821
#define DMA1TSEL__USCIB0TX     (19*0x0100u)   /* DMA channel 1 transfer select 19: USCIB0 transmit */
822
#define DMA1TSEL__USCIA1RX     (20*0x0100u)   /* DMA channel 1 transfer select 20: USCIA1 receive */
823
#define DMA1TSEL__USCIA1TX     (21*0x0100u)   /* DMA channel 1 transfer select 21: USCIA1 transmit */
824
#define DMA1TSEL__USCIB1RX     (22*0x0100u)   /* DMA channel 1 transfer select 22: USCIB1 receive */
825
#define DMA1TSEL__USCIB1TX     (23*0x0100u)   /* DMA channel 1 transfer select 23: USCIB1 transmit */
826
#define DMA1TSEL__RES24        (24*0x0100u)   /* DMA channel 1 transfer select 24: Reserved */
827
#define DMA1TSEL__RES25        (25*0x0100u)   /* DMA channel 1 transfer select 25: Reserved */
828
#define DMA1TSEL__RES26        (26*0x0100u)   /* DMA channel 1 transfer select 26: Reserved */
829
#define DMA1TSEL__USB_FNRXD    (27*0x0100u)   /* DMA channel 1 transfer select 27: USB FNRXD */
830
#define DMA1TSEL__USB_READY    (28*0x0100u)   /* DMA channel 1 transfer select 28: USB ready */
831
#define DMA1TSEL__MPY          (29*0x0100u)   /* DMA channel 1 transfer select 29: Multiplier ready */
832
#define DMA1TSEL__DMA0IFG      (30*0x0100u)   /* DMA channel 1 transfer select 30: previous DMA channel DMA0IFG */
833
#define DMA1TSEL__DMAE0        (31*0x0100u)   /* DMA channel 1 transfer select 31: ext. Trigger (DMAE0) */
834
 
835
#define DMA2TSEL__DMA_REQ      (0*0x0001u)    /* DMA channel 2 transfer select 0:  DMA_REQ (sw) */
836
#define DMA2TSEL__TA0CCR0      (1*0x0001u)    /* DMA channel 2 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
837
#define DMA2TSEL__TA0CCR2      (2*0x0001u)    /* DMA channel 2 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
838
#define DMA2TSEL__TA1CCR0      (3*0x0001u)    /* DMA channel 2 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
839
#define DMA2TSEL__TA1CCR2      (4*0x0001u)    /* DMA channel 2 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
840
#define DMA2TSEL__TA2CCR0      (5*0x0001u)    /* DMA channel 2 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
841
#define DMA2TSEL__TA2CCR2      (6*0x0001u)    /* DMA channel 2 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
842
#define DMA2TSEL__TB0CCR0      (7*0x0001u)    /* DMA channel 2 transfer select 7:  TimerB (TB0CCR0.IFG) */
843
#define DMA2TSEL__TB0CCR2      (8*0x0001u)    /* DMA channel 2 transfer select 8:  TimerB (TB0CCR2.IFG) */
844
#define DMA2TSEL__RES9         (9*0x0001u)    /* DMA channel 2 transfer select 9:  Reserved */
845
#define DMA2TSEL__RES10        (10*0x0001u)   /* DMA channel 2 transfer select 10: Reserved */
846
#define DMA2TSEL__RES11        (11*0x0001u)   /* DMA channel 2 transfer select 11: Reserved */
847
#define DMA2TSEL__RES12        (12*0x0001u)   /* DMA channel 2 transfer select 12: Reserved */
848
#define DMA2TSEL__RES13        (13*0x0001u)   /* DMA channel 2 transfer select 13: Reserved */
849
#define DMA2TSEL__RES14        (14*0x0001u)   /* DMA channel 2 transfer select 14: Reserved */
850
#define DMA2TSEL__RES15        (15*0x0001u)   /* DMA channel 2 transfer select 15: Reserved */
851
#define DMA2TSEL__USCIA0RX     (16*0x0001u)   /* DMA channel 2 transfer select 16: USCIA0 receive */
852
#define DMA2TSEL__USCIA0TX     (17*0x0001u)   /* DMA channel 2 transfer select 17: USCIA0 transmit */
853
#define DMA2TSEL__USCIB0RX     (18*0x0001u)   /* DMA channel 2 transfer select 18: USCIB0 receive */
854
#define DMA2TSEL__USCIB0TX     (19*0x0001u)   /* DMA channel 2 transfer select 19: USCIB0 transmit */
855
#define DMA2TSEL__USCIA1RX     (20*0x0001u)   /* DMA channel 2 transfer select 20: USCIA1 receive */
856
#define DMA2TSEL__USCIA1TX     (21*0x0001u)   /* DMA channel 2 transfer select 21: USCIA1 transmit */
857
#define DMA2TSEL__USCIB1RX     (22*0x0001u)   /* DMA channel 2 transfer select 22: USCIB1 receive */
858
#define DMA2TSEL__USCIB1TX     (23*0x0001u)   /* DMA channel 2 transfer select 23: USCIB1 transmit */
859
#define DMA2TSEL__RES24        (24*0x0001u)   /* DMA channel 2 transfer select 24: Reserved */
860
#define DMA2TSEL__RES25        (25*0x0001u)   /* DMA channel 2 transfer select 25: Reserved */
861
#define DMA2TSEL__RES26        (26*0x0001u)   /* DMA channel 2 transfer select 26: Reserved */
862
#define DMA2TSEL__USB_FNRXD    (27*0x0001u)   /* DMA channel 2 transfer select 27: USB FNRXD */
863
#define DMA2TSEL__USB_READY    (28*0x0001u)   /* DMA channel 2 transfer select 28: USB ready */
864
#define DMA2TSEL__MPY          (29*0x0001u)   /* DMA channel 2 transfer select 29: Multiplier ready */
865
#define DMA2TSEL__DMA1IFG      (30*0x0001u)   /* DMA channel 2 transfer select 30: previous DMA channel DMA1IFG */
866
#define DMA2TSEL__DMAE0        (31*0x0001u)   /* DMA channel 2 transfer select 31: ext. Trigger (DMAE0) */
867
 
868
/*************************************************************
869
* Flash Memory
870
*************************************************************/
871
#define __MSP430_HAS_FLASH__                  /* Definition to show that Module is available */
872
#define __MSP430_BASEADDRESS_FLASH__ 0x0140
873
 
874
SFR_16BIT(FCTL1);                             /* FLASH Control 1 */
875
SFR_8BIT(FCTL1_L);                            /* FLASH Control 1 */
876
SFR_8BIT(FCTL1_H);                            /* FLASH Control 1 */
877
//sfrbw    FCTL2               (0x0142)  /* FLASH Control 2 */
878
SFR_16BIT(FCTL3);                             /* FLASH Control 3 */
879
SFR_8BIT(FCTL3_L);                            /* FLASH Control 3 */
880
SFR_8BIT(FCTL3_H);                            /* FLASH Control 3 */
881
SFR_16BIT(FCTL4);                             /* FLASH Control 4 */
882
SFR_8BIT(FCTL4_L);                            /* FLASH Control 4 */
883
SFR_8BIT(FCTL4_H);                            /* FLASH Control 4 */
884
 
885
#define FRPW                   (0x9600)       /* Flash password returned by read */
886
#define FWPW                   (0xA500)       /* Flash password for write */
887
#define FXPW                   (0x3300)       /* for use with XOR instruction */
888
#define FRKEY                  (0x9600)       /* (legacy definition) Flash key returned by read */
889
#define FWKEY                  (0xA500)       /* (legacy definition) Flash key for write */
890
#define FXKEY                  (0x3300)       /* (legacy definition) for use with XOR instruction */
891
 
892
/* FCTL1 Control Bits */
893
//#define RESERVED            (0x0001)  /* Reserved */
894
#define ERASE                  (0x0002)       /* Enable bit for Flash segment erase */
895
#define MERAS                  (0x0004)       /* Enable bit for Flash mass erase */
896
//#define RESERVED            (0x0008)  /* Reserved */
897
//#define RESERVED            (0x0010)  /* Reserved */
898
#define SWRT                   (0x0020)       /* Smart Write enable */
899
#define WRT                    (0x0040)       /* Enable bit for Flash write */
900
#define BLKWRT                 (0x0080)       /* Enable bit for Flash segment write */
901
 
902
/* FCTL1 Control Bits */
903
//#define RESERVED            (0x0001)  /* Reserved */
904
#define ERASE_L                (0x0002)       /* Enable bit for Flash segment erase */
905
#define MERAS_L                (0x0004)       /* Enable bit for Flash mass erase */
906
//#define RESERVED            (0x0008)  /* Reserved */
907
//#define RESERVED            (0x0010)  /* Reserved */
908
#define SWRT_L                 (0x0020)       /* Smart Write enable */
909
#define WRT_L                  (0x0040)       /* Enable bit for Flash write */
910
#define BLKWRT_L               (0x0080)       /* Enable bit for Flash segment write */
911
 
912
/* FCTL1 Control Bits */
913
//#define RESERVED            (0x0001)  /* Reserved */
914
//#define RESERVED            (0x0008)  /* Reserved */
915
//#define RESERVED            (0x0010)  /* Reserved */
916
 
917
/* FCTL3 Control Bits */
918
#define BUSY                   (0x0001)       /* Flash busy: 1 */
919
#define KEYV                   (0x0002)       /* Flash Key violation flag */
920
#define ACCVIFG                (0x0004)       /* Flash Access violation flag */
921
#define WAIT                   (0x0008)       /* Wait flag for segment write */
922
#define LOCK                   (0x0010)       /* Lock bit: 1 - Flash is locked (read only) */
923
#define EMEX                   (0x0020)       /* Flash Emergency Exit */
924
#define LOCKA                  (0x0040)       /* Segment A Lock bit: read = 1 - Segment is locked (read only) */
925
//#define RESERVED            (0x0080)  /* Reserved */
926
 
927
/* FCTL3 Control Bits */
928
#define BUSY_L                 (0x0001)       /* Flash busy: 1 */
929
#define KEYV_L                 (0x0002)       /* Flash Key violation flag */
930
#define ACCVIFG_L              (0x0004)       /* Flash Access violation flag */
931
#define WAIT_L                 (0x0008)       /* Wait flag for segment write */
932
#define LOCK_L                 (0x0010)       /* Lock bit: 1 - Flash is locked (read only) */
933
#define EMEX_L                 (0x0020)       /* Flash Emergency Exit */
934
#define LOCKA_L                (0x0040)       /* Segment A Lock bit: read = 1 - Segment is locked (read only) */
935
//#define RESERVED            (0x0080)  /* Reserved */
936
 
937
/* FCTL3 Control Bits */
938
//#define RESERVED            (0x0080)  /* Reserved */
939
 
940
/* FCTL4 Control Bits */
941
#define VPE                    (0x0001)       /* Voltage Changed during Program Error Flag */
942
#define MGR0                   (0x0010)       /* Marginal read 0 mode. */
943
#define MGR1                   (0x0020)       /* Marginal read 1 mode. */
944
#define LOCKINFO               (0x0080)       /* Lock INFO Memory bit: read = 1 - Segment is locked (read only) */
945
 
946
/* FCTL4 Control Bits */
947
#define VPE_L                  (0x0001)       /* Voltage Changed during Program Error Flag */
948
#define MGR0_L                 (0x0010)       /* Marginal read 0 mode. */
949
#define MGR1_L                 (0x0020)       /* Marginal read 1 mode. */
950
#define LOCKINFO_L             (0x0080)       /* Lock INFO Memory bit: read = 1 - Segment is locked (read only) */
951
 
952
/* FCTL4 Control Bits */
953
 
954
/************************************************************
955
* HARDWARE MULTIPLIER 32Bit
956
************************************************************/
957
#define __MSP430_HAS_MPY32__                  /* Definition to show that Module is available */
958
#define __MSP430_BASEADDRESS_MPY32__ 0x04C0
959
 
960
SFR_16BIT(MPY);                               /* Multiply Unsigned/Operand 1 */
961
SFR_8BIT(MPY_L);                              /* Multiply Unsigned/Operand 1 */
962
SFR_8BIT(MPY_H);                              /* Multiply Unsigned/Operand 1 */
963
SFR_16BIT(MPYS);                              /* Multiply Signed/Operand 1 */
964
SFR_8BIT(MPYS_L);                             /* Multiply Signed/Operand 1 */
965
SFR_8BIT(MPYS_H);                             /* Multiply Signed/Operand 1 */
966
SFR_16BIT(MAC);                               /* Multiply Unsigned and Accumulate/Operand 1 */
967
SFR_8BIT(MAC_L);                              /* Multiply Unsigned and Accumulate/Operand 1 */
968
SFR_8BIT(MAC_H);                              /* Multiply Unsigned and Accumulate/Operand 1 */
969
SFR_16BIT(MACS);                              /* Multiply Signed and Accumulate/Operand 1 */
970
SFR_8BIT(MACS_L);                             /* Multiply Signed and Accumulate/Operand 1 */
971
SFR_8BIT(MACS_H);                             /* Multiply Signed and Accumulate/Operand 1 */
972
SFR_16BIT(OP2);                               /* Operand 2 */
973
SFR_8BIT(OP2_L);                              /* Operand 2 */
974
SFR_8BIT(OP2_H);                              /* Operand 2 */
975
SFR_16BIT(RESLO);                             /* Result Low Word */
976
SFR_8BIT(RESLO_L);                            /* Result Low Word */
977
SFR_8BIT(RESLO_H);                            /* Result Low Word */
978
SFR_16BIT(RESHI);                             /* Result High Word */
979
SFR_8BIT(RESHI_L);                            /* Result High Word */
980
SFR_8BIT(RESHI_H);                            /* Result High Word */
981
SFR_16BIT(SUMEXT);                            /* Sum Extend */
982
SFR_8BIT(SUMEXT_L);                           /* Sum Extend */
983
SFR_8BIT(SUMEXT_H);                           /* Sum Extend */
984
 
985
SFR_16BIT(MPY32L);                            /* 32-bit operand 1 - multiply - low word */
986
SFR_8BIT(MPY32L_L);                           /* 32-bit operand 1 - multiply - low word */
987
SFR_8BIT(MPY32L_H);                           /* 32-bit operand 1 - multiply - low word */
988
SFR_16BIT(MPY32H);                            /* 32-bit operand 1 - multiply - high word */
989
SFR_8BIT(MPY32H_L);                           /* 32-bit operand 1 - multiply - high word */
990
SFR_8BIT(MPY32H_H);                           /* 32-bit operand 1 - multiply - high word */
991
SFR_16BIT(MPYS32L);                           /* 32-bit operand 1 - signed multiply - low word */
992
SFR_8BIT(MPYS32L_L);                          /* 32-bit operand 1 - signed multiply - low word */
993
SFR_8BIT(MPYS32L_H);                          /* 32-bit operand 1 - signed multiply - low word */
994
SFR_16BIT(MPYS32H);                           /* 32-bit operand 1 - signed multiply - high word */
995
SFR_8BIT(MPYS32H_L);                          /* 32-bit operand 1 - signed multiply - high word */
996
SFR_8BIT(MPYS32H_H);                          /* 32-bit operand 1 - signed multiply - high word */
997
SFR_16BIT(MAC32L);                            /* 32-bit operand 1 - multiply accumulate - low word */
998
SFR_8BIT(MAC32L_L);                           /* 32-bit operand 1 - multiply accumulate - low word */
999
SFR_8BIT(MAC32L_H);                           /* 32-bit operand 1 - multiply accumulate - low word */
1000
SFR_16BIT(MAC32H);                            /* 32-bit operand 1 - multiply accumulate - high word */
1001
SFR_8BIT(MAC32H_L);                           /* 32-bit operand 1 - multiply accumulate - high word */
1002
SFR_8BIT(MAC32H_H);                           /* 32-bit operand 1 - multiply accumulate - high word */
1003
SFR_16BIT(MACS32L);                           /* 32-bit operand 1 - signed multiply accumulate - low word */
1004
SFR_8BIT(MACS32L_L);                          /* 32-bit operand 1 - signed multiply accumulate - low word */
1005
SFR_8BIT(MACS32L_H);                          /* 32-bit operand 1 - signed multiply accumulate - low word */
1006
SFR_16BIT(MACS32H);                           /* 32-bit operand 1 - signed multiply accumulate - high word */
1007
SFR_8BIT(MACS32H_L);                          /* 32-bit operand 1 - signed multiply accumulate - high word */
1008
SFR_8BIT(MACS32H_H);                          /* 32-bit operand 1 - signed multiply accumulate - high word */
1009
SFR_16BIT(OP2L);                              /* 32-bit operand 2 - low word */
1010
SFR_8BIT(OP2L_L);                             /* 32-bit operand 2 - low word */
1011
SFR_8BIT(OP2L_H);                             /* 32-bit operand 2 - low word */
1012
SFR_16BIT(OP2H);                              /* 32-bit operand 2 - high word */
1013
SFR_8BIT(OP2H_L);                             /* 32-bit operand 2 - high word */
1014
SFR_8BIT(OP2H_H);                             /* 32-bit operand 2 - high word */
1015
SFR_16BIT(RES0);                              /* 32x32-bit result 0 - least significant word */
1016
SFR_8BIT(RES0_L);                             /* 32x32-bit result 0 - least significant word */
1017
SFR_8BIT(RES0_H);                             /* 32x32-bit result 0 - least significant word */
1018
SFR_16BIT(RES1);                              /* 32x32-bit result 1 */
1019
SFR_8BIT(RES1_L);                             /* 32x32-bit result 1 */
1020
SFR_8BIT(RES1_H);                             /* 32x32-bit result 1 */
1021
SFR_16BIT(RES2);                              /* 32x32-bit result 2 */
1022
SFR_8BIT(RES2_L);                             /* 32x32-bit result 2 */
1023
SFR_8BIT(RES2_H);                             /* 32x32-bit result 2 */
1024
SFR_16BIT(RES3);                              /* 32x32-bit result 3 - most significant word */
1025
SFR_8BIT(RES3_L);                             /* 32x32-bit result 3 - most significant word */
1026
SFR_8BIT(RES3_H);                             /* 32x32-bit result 3 - most significant word */
1027
SFR_16BIT(MPY32CTL0);                         /* MPY32 Control Register 0 */
1028
SFR_8BIT(MPY32CTL0_L);                        /* MPY32 Control Register 0 */
1029
SFR_8BIT(MPY32CTL0_H);                        /* MPY32 Control Register 0 */
1030
 
1031
#define MPY_B                  MPY_L          /* Multiply Unsigned/Operand 1 (Byte Access) */
1032
#define MPYS_B                 MPYS_L         /* Multiply Signed/Operand 1 (Byte Access) */
1033
#define MAC_B                  MAC_L          /* Multiply Unsigned and Accumulate/Operand 1 (Byte Access) */
1034
#define MACS_B                 MACS_L         /* Multiply Signed and Accumulate/Operand 1 (Byte Access) */
1035
#define OP2_B                  OP2_L          /* Operand 2 (Byte Access) */
1036
#define MPY32L_B               MPY32L_L       /* 32-bit operand 1 - multiply - low word (Byte Access) */
1037
#define MPY32H_B               MPY32H_L       /* 32-bit operand 1 - multiply - high word (Byte Access) */
1038
#define MPYS32L_B              MPYS32L_L      /* 32-bit operand 1 - signed multiply - low word (Byte Access) */
1039
#define MPYS32H_B              MPYS32H_L      /* 32-bit operand 1 - signed multiply - high word (Byte Access) */
1040
#define MAC32L_B               MAC32L_L       /* 32-bit operand 1 - multiply accumulate - low word (Byte Access) */
1041
#define MAC32H_B               MAC32H_L       /* 32-bit operand 1 - multiply accumulate - high word (Byte Access) */
1042
#define MACS32L_B              MACS32L_L      /* 32-bit operand 1 - signed multiply accumulate - low word (Byte Access) */
1043
#define MACS32H_B              MACS32H_L      /* 32-bit operand 1 - signed multiply accumulate - high word (Byte Access) */
1044
#define OP2L_B                 OP2L_L         /* 32-bit operand 2 - low word (Byte Access) */
1045
#define OP2H_B                 OP2H_L         /* 32-bit operand 2 - high word (Byte Access) */
1046
 
1047
/* MPY32CTL0 Control Bits */
1048
#define MPYC                   (0x0001)       /* Carry of the multiplier */
1049
//#define RESERVED            (0x0002)  /* Reserved */
1050
#define MPYFRAC                (0x0004)       /* Fractional mode */
1051
#define MPYSAT                 (0x0008)       /* Saturation mode */
1052
#define MPYM0                  (0x0010)       /* Multiplier mode Bit:0 */
1053
#define MPYM1                  (0x0020)       /* Multiplier mode Bit:1 */
1054
#define OP1_32                 (0x0040)       /* Bit-width of operand 1 0:16Bit / 1:32Bit */
1055
#define OP2_32                 (0x0080)       /* Bit-width of operand 2 0:16Bit / 1:32Bit */
1056
#define MPYDLYWRTEN            (0x0100)       /* Delayed write enable */
1057
#define MPYDLY32               (0x0200)       /* Delayed write mode */
1058
 
1059
/* MPY32CTL0 Control Bits */
1060
#define MPYC_L                 (0x0001)       /* Carry of the multiplier */
1061
//#define RESERVED            (0x0002)  /* Reserved */
1062
#define MPYFRAC_L              (0x0004)       /* Fractional mode */
1063
#define MPYSAT_L               (0x0008)       /* Saturation mode */
1064
#define MPYM0_L                (0x0010)       /* Multiplier mode Bit:0 */
1065
#define MPYM1_L                (0x0020)       /* Multiplier mode Bit:1 */
1066
#define OP1_32_L               (0x0040)       /* Bit-width of operand 1 0:16Bit / 1:32Bit */
1067
#define OP2_32_L               (0x0080)       /* Bit-width of operand 2 0:16Bit / 1:32Bit */
1068
 
1069
/* MPY32CTL0 Control Bits */
1070
//#define RESERVED            (0x0002)  /* Reserved */
1071
#define MPYDLYWRTEN_H          (0x0001)       /* Delayed write enable */
1072
#define MPYDLY32_H             (0x0002)       /* Delayed write mode */
1073
 
1074
#define MPYM_0                 (0x0000)       /* Multiplier mode: MPY */
1075
#define MPYM_1                 (0x0010)       /* Multiplier mode: MPYS */
1076
#define MPYM_2                 (0x0020)       /* Multiplier mode: MAC */
1077
#define MPYM_3                 (0x0030)       /* Multiplier mode: MACS */
1078
#define MPYM__MPY              (0x0000)       /* Multiplier mode: MPY */
1079
#define MPYM__MPYS             (0x0010)       /* Multiplier mode: MPYS */
1080
#define MPYM__MAC              (0x0020)       /* Multiplier mode: MAC */
1081
#define MPYM__MACS             (0x0030)       /* Multiplier mode: MACS */
1082
 
1083
/************************************************************
1084
* DIGITAL I/O Port1/2 Pull up / Pull down Resistors
1085
************************************************************/
1086
#define __MSP430_HAS_PORT1_R__                /* Definition to show that Module is available */
1087
#define __MSP430_BASEADDRESS_PORT1_R__ 0x0200
1088
#define __MSP430_HAS_PORT2_R__                /* Definition to show that Module is available */
1089
#define __MSP430_BASEADDRESS_PORT2_R__ 0x0200
1090
#define __MSP430_HAS_PORTA_R__                /* Definition to show that Module is available */
1091
#define __MSP430_BASEADDRESS_PORTA_R__ 0x0200
1092
 
1093
SFR_16BIT(PAIN);                              /* Port A Input */
1094
SFR_8BIT(PAIN_L);                             /* Port A Input */
1095
SFR_8BIT(PAIN_H);                             /* Port A Input */
1096
SFR_16BIT(PAOUT);                             /* Port A Output */
1097
SFR_8BIT(PAOUT_L);                            /* Port A Output */
1098
SFR_8BIT(PAOUT_H);                            /* Port A Output */
1099
SFR_16BIT(PADIR);                             /* Port A Direction */
1100
SFR_8BIT(PADIR_L);                            /* Port A Direction */
1101
SFR_8BIT(PADIR_H);                            /* Port A Direction */
1102
SFR_16BIT(PAREN);                             /* Port A Resistor Enable */
1103
SFR_8BIT(PAREN_L);                            /* Port A Resistor Enable */
1104
SFR_8BIT(PAREN_H);                            /* Port A Resistor Enable */
1105
SFR_16BIT(PADS);                              /* Port A Resistor Drive Strenght */
1106
SFR_8BIT(PADS_L);                             /* Port A Resistor Drive Strenght */
1107
SFR_8BIT(PADS_H);                             /* Port A Resistor Drive Strenght */
1108
SFR_16BIT(PASEL);                             /* Port A Selection */
1109
SFR_8BIT(PASEL_L);                            /* Port A Selection */
1110
SFR_8BIT(PASEL_H);                            /* Port A Selection */
1111
SFR_16BIT(PAIES);                             /* Port A Interrupt Edge Select */
1112
SFR_8BIT(PAIES_L);                            /* Port A Interrupt Edge Select */
1113
SFR_8BIT(PAIES_H);                            /* Port A Interrupt Edge Select */
1114
SFR_16BIT(PAIE);                              /* Port A Interrupt Enable */
1115
SFR_8BIT(PAIE_L);                             /* Port A Interrupt Enable */
1116
SFR_8BIT(PAIE_H);                             /* Port A Interrupt Enable */
1117
SFR_16BIT(PAIFG);                             /* Port A Interrupt Flag */
1118
SFR_8BIT(PAIFG_L);                            /* Port A Interrupt Flag */
1119
SFR_8BIT(PAIFG_H);                            /* Port A Interrupt Flag */
1120
 
1121
 
1122
SFR_16BIT(P1IV);                              /* Port 1 Interrupt Vector Word */
1123
SFR_16BIT(P2IV);                              /* Port 2 Interrupt Vector Word */
1124
#define P1IN                   (PAIN_L)       /* Port 1 Input */
1125
#define P1OUT                  (PAOUT_L)      /* Port 1 Output */
1126
#define P1DIR                  (PADIR_L)      /* Port 1 Direction */
1127
#define P1REN                  (PAREN_L)      /* Port 1 Resistor Enable */
1128
#define P1DS                   (PADS_L)       /* Port 1 Resistor Drive Strenght */
1129
#define P1SEL                  (PASEL_L)      /* Port 1 Selection */
1130
#define P1IES                  (PAIES_L)      /* Port 1 Interrupt Edge Select */
1131
#define P1IE                   (PAIE_L)       /* Port 1 Interrupt Enable */
1132
#define P1IFG                  (PAIFG_L)      /* Port 1 Interrupt Flag */
1133
 
1134
//Definitions for P1IV
1135
#define P1IV_NONE              (0x0000)       /* No Interrupt pending */
1136
#define P1IV_P1IFG0            (0x0002)       /* P1IV P1IFG.0 */
1137
#define P1IV_P1IFG1            (0x0004)       /* P1IV P1IFG.1 */
1138
#define P1IV_P1IFG2            (0x0006)       /* P1IV P1IFG.2 */
1139
#define P1IV_P1IFG3            (0x0008)       /* P1IV P1IFG.3 */
1140
#define P1IV_P1IFG4            (0x000A)       /* P1IV P1IFG.4 */
1141
#define P1IV_P1IFG5            (0x000C)       /* P1IV P1IFG.5 */
1142
#define P1IV_P1IFG6            (0x000E)       /* P1IV P1IFG.6 */
1143
#define P1IV_P1IFG7            (0x0010)       /* P1IV P1IFG.7 */
1144
 
1145
#define P2IN                   (PAIN_H)       /* Port 2 Input */
1146
#define P2OUT                  (PAOUT_H)      /* Port 2 Output */
1147
#define P2DIR                  (PADIR_H)      /* Port 2 Direction */
1148
#define P2REN                  (PAREN_H)      /* Port 2 Resistor Enable */
1149
#define P2DS                   (PADS_H)       /* Port 2 Resistor Drive Strenght */
1150
#define P2SEL                  (PASEL_H)      /* Port 2 Selection */
1151
#define P2IES                  (PAIES_H)      /* Port 2 Interrupt Edge Select */
1152
#define P2IE                   (PAIE_H)       /* Port 2 Interrupt Enable */
1153
#define P2IFG                  (PAIFG_H)      /* Port 2 Interrupt Flag */
1154
 
1155
//Definitions for P2IV
1156
#define P2IV_NONE              (0x0000)       /* No Interrupt pending */
1157
#define P2IV_P2IFG0            (0x0002)       /* P2IV P2IFG.0 */
1158
#define P2IV_P2IFG1            (0x0004)       /* P2IV P2IFG.1 */
1159
#define P2IV_P2IFG2            (0x0006)       /* P2IV P2IFG.2 */
1160
#define P2IV_P2IFG3            (0x0008)       /* P2IV P2IFG.3 */
1161
#define P2IV_P2IFG4            (0x000A)       /* P2IV P2IFG.4 */
1162
#define P2IV_P2IFG5            (0x000C)       /* P2IV P2IFG.5 */
1163
#define P2IV_P2IFG6            (0x000E)       /* P2IV P2IFG.6 */
1164
#define P2IV_P2IFG7            (0x0010)       /* P2IV P2IFG.7 */
1165
 
1166
 
1167
/************************************************************
1168
* DIGITAL I/O Port3/4 Pull up / Pull down Resistors
1169
************************************************************/
1170
#define __MSP430_HAS_PORT3_R__                /* Definition to show that Module is available */
1171
#define __MSP430_BASEADDRESS_PORT3_R__ 0x0220
1172
#define __MSP430_HAS_PORT4_R__                /* Definition to show that Module is available */
1173
#define __MSP430_BASEADDRESS_PORT4_R__ 0x0220
1174
#define __MSP430_HAS_PORTB_R__                /* Definition to show that Module is available */
1175
#define __MSP430_BASEADDRESS_PORTB_R__ 0x0220
1176
 
1177
SFR_16BIT(PBIN);                              /* Port B Input */
1178
SFR_8BIT(PBIN_L);                             /* Port B Input */
1179
SFR_8BIT(PBIN_H);                             /* Port B Input */
1180
SFR_16BIT(PBOUT);                             /* Port B Output */
1181
SFR_8BIT(PBOUT_L);                            /* Port B Output */
1182
SFR_8BIT(PBOUT_H);                            /* Port B Output */
1183
SFR_16BIT(PBDIR);                             /* Port B Direction */
1184
SFR_8BIT(PBDIR_L);                            /* Port B Direction */
1185
SFR_8BIT(PBDIR_H);                            /* Port B Direction */
1186
SFR_16BIT(PBREN);                             /* Port B Resistor Enable */
1187
SFR_8BIT(PBREN_L);                            /* Port B Resistor Enable */
1188
SFR_8BIT(PBREN_H);                            /* Port B Resistor Enable */
1189
SFR_16BIT(PBDS);                              /* Port B Resistor Drive Strenght */
1190
SFR_8BIT(PBDS_L);                             /* Port B Resistor Drive Strenght */
1191
SFR_8BIT(PBDS_H);                             /* Port B Resistor Drive Strenght */
1192
SFR_16BIT(PBSEL);                             /* Port B Selection */
1193
SFR_8BIT(PBSEL_L);                            /* Port B Selection */
1194
SFR_8BIT(PBSEL_H);                            /* Port B Selection */
1195
 
1196
 
1197
#define P3IN                   (PBIN_L)       /* Port 3 Input */
1198
#define P3OUT                  (PBOUT_L)      /* Port 3 Output */
1199
#define P3DIR                  (PBDIR_L)      /* Port 3 Direction */
1200
#define P3REN                  (PBREN_L)      /* Port 3 Resistor Enable */
1201
#define P3DS                   (PBDS_L)       /* Port 3 Resistor Drive Strenght */
1202
#define P3SEL                  (PBSEL_L)      /* Port 3 Selection */
1203
 
1204
#define P4IN                   (PBIN_H)       /* Port 4 Input */
1205
#define P4OUT                  (PBOUT_H)      /* Port 4 Output */
1206
#define P4DIR                  (PBDIR_H)      /* Port 4 Direction */
1207
#define P4REN                  (PBREN_H)      /* Port 4 Resistor Enable */
1208
#define P4DS                   (PBDS_H)       /* Port 4 Resistor Drive Strenght */
1209
#define P4SEL                  (PBSEL_H)      /* Port 4 Selection */
1210
 
1211
 
1212
/************************************************************
1213
* DIGITAL I/O Port5/6 Pull up / Pull down Resistors
1214
************************************************************/
1215
#define __MSP430_HAS_PORT5_R__                /* Definition to show that Module is available */
1216
#define __MSP430_BASEADDRESS_PORT5_R__ 0x0240
1217
#define __MSP430_HAS_PORT6_R__                /* Definition to show that Module is available */
1218
#define __MSP430_BASEADDRESS_PORT6_R__ 0x0240
1219
#define __MSP430_HAS_PORTC_R__                /* Definition to show that Module is available */
1220
#define __MSP430_BASEADDRESS_PORTC_R__ 0x0240
1221
 
1222
SFR_16BIT(PCIN);                              /* Port C Input */
1223
SFR_8BIT(PCIN_L);                             /* Port C Input */
1224
SFR_8BIT(PCIN_H);                             /* Port C Input */
1225
SFR_16BIT(PCOUT);                             /* Port C Output */
1226
SFR_8BIT(PCOUT_L);                            /* Port C Output */
1227
SFR_8BIT(PCOUT_H);                            /* Port C Output */
1228
SFR_16BIT(PCDIR);                             /* Port C Direction */
1229
SFR_8BIT(PCDIR_L);                            /* Port C Direction */
1230
SFR_8BIT(PCDIR_H);                            /* Port C Direction */
1231
SFR_16BIT(PCREN);                             /* Port C Resistor Enable */
1232
SFR_8BIT(PCREN_L);                            /* Port C Resistor Enable */
1233
SFR_8BIT(PCREN_H);                            /* Port C Resistor Enable */
1234
SFR_16BIT(PCDS);                              /* Port C Resistor Drive Strenght */
1235
SFR_8BIT(PCDS_L);                             /* Port C Resistor Drive Strenght */
1236
SFR_8BIT(PCDS_H);                             /* Port C Resistor Drive Strenght */
1237
SFR_16BIT(PCSEL);                             /* Port C Selection */
1238
SFR_8BIT(PCSEL_L);                            /* Port C Selection */
1239
SFR_8BIT(PCSEL_H);                            /* Port C Selection */
1240
 
1241
 
1242
#define P5IN                   (PCIN_L)       /* Port 5 Input */
1243
#define P5OUT                  (PCOUT_L)      /* Port 5 Output */
1244
#define P5DIR                  (PCDIR_L)      /* Port 5 Direction */
1245
#define P5REN                  (PCREN_L)      /* Port 5 Resistor Enable */
1246
#define P5DS                   (PCDS_L)       /* Port 5 Resistor Drive Strenght */
1247
#define P5SEL                  (PCSEL_L)      /* Port 5 Selection */
1248
 
1249
#define P6IN                   (PCIN_H)       /* Port 6 Input */
1250
#define P6OUT                  (PCOUT_H)      /* Port 6 Output */
1251
#define P6DIR                  (PCDIR_H)      /* Port 6 Direction */
1252
#define P6REN                  (PCREN_H)      /* Port 6 Resistor Enable */
1253
#define P6DS                   (PCDS_H)       /* Port 6 Resistor Drive Strenght */
1254
#define P6SEL                  (PCSEL_H)      /* Port 6 Selection */
1255
 
1256
 
1257
/************************************************************
1258
* DIGITAL I/O Port7/8 Pull up / Pull down Resistors
1259
************************************************************/
1260
#define __MSP430_HAS_PORT7_R__                /* Definition to show that Module is available */
1261
#define __MSP430_BASEADDRESS_PORT7_R__ 0x0260
1262
#define __MSP430_HAS_PORT8_R__                /* Definition to show that Module is available */
1263
#define __MSP430_BASEADDRESS_PORT8_R__ 0x0260
1264
#define __MSP430_HAS_PORTD_R__                /* Definition to show that Module is available */
1265
#define __MSP430_BASEADDRESS_PORTD_R__ 0x0260
1266
 
1267
SFR_16BIT(PDIN);                              /* Port D Input */
1268
SFR_8BIT(PDIN_L);                             /* Port D Input */
1269
SFR_8BIT(PDIN_H);                             /* Port D Input */
1270
SFR_16BIT(PDOUT);                             /* Port D Output */
1271
SFR_8BIT(PDOUT_L);                            /* Port D Output */
1272
SFR_8BIT(PDOUT_H);                            /* Port D Output */
1273
SFR_16BIT(PDDIR);                             /* Port D Direction */
1274
SFR_8BIT(PDDIR_L);                            /* Port D Direction */
1275
SFR_8BIT(PDDIR_H);                            /* Port D Direction */
1276
SFR_16BIT(PDREN);                             /* Port D Resistor Enable */
1277
SFR_8BIT(PDREN_L);                            /* Port D Resistor Enable */
1278
SFR_8BIT(PDREN_H);                            /* Port D Resistor Enable */
1279
SFR_16BIT(PDDS);                              /* Port D Resistor Drive Strenght */
1280
SFR_8BIT(PDDS_L);                             /* Port D Resistor Drive Strenght */
1281
SFR_8BIT(PDDS_H);                             /* Port D Resistor Drive Strenght */
1282
SFR_16BIT(PDSEL);                             /* Port D Selection */
1283
SFR_8BIT(PDSEL_L);                            /* Port D Selection */
1284
SFR_8BIT(PDSEL_H);                            /* Port D Selection */
1285
 
1286
 
1287
#define P7IN                   (PDIN_L)       /* Port 7 Input */
1288
#define P7OUT                  (PDOUT_L)      /* Port 7 Output */
1289
#define P7DIR                  (PDDIR_L)      /* Port 7 Direction */
1290
#define P7REN                  (PDREN_L)      /* Port 7 Resistor Enable */
1291
#define P7DS                   (PDDS_L)       /* Port 7 Resistor Drive Strenght */
1292
#define P7SEL                  (PDSEL_L)      /* Port 7 Selection */
1293
 
1294
#define P8IN                   (PDIN_H)       /* Port 8 Input */
1295
#define P8OUT                  (PDOUT_H)      /* Port 8 Output */
1296
#define P8DIR                  (PDDIR_H)      /* Port 8 Direction */
1297
#define P8REN                  (PDREN_H)      /* Port 8 Resistor Enable */
1298
#define P8DS                   (PDDS_H)       /* Port 8 Resistor Drive Strenght */
1299
#define P8SEL                  (PDSEL_H)      /* Port 8 Selection */
1300
 
1301
 
1302
/************************************************************
1303
* DIGITAL I/O PortJ Pull up / Pull down Resistors
1304
************************************************************/
1305
#define __MSP430_HAS_PORTJ_R__                /* Definition to show that Module is available */
1306
#define __MSP430_BASEADDRESS_PORTJ_R__ 0x0320
1307
 
1308
SFR_16BIT(PJIN);                              /* Port J Input */
1309
SFR_8BIT(PJIN_L);                             /* Port J Input */
1310
SFR_8BIT(PJIN_H);                             /* Port J Input */
1311
SFR_16BIT(PJOUT);                             /* Port J Output */
1312
SFR_8BIT(PJOUT_L);                            /* Port J Output */
1313
SFR_8BIT(PJOUT_H);                            /* Port J Output */
1314
SFR_16BIT(PJDIR);                             /* Port J Direction */
1315
SFR_8BIT(PJDIR_L);                            /* Port J Direction */
1316
SFR_8BIT(PJDIR_H);                            /* Port J Direction */
1317
SFR_16BIT(PJREN);                             /* Port J Resistor Enable */
1318
SFR_8BIT(PJREN_L);                            /* Port J Resistor Enable */
1319
SFR_8BIT(PJREN_H);                            /* Port J Resistor Enable */
1320
SFR_16BIT(PJDS);                              /* Port J Resistor Drive Strenght */
1321
SFR_8BIT(PJDS_L);                             /* Port J Resistor Drive Strenght */
1322
SFR_8BIT(PJDS_H);                             /* Port J Resistor Drive Strenght */
1323
 
1324
/************************************************************
1325
* PORT MAPPING CONTROLLER
1326
************************************************************/
1327
#define __MSP430_HAS_PORT_MAPPING__                /* Definition to show that Module is available */
1328
#define __MSP430_BASEADDRESS_PORT_MAPPING__ 0x01C0
1329
 
1330
SFR_16BIT(PMAPKEYID);                         /* Port Mapping Key register */
1331
SFR_8BIT(PMAPKEYID_L);                        /* Port Mapping Key register */
1332
SFR_8BIT(PMAPKEYID_H);                        /* Port Mapping Key register */
1333
SFR_16BIT(PMAPCTL);                           /* Port Mapping control register */
1334
SFR_8BIT(PMAPCTL_L);                          /* Port Mapping control register */
1335
SFR_8BIT(PMAPCTL_H);                          /* Port Mapping control register */
1336
 
1337
#define  PMAPKEY               (0x2D52)       /* Port Mapping Key */
1338
#define  PMAPPWD               PMAPKEYID      /* Legacy Definition: Mapping Key register */
1339
#define  PMAPPW                (0x2D52)       /* Legacy Definition: Port Mapping Password */
1340
 
1341
/* PMAPCTL Control Bits */
1342
#define PMAPLOCKED             (0x0001)       /* Port Mapping Lock bit. Read only */
1343
#define PMAPRECFG              (0x0002)       /* Port Mapping re-configuration control bit */
1344
 
1345
/* PMAPCTL Control Bits */
1346
#define PMAPLOCKED_L           (0x0001)       /* Port Mapping Lock bit. Read only */
1347
#define PMAPRECFG_L            (0x0002)       /* Port Mapping re-configuration control bit */
1348
 
1349
/* PMAPCTL Control Bits */
1350
 
1351
/************************************************************
1352
* PORT 4 MAPPING CONTROLLER
1353
************************************************************/
1354
#define __MSP430_HAS_PORT4_MAPPING__                /* Definition to show that Module is available */
1355
#define __MSP430_BASEADDRESS_PORT4_MAPPING__ 0x01E0
1356
 
1357
SFR_16BIT(P4MAP01);                           /* Port P4.0/1 mapping register */
1358
SFR_8BIT(P4MAP01_L);                          /* Port P4.0/1 mapping register */
1359
SFR_8BIT(P4MAP01_H);                          /* Port P4.0/1 mapping register */
1360
SFR_16BIT(P4MAP23);                           /* Port P4.2/3 mapping register */
1361
SFR_8BIT(P4MAP23_L);                          /* Port P4.2/3 mapping register */
1362
SFR_8BIT(P4MAP23_H);                          /* Port P4.2/3 mapping register */
1363
SFR_16BIT(P4MAP45);                           /* Port P4.4/5 mapping register */
1364
SFR_8BIT(P4MAP45_L);                          /* Port P4.4/5 mapping register */
1365
SFR_8BIT(P4MAP45_H);                          /* Port P4.4/5 mapping register */
1366
SFR_16BIT(P4MAP67);                           /* Port P4.6/7 mapping register */
1367
SFR_8BIT(P4MAP67_L);                          /* Port P4.6/7 mapping register */
1368
SFR_8BIT(P4MAP67_H);                          /* Port P4.6/7 mapping register */
1369
 
1370
#define  P4MAP0                P4MAP01_L      /* Port P4.0 mapping register */
1371
#define  P4MAP1                P4MAP01_H      /* Port P4.1 mapping register */
1372
#define  P4MAP2                P4MAP23_L      /* Port P4.2 mapping register */
1373
#define  P4MAP3                P4MAP23_H      /* Port P4.3 mapping register */
1374
#define  P4MAP4                P4MAP45_L      /* Port P4.4 mapping register */
1375
#define  P4MAP5                P4MAP45_H      /* Port P4.5 mapping register */
1376
#define  P4MAP6                P4MAP67_L      /* Port P4.6 mapping register */
1377
#define  P4MAP7                P4MAP67_H      /* Port P4.7 mapping register */
1378
 
1379
#define PM_NONE                0
1380
#define PM_CBOUT0              1
1381
#define PM_TB0CLK              1
1382
#define PM_DMAE0               2
1383
#define PM_SVMOUT              3
1384
#define PM_TB0OUTH             3
1385
#define PM_TB0CCR0A            4
1386
#define PM_TB0CCR1A            5
1387
#define PM_TB0CCR2A            6
1388
#define PM_TB0CCR3A            7
1389
#define PM_TB0CCR4A            8
1390
#define PM_TB0CCR5A            9
1391
#define PM_TB0CCR6A            10
1392
#define PM_UCA1RXD             11
1393
#define PM_UCA1SOMI            11
1394
#define PM_UCA1TXD             12
1395
#define PM_UCA1SIMO            12
1396
#define PM_UCA1CLK             13
1397
#define PM_UCB1STE             13
1398
#define PM_UCB1SOMI            14
1399
#define PM_UCB1SCL             14
1400
#define PM_UCB1SIMO            15
1401
#define PM_UCB1SDA             15
1402
#define PM_UCB1CLK             16
1403
#define PM_UCA1STE             16
1404
#define PM_CBOUT1              17
1405
#define PM_MCLK                18
1406
#define PM_ANALOG              31
1407
 
1408
/************************************************************
1409
* PMM - Power Management System
1410
************************************************************/
1411
#define __MSP430_HAS_PMM__                    /* Definition to show that Module is available */
1412
#define __MSP430_BASEADDRESS_PMM__ 0x0120
1413
 
1414
SFR_16BIT(PMMCTL0);                           /* PMM Control 0 */
1415
SFR_8BIT(PMMCTL0_L);                          /* PMM Control 0 */
1416
SFR_8BIT(PMMCTL0_H);                          /* PMM Control 0 */
1417
SFR_16BIT(PMMCTL1);                           /* PMM Control 1 */
1418
SFR_8BIT(PMMCTL1_L);                          /* PMM Control 1 */
1419
SFR_8BIT(PMMCTL1_H);                          /* PMM Control 1 */
1420
SFR_16BIT(SVSMHCTL);                          /* SVS and SVM high side control register */
1421
SFR_8BIT(SVSMHCTL_L);                         /* SVS and SVM high side control register */
1422
SFR_8BIT(SVSMHCTL_H);                         /* SVS and SVM high side control register */
1423
SFR_16BIT(SVSMLCTL);                          /* SVS and SVM low side control register */
1424
SFR_8BIT(SVSMLCTL_L);                         /* SVS and SVM low side control register */
1425
SFR_8BIT(SVSMLCTL_H);                         /* SVS and SVM low side control register */
1426
SFR_16BIT(SVSMIO);                            /* SVSIN and SVSOUT control register */
1427
SFR_8BIT(SVSMIO_L);                           /* SVSIN and SVSOUT control register */
1428
SFR_8BIT(SVSMIO_H);                           /* SVSIN and SVSOUT control register */
1429
SFR_16BIT(PMMIFG);                            /* PMM Interrupt Flag */
1430
SFR_8BIT(PMMIFG_L);                           /* PMM Interrupt Flag */
1431
SFR_8BIT(PMMIFG_H);                           /* PMM Interrupt Flag */
1432
SFR_16BIT(PMMRIE);                            /* PMM and RESET Interrupt Enable */
1433
SFR_8BIT(PMMRIE_L);                           /* PMM and RESET Interrupt Enable */
1434
SFR_8BIT(PMMRIE_H);                           /* PMM and RESET Interrupt Enable */
1435
SFR_16BIT(PM5CTL0);                           /* PMM Power Mode 5 Control Register 0 */
1436
SFR_8BIT(PM5CTL0_L);                          /* PMM Power Mode 5 Control Register 0 */
1437
SFR_8BIT(PM5CTL0_H);                          /* PMM Power Mode 5 Control Register 0 */
1438
 
1439
#define PMMPW                  (0xA500)       /* PMM Register Write Password */
1440
#define PMMPW_H                (0xA5)         /* PMM Register Write Password for high word access */
1441
 
1442
/* PMMCTL0 Control Bits */
1443
#define PMMCOREV0              (0x0001)       /* PMM Core Voltage Bit: 0 */
1444
#define PMMCOREV1              (0x0002)       /* PMM Core Voltage Bit: 1 */
1445
#define PMMSWBOR               (0x0004)       /* PMM Software BOR */
1446
#define PMMSWPOR               (0x0008)       /* PMM Software POR */
1447
#define PMMREGOFF              (0x0010)       /* PMM Turn Regulator off */
1448
#define PMMHPMRE               (0x0080)       /* PMM Global High Power Module Request Enable */
1449
 
1450
/* PMMCTL0 Control Bits */
1451
#define PMMCOREV0_L            (0x0001)       /* PMM Core Voltage Bit: 0 */
1452
#define PMMCOREV1_L            (0x0002)       /* PMM Core Voltage Bit: 1 */
1453
#define PMMSWBOR_L             (0x0004)       /* PMM Software BOR */
1454
#define PMMSWPOR_L             (0x0008)       /* PMM Software POR */
1455
#define PMMREGOFF_L            (0x0010)       /* PMM Turn Regulator off */
1456
#define PMMHPMRE_L             (0x0080)       /* PMM Global High Power Module Request Enable */
1457
 
1458
/* PMMCTL0 Control Bits */
1459
 
1460
#define PMMCOREV_0             (0x0000)       /* PMM Core Voltage 0 (1.35V) */
1461
#define PMMCOREV_1             (0x0001)       /* PMM Core Voltage 1 (1.55V) */
1462
#define PMMCOREV_2             (0x0002)       /* PMM Core Voltage 2 (1.75V) */
1463
#define PMMCOREV_3             (0x0003)       /* PMM Core Voltage 3 (1.85V) */
1464
 
1465
/* PMMCTL1 Control Bits */
1466
#define PMMREFMD               (0x0001)       /* PMM Reference Mode */
1467
#define PMMCMD0                (0x0010)       /* PMM Voltage Regulator Current Mode Bit: 0 */
1468
#define PMMCMD1                (0x0020)       /* PMM Voltage Regulator Current Mode Bit: 1 */
1469
 
1470
/* PMMCTL1 Control Bits */
1471
#define PMMREFMD_L             (0x0001)       /* PMM Reference Mode */
1472
#define PMMCMD0_L              (0x0010)       /* PMM Voltage Regulator Current Mode Bit: 0 */
1473
#define PMMCMD1_L              (0x0020)       /* PMM Voltage Regulator Current Mode Bit: 1 */
1474
 
1475
/* PMMCTL1 Control Bits */
1476
 
1477
/* SVSMHCTL Control Bits */
1478
#define SVSMHRRL0              (0x0001)       /* SVS and SVM high side Reset Release Voltage Level Bit: 0 */
1479
#define SVSMHRRL1              (0x0002)       /* SVS and SVM high side Reset Release Voltage Level Bit: 1 */
1480
#define SVSMHRRL2              (0x0004)       /* SVS and SVM high side Reset Release Voltage Level Bit: 2 */
1481
#define SVSMHDLYST             (0x0008)       /* SVS and SVM high side delay status */
1482
#define SVSHMD                 (0x0010)       /* SVS high side mode */
1483
#define SVSMHEVM               (0x0040)       /* SVS and SVM high side event mask */
1484
#define SVSMHACE               (0x0080)       /* SVS and SVM high side auto control enable */
1485
#define SVSHRVL0               (0x0100)       /* SVS high side reset voltage level Bit: 0 */
1486
#define SVSHRVL1               (0x0200)       /* SVS high side reset voltage level Bit: 1 */
1487
#define SVSHE                  (0x0400)       /* SVS high side enable */
1488
#define SVSHFP                 (0x0800)       /* SVS high side full performace mode */
1489
#define SVMHOVPE               (0x1000)       /* SVM high side over-voltage enable */
1490
#define SVMHE                  (0x4000)       /* SVM high side enable */
1491
#define SVMHFP                 (0x8000)       /* SVM high side full performace mode */
1492
 
1493
/* SVSMHCTL Control Bits */
1494
#define SVSMHRRL0_L            (0x0001)       /* SVS and SVM high side Reset Release Voltage Level Bit: 0 */
1495
#define SVSMHRRL1_L            (0x0002)       /* SVS and SVM high side Reset Release Voltage Level Bit: 1 */
1496
#define SVSMHRRL2_L            (0x0004)       /* SVS and SVM high side Reset Release Voltage Level Bit: 2 */
1497
#define SVSMHDLYST_L           (0x0008)       /* SVS and SVM high side delay status */
1498
#define SVSHMD_L               (0x0010)       /* SVS high side mode */
1499
#define SVSMHEVM_L             (0x0040)       /* SVS and SVM high side event mask */
1500
#define SVSMHACE_L             (0x0080)       /* SVS and SVM high side auto control enable */
1501
 
1502
/* SVSMHCTL Control Bits */
1503
#define SVSHRVL0_H             (0x0001)       /* SVS high side reset voltage level Bit: 0 */
1504
#define SVSHRVL1_H             (0x0002)       /* SVS high side reset voltage level Bit: 1 */
1505
#define SVSHE_H                (0x0004)       /* SVS high side enable */
1506
#define SVSHFP_H               (0x0008)       /* SVS high side full performace mode */
1507
#define SVMHOVPE_H             (0x0010)       /* SVM high side over-voltage enable */
1508
#define SVMHE_H                (0x0040)       /* SVM high side enable */
1509
#define SVMHFP_H               (0x0080)       /* SVM high side full performace mode */
1510
 
1511
#define SVSMHRRL_0             (0x0000)       /* SVS and SVM high side Reset Release Voltage Level 0 */
1512
#define SVSMHRRL_1             (0x0001)       /* SVS and SVM high side Reset Release Voltage Level 1 */
1513
#define SVSMHRRL_2             (0x0002)       /* SVS and SVM high side Reset Release Voltage Level 2 */
1514
#define SVSMHRRL_3             (0x0003)       /* SVS and SVM high side Reset Release Voltage Level 3 */
1515
#define SVSMHRRL_4             (0x0004)       /* SVS and SVM high side Reset Release Voltage Level 4 */
1516
#define SVSMHRRL_5             (0x0005)       /* SVS and SVM high side Reset Release Voltage Level 5 */
1517
#define SVSMHRRL_6             (0x0006)       /* SVS and SVM high side Reset Release Voltage Level 6 */
1518
#define SVSMHRRL_7             (0x0007)       /* SVS and SVM high side Reset Release Voltage Level 7 */
1519
 
1520
#define SVSHRVL_0              (0x0000)       /* SVS high side Reset Release Voltage Level 0 */
1521
#define SVSHRVL_1              (0x0100)       /* SVS high side Reset Release Voltage Level 1 */
1522
#define SVSHRVL_2              (0x0200)       /* SVS high side Reset Release Voltage Level 2 */
1523
#define SVSHRVL_3              (0x0300)       /* SVS high side Reset Release Voltage Level 3 */
1524
 
1525
/* SVSMLCTL Control Bits */
1526
#define SVSMLRRL0              (0x0001)       /* SVS and SVM low side Reset Release Voltage Level Bit: 0 */
1527
#define SVSMLRRL1              (0x0002)       /* SVS and SVM low side Reset Release Voltage Level Bit: 1 */
1528
#define SVSMLRRL2              (0x0004)       /* SVS and SVM low side Reset Release Voltage Level Bit: 2 */
1529
#define SVSMLDLYST             (0x0008)       /* SVS and SVM low side delay status */
1530
#define SVSLMD                 (0x0010)       /* SVS low side mode */
1531
#define SVSMLEVM               (0x0040)       /* SVS and SVM low side event mask */
1532
#define SVSMLACE               (0x0080)       /* SVS and SVM low side auto control enable */
1533
#define SVSLRVL0               (0x0100)       /* SVS low side reset voltage level Bit: 0 */
1534
#define SVSLRVL1               (0x0200)       /* SVS low side reset voltage level Bit: 1 */
1535
#define SVSLE                  (0x0400)       /* SVS low side enable */
1536
#define SVSLFP                 (0x0800)       /* SVS low side full performace mode */
1537
#define SVMLOVPE               (0x1000)       /* SVM low side over-voltage enable */
1538
#define SVMLE                  (0x4000)       /* SVM low side enable */
1539
#define SVMLFP                 (0x8000)       /* SVM low side full performace mode */
1540
 
1541
/* SVSMLCTL Control Bits */
1542
#define SVSMLRRL0_L            (0x0001)       /* SVS and SVM low side Reset Release Voltage Level Bit: 0 */
1543
#define SVSMLRRL1_L            (0x0002)       /* SVS and SVM low side Reset Release Voltage Level Bit: 1 */
1544
#define SVSMLRRL2_L            (0x0004)       /* SVS and SVM low side Reset Release Voltage Level Bit: 2 */
1545
#define SVSMLDLYST_L           (0x0008)       /* SVS and SVM low side delay status */
1546
#define SVSLMD_L               (0x0010)       /* SVS low side mode */
1547
#define SVSMLEVM_L             (0x0040)       /* SVS and SVM low side event mask */
1548
#define SVSMLACE_L             (0x0080)       /* SVS and SVM low side auto control enable */
1549
 
1550
/* SVSMLCTL Control Bits */
1551
#define SVSLRVL0_H             (0x0001)       /* SVS low side reset voltage level Bit: 0 */
1552
#define SVSLRVL1_H             (0x0002)       /* SVS low side reset voltage level Bit: 1 */
1553
#define SVSLE_H                (0x0004)       /* SVS low side enable */
1554
#define SVSLFP_H               (0x0008)       /* SVS low side full performace mode */
1555
#define SVMLOVPE_H             (0x0010)       /* SVM low side over-voltage enable */
1556
#define SVMLE_H                (0x0040)       /* SVM low side enable */
1557
#define SVMLFP_H               (0x0080)       /* SVM low side full performace mode */
1558
 
1559
#define SVSMLRRL_0             (0x0000)       /* SVS and SVM low side Reset Release Voltage Level 0 */
1560
#define SVSMLRRL_1             (0x0001)       /* SVS and SVM low side Reset Release Voltage Level 1 */
1561
#define SVSMLRRL_2             (0x0002)       /* SVS and SVM low side Reset Release Voltage Level 2 */
1562
#define SVSMLRRL_3             (0x0003)       /* SVS and SVM low side Reset Release Voltage Level 3 */
1563
#define SVSMLRRL_4             (0x0004)       /* SVS and SVM low side Reset Release Voltage Level 4 */
1564
#define SVSMLRRL_5             (0x0005)       /* SVS and SVM low side Reset Release Voltage Level 5 */
1565
#define SVSMLRRL_6             (0x0006)       /* SVS and SVM low side Reset Release Voltage Level 6 */
1566
#define SVSMLRRL_7             (0x0007)       /* SVS and SVM low side Reset Release Voltage Level 7 */
1567
 
1568
#define SVSLRVL_0              (0x0000)       /* SVS low side Reset Release Voltage Level 0 */
1569
#define SVSLRVL_1              (0x0100)       /* SVS low side Reset Release Voltage Level 1 */
1570
#define SVSLRVL_2              (0x0200)       /* SVS low side Reset Release Voltage Level 2 */
1571
#define SVSLRVL_3              (0x0300)       /* SVS low side Reset Release Voltage Level 3 */
1572
 
1573
/* SVSMIO Control Bits */
1574
#define SVMLOE                 (0x0008)       /* SVM low side output enable */
1575
#define SVMLVLROE              (0x0010)       /* SVM low side voltage level reached output enable */
1576
#define SVMOUTPOL              (0x0020)       /* SVMOUT pin polarity */
1577
#define SVMHOE                 (0x0800)       /* SVM high side output enable */
1578
#define SVMHVLROE              (0x1000)       /* SVM high side voltage level reached output enable */
1579
 
1580
/* SVSMIO Control Bits */
1581
#define SVMLOE_L               (0x0008)       /* SVM low side output enable */
1582
#define SVMLVLROE_L            (0x0010)       /* SVM low side voltage level reached output enable */
1583
#define SVMOUTPOL_L            (0x0020)       /* SVMOUT pin polarity */
1584
 
1585
/* SVSMIO Control Bits */
1586
#define SVMHOE_H               (0x0008)       /* SVM high side output enable */
1587
#define SVMHVLROE_H            (0x0010)       /* SVM high side voltage level reached output enable */
1588
 
1589
/* PMMIFG Control Bits */
1590
#define SVSMLDLYIFG            (0x0001)       /* SVS and SVM low side Delay expired interrupt flag */
1591
#define SVMLIFG                (0x0002)       /* SVM low side interrupt flag */
1592
#define SVMLVLRIFG             (0x0004)       /* SVM low side Voltage Level Reached interrupt flag */
1593
#define SVSMHDLYIFG            (0x0010)       /* SVS and SVM high side Delay expired interrupt flag */
1594
#define SVMHIFG                (0x0020)       /* SVM high side interrupt flag */
1595
#define SVMHVLRIFG             (0x0040)       /* SVM high side Voltage Level Reached interrupt flag */
1596
#define PMMBORIFG              (0x0100)       /* PMM Software BOR interrupt flag */
1597
#define PMMRSTIFG              (0x0200)       /* PMM RESET pin interrupt flag */
1598
#define PMMPORIFG              (0x0400)       /* PMM Software POR interrupt flag */
1599
#define SVSHIFG                (0x1000)       /* SVS low side interrupt flag */
1600
#define SVSLIFG                (0x2000)       /* SVS high side interrupt flag */
1601
#define PMMLPM5IFG             (0x8000)       /* LPM5 indication Flag */
1602
 
1603
/* PMMIFG Control Bits */
1604
#define SVSMLDLYIFG_L          (0x0001)       /* SVS and SVM low side Delay expired interrupt flag */
1605
#define SVMLIFG_L              (0x0002)       /* SVM low side interrupt flag */
1606
#define SVMLVLRIFG_L           (0x0004)       /* SVM low side Voltage Level Reached interrupt flag */
1607
#define SVSMHDLYIFG_L          (0x0010)       /* SVS and SVM high side Delay expired interrupt flag */
1608
#define SVMHIFG_L              (0x0020)       /* SVM high side interrupt flag */
1609
#define SVMHVLRIFG_L           (0x0040)       /* SVM high side Voltage Level Reached interrupt flag */
1610
 
1611
/* PMMIFG Control Bits */
1612
#define PMMBORIFG_H            (0x0001)       /* PMM Software BOR interrupt flag */
1613
#define PMMRSTIFG_H            (0x0002)       /* PMM RESET pin interrupt flag */
1614
#define PMMPORIFG_H            (0x0004)       /* PMM Software POR interrupt flag */
1615
#define SVSHIFG_H              (0x0010)       /* SVS low side interrupt flag */
1616
#define SVSLIFG_H              (0x0020)       /* SVS high side interrupt flag */
1617
#define PMMLPM5IFG_H           (0x0080)       /* LPM5 indication Flag */
1618
 
1619
#define PMMRSTLPM5IFG          PMMLPM5IFG     /* LPM5 indication Flag */
1620
 
1621
/* PMMIE and RESET Control Bits */
1622
#define SVSMLDLYIE             (0x0001)       /* SVS and SVM low side Delay expired interrupt enable */
1623
#define SVMLIE                 (0x0002)       /* SVM low side interrupt enable */
1624
#define SVMLVLRIE              (0x0004)       /* SVM low side Voltage Level Reached interrupt enable */
1625
#define SVSMHDLYIE             (0x0010)       /* SVS and SVM high side Delay expired interrupt enable */
1626
#define SVMHIE                 (0x0020)       /* SVM high side interrupt enable */
1627
#define SVMHVLRIE              (0x0040)       /* SVM high side Voltage Level Reached interrupt enable */
1628
#define SVSLPE                 (0x0100)       /* SVS low side POR enable */
1629
#define SVMLVLRPE              (0x0200)       /* SVM low side Voltage Level reached POR enable */
1630
#define SVSHPE                 (0x1000)       /* SVS high side POR enable */
1631
#define SVMHVLRPE              (0x2000)       /* SVM high side Voltage Level reached POR enable */
1632
 
1633
/* PMMIE and RESET Control Bits */
1634
#define SVSMLDLYIE_L           (0x0001)       /* SVS and SVM low side Delay expired interrupt enable */
1635
#define SVMLIE_L               (0x0002)       /* SVM low side interrupt enable */
1636
#define SVMLVLRIE_L            (0x0004)       /* SVM low side Voltage Level Reached interrupt enable */
1637
#define SVSMHDLYIE_L           (0x0010)       /* SVS and SVM high side Delay expired interrupt enable */
1638
#define SVMHIE_L               (0x0020)       /* SVM high side interrupt enable */
1639
#define SVMHVLRIE_L            (0x0040)       /* SVM high side Voltage Level Reached interrupt enable */
1640
 
1641
/* PMMIE and RESET Control Bits */
1642
#define SVSLPE_H               (0x0001)       /* SVS low side POR enable */
1643
#define SVMLVLRPE_H            (0x0002)       /* SVM low side Voltage Level reached POR enable */
1644
#define SVSHPE_H               (0x0010)       /* SVS high side POR enable */
1645
#define SVMHVLRPE_H            (0x0020)       /* SVM high side Voltage Level reached POR enable */
1646
 
1647
/* PM5CTL0 Power Mode 5 Control Bits */
1648
#define LOCKLPM5               (0x0001)       /* Lock I/O pin configuration upon entry/exit to/from LPM5 */
1649
 
1650
/* PM5CTL0 Power Mode 5 Control Bits */
1651
#define LOCKLPM5_L             (0x0001)       /* Lock I/O pin configuration upon entry/exit to/from LPM5 */
1652
 
1653
/* PM5CTL0 Power Mode 5 Control Bits */
1654
#define LOCKIO                 LOCKLPM5       /* Lock I/O pin configuration upon entry/exit to/from LPM5 */
1655
 
1656
/*************************************************************
1657
* RAM Control Module
1658
*************************************************************/
1659
#define __MSP430_HAS_RC__                     /* Definition to show that Module is available */
1660
#define __MSP430_BASEADDRESS_RC__ 0x0158
1661
 
1662
SFR_16BIT(RCCTL0);                            /* Ram Controller Control Register */
1663
SFR_8BIT(RCCTL0_L);                           /* Ram Controller Control Register */
1664
SFR_8BIT(RCCTL0_H);                           /* Ram Controller Control Register */
1665
 
1666
/* RCCTL0 Control Bits */
1667
#define RCRS0OFF               (0x0001)       /* RAM Controller RAM Sector 0 Off */
1668
#define RCRS1OFF               (0x0002)       /* RAM Controller RAM Sector 1 Off */
1669
#define RCRS2OFF               (0x0004)       /* RAM Controller RAM Sector 2 Off */
1670
#define RCRS3OFF               (0x0008)       /* RAM Controller RAM Sector 3 Off */
1671
#define RCRS7OFF               (0x0080)       /* RAM Controller RAM Sector 7 (USB) Off */
1672
 
1673
/* RCCTL0 Control Bits */
1674
#define RCRS0OFF_L             (0x0001)       /* RAM Controller RAM Sector 0 Off */
1675
#define RCRS1OFF_L             (0x0002)       /* RAM Controller RAM Sector 1 Off */
1676
#define RCRS2OFF_L             (0x0004)       /* RAM Controller RAM Sector 2 Off */
1677
#define RCRS3OFF_L             (0x0008)       /* RAM Controller RAM Sector 3 Off */
1678
#define RCRS7OFF_L             (0x0080)       /* RAM Controller RAM Sector 7 (USB) Off */
1679
 
1680
/* RCCTL0 Control Bits */
1681
 
1682
#define RCKEY                  (0x5A00)
1683
 
1684
/************************************************************
1685
* Shared Reference
1686
************************************************************/
1687
#define __MSP430_HAS_REF__                    /* Definition to show that Module is available */
1688
#define __MSP430_BASEADDRESS_REF__ 0x01B0
1689
 
1690
SFR_16BIT(REFCTL0);                           /* REF Shared Reference control register 0 */
1691
SFR_8BIT(REFCTL0_L);                          /* REF Shared Reference control register 0 */
1692
SFR_8BIT(REFCTL0_H);                          /* REF Shared Reference control register 0 */
1693
 
1694
/* REFCTL0 Control Bits */
1695
#define REFON                  (0x0001)       /* REF Reference On */
1696
#define REFOUT                 (0x0002)       /* REF Reference output Buffer On */
1697
//#define RESERVED            (0x0004)  /* Reserved */
1698
#define REFTCOFF               (0x0008)       /* REF Temp.Sensor off */
1699
#define REFVSEL0               (0x0010)       /* REF Reference Voltage Level Select Bit:0 */
1700
#define REFVSEL1               (0x0020)       /* REF Reference Voltage Level Select Bit:1 */
1701
//#define RESERVED            (0x0040)  /* Reserved */
1702
#define REFMSTR                (0x0080)       /* REF Master Control */
1703
#define REFGENACT              (0x0100)       /* REF Reference generator active */
1704
#define REFBGACT               (0x0200)       /* REF Reference bandgap active */
1705
#define REFGENBUSY             (0x0400)       /* REF Reference generator busy */
1706
#define BGMODE                 (0x0800)       /* REF Bandgap mode */
1707
//#define RESERVED            (0x1000)  /* Reserved */
1708
//#define RESERVED            (0x2000)  /* Reserved */
1709
//#define RESERVED            (0x4000)  /* Reserved */
1710
//#define RESERVED            (0x8000)  /* Reserved */
1711
 
1712
/* REFCTL0 Control Bits */
1713
#define REFON_L                (0x0001)       /* REF Reference On */
1714
#define REFOUT_L               (0x0002)       /* REF Reference output Buffer On */
1715
//#define RESERVED            (0x0004)  /* Reserved */
1716
#define REFTCOFF_L             (0x0008)       /* REF Temp.Sensor off */
1717
#define REFVSEL0_L             (0x0010)       /* REF Reference Voltage Level Select Bit:0 */
1718
#define REFVSEL1_L             (0x0020)       /* REF Reference Voltage Level Select Bit:1 */
1719
//#define RESERVED            (0x0040)  /* Reserved */
1720
#define REFMSTR_L              (0x0080)       /* REF Master Control */
1721
//#define RESERVED            (0x1000)  /* Reserved */
1722
//#define RESERVED            (0x2000)  /* Reserved */
1723
//#define RESERVED            (0x4000)  /* Reserved */
1724
//#define RESERVED            (0x8000)  /* Reserved */
1725
 
1726
/* REFCTL0 Control Bits */
1727
//#define RESERVED            (0x0004)  /* Reserved */
1728
//#define RESERVED            (0x0040)  /* Reserved */
1729
#define REFGENACT_H            (0x0001)       /* REF Reference generator active */
1730
#define REFBGACT_H             (0x0002)       /* REF Reference bandgap active */
1731
#define REFGENBUSY_H           (0x0004)       /* REF Reference generator busy */
1732
#define BGMODE_H               (0x0008)       /* REF Bandgap mode */
1733
//#define RESERVED            (0x1000)  /* Reserved */
1734
//#define RESERVED            (0x2000)  /* Reserved */
1735
//#define RESERVED            (0x4000)  /* Reserved */
1736
//#define RESERVED            (0x8000)  /* Reserved */
1737
 
1738
#define REFVSEL_0              (0x0000)       /* REF Reference Voltage Level Select 1.5V */
1739
#define REFVSEL_1              (0x0010)       /* REF Reference Voltage Level Select 2.0V */
1740
#define REFVSEL_2              (0x0020)       /* REF Reference Voltage Level Select 2.5V */
1741
#define REFVSEL_3              (0x0030)       /* REF Reference Voltage Level Select 2.5V */
1742
 
1743
/************************************************************
1744
* Real Time Clock
1745
************************************************************/
1746
#define __MSP430_HAS_RTC__                    /* Definition to show that Module is available */
1747
#define __MSP430_BASEADDRESS_RTC__ 0x04A0
1748
 
1749
SFR_16BIT(RTCCTL01);                          /* Real Timer Control 0/1 */
1750
SFR_8BIT(RTCCTL01_L);                         /* Real Timer Control 0/1 */
1751
SFR_8BIT(RTCCTL01_H);                         /* Real Timer Control 0/1 */
1752
SFR_16BIT(RTCCTL23);                          /* Real Timer Control 2/3 */
1753
SFR_8BIT(RTCCTL23_L);                         /* Real Timer Control 2/3 */
1754
SFR_8BIT(RTCCTL23_H);                         /* Real Timer Control 2/3 */
1755
SFR_16BIT(RTCPS0CTL);                         /* Real Timer Prescale Timer 0 Control */
1756
SFR_8BIT(RTCPS0CTL_L);                        /* Real Timer Prescale Timer 0 Control */
1757
SFR_8BIT(RTCPS0CTL_H);                        /* Real Timer Prescale Timer 0 Control */
1758
SFR_16BIT(RTCPS1CTL);                         /* Real Timer Prescale Timer 1 Control */
1759
SFR_8BIT(RTCPS1CTL_L);                        /* Real Timer Prescale Timer 1 Control */
1760
SFR_8BIT(RTCPS1CTL_H);                        /* Real Timer Prescale Timer 1 Control */
1761
SFR_16BIT(RTCPS);                             /* Real Timer Prescale Timer Control */
1762
SFR_8BIT(RTCPS_L);                            /* Real Timer Prescale Timer Control */
1763
SFR_8BIT(RTCPS_H);                            /* Real Timer Prescale Timer Control */
1764
SFR_16BIT(RTCIV);                             /* Real Time Clock Interrupt Vector */
1765
SFR_16BIT(RTCTIM0);                           /* Real Time Clock Time 0 */
1766
SFR_8BIT(RTCTIM0_L);                          /* Real Time Clock Time 0 */
1767
SFR_8BIT(RTCTIM0_H);                          /* Real Time Clock Time 0 */
1768
SFR_16BIT(RTCTIM1);                           /* Real Time Clock Time 1 */
1769
SFR_8BIT(RTCTIM1_L);                          /* Real Time Clock Time 1 */
1770
SFR_8BIT(RTCTIM1_H);                          /* Real Time Clock Time 1 */
1771
SFR_16BIT(RTCDATE);                           /* Real Time Clock Date */
1772
SFR_8BIT(RTCDATE_L);                          /* Real Time Clock Date */
1773
SFR_8BIT(RTCDATE_H);                          /* Real Time Clock Date */
1774
SFR_16BIT(RTCYEAR);                           /* Real Time Clock Year */
1775
SFR_8BIT(RTCYEAR_L);                          /* Real Time Clock Year */
1776
SFR_8BIT(RTCYEAR_H);                          /* Real Time Clock Year */
1777
SFR_16BIT(RTCAMINHR);                         /* Real Time Clock Alarm Min/Hour */
1778
SFR_8BIT(RTCAMINHR_L);                        /* Real Time Clock Alarm Min/Hour */
1779
SFR_8BIT(RTCAMINHR_H);                        /* Real Time Clock Alarm Min/Hour */
1780
SFR_16BIT(RTCADOWDAY);                        /* Real Time Clock Alarm day of week/day */
1781
SFR_8BIT(RTCADOWDAY_L);                       /* Real Time Clock Alarm day of week/day */
1782
SFR_8BIT(RTCADOWDAY_H);                       /* Real Time Clock Alarm day of week/day */
1783
 
1784
#define RTCCTL0                RTCCTL01_L     /* Real Time Clock Control 0 */
1785
#define RTCCTL1                RTCCTL01_H     /* Real Time Clock Control 1 */
1786
#define RTCCTL2                RTCCTL23_L     /* Real Time Clock Control 2 */
1787
#define RTCCTL3                RTCCTL23_H     /* Real Time Clock Control 3 */
1788
#define RTCNT12                RTCTIM0
1789
#define RTCNT34                RTCTIM1
1790
#define RTCNT1                 RTCTIM0_L
1791
#define RTCNT2                 RTCTIM0_H
1792
#define RTCNT3                 RTCTIM1_L
1793
#define RTCNT4                 RTCTIM1_H
1794
#define RTCSEC                 RTCTIM0_L
1795
#define RTCMIN                 RTCTIM0_H
1796
#define RTCHOUR                RTCTIM1_L
1797
#define RTCDOW                 RTCTIM1_H
1798
#define RTCDAY                 RTCDATE_L
1799
#define RTCMON                 RTCDATE_H
1800
#define RTCYEARL               RTCYEAR_L
1801
#define RTCYEARH               RTCYEAR_H
1802
#define RT0PS                  RTCPS_L
1803
#define RT1PS                  RTCPS_H
1804
#define RTCAMIN                RTCAMINHR_L    /* Real Time Clock Alarm Min */
1805
#define RTCAHOUR               RTCAMINHR_H    /* Real Time Clock Alarm Hour */
1806
#define RTCADOW                RTCADOWDAY_L   /* Real Time Clock Alarm day of week */
1807
#define RTCADAY                RTCADOWDAY_H   /* Real Time Clock Alarm day */
1808
 
1809
/* RTCCTL01 Control Bits */
1810
#define RTCBCD                 (0x8000)       /* RTC BCD  0:Binary / 1:BCD */
1811
#define RTCHOLD                (0x4000)       /* RTC Hold */
1812
#define RTCMODE                (0x2000)       /* RTC Mode 0:Counter / 1: Calendar */
1813
#define RTCRDY                 (0x1000)       /* RTC Ready */
1814
#define RTCSSEL1               (0x0800)       /* RTC Source Select 1 */
1815
#define RTCSSEL0               (0x0400)       /* RTC Source Select 0 */
1816
#define RTCTEV1                (0x0200)       /* RTC Time Event 1 */
1817
#define RTCTEV0                (0x0100)       /* RTC Time Event 0 */
1818
//#define Reserved          (0x0080)
1819
#define RTCTEVIE               (0x0040)       /* RTC Time Event Interrupt Enable Flag */
1820
#define RTCAIE                 (0x0020)       /* RTC Alarm Interrupt Enable Flag */
1821
#define RTCRDYIE               (0x0010)       /* RTC Ready Interrupt Enable Flag */
1822
//#define Reserved          (0x0008)
1823
#define RTCTEVIFG              (0x0004)       /* RTC Time Event Interrupt Flag */
1824
#define RTCAIFG                (0x0002)       /* RTC Alarm Interrupt Flag */
1825
#define RTCRDYIFG              (0x0001)       /* RTC Ready Interrupt Flag */
1826
 
1827
/* RTCCTL01 Control Bits */
1828
//#define Reserved          (0x0080)
1829
#define RTCTEVIE_L             (0x0040)       /* RTC Time Event Interrupt Enable Flag */
1830
#define RTCAIE_L               (0x0020)       /* RTC Alarm Interrupt Enable Flag */
1831
#define RTCRDYIE_L             (0x0010)       /* RTC Ready Interrupt Enable Flag */
1832
//#define Reserved          (0x0008)
1833
#define RTCTEVIFG_L            (0x0004)       /* RTC Time Event Interrupt Flag */
1834
#define RTCAIFG_L              (0x0002)       /* RTC Alarm Interrupt Flag */
1835
#define RTCRDYIFG_L            (0x0001)       /* RTC Ready Interrupt Flag */
1836
 
1837
/* RTCCTL01 Control Bits */
1838
#define RTCBCD_H               (0x0080)       /* RTC BCD  0:Binary / 1:BCD */
1839
#define RTCHOLD_H              (0x0040)       /* RTC Hold */
1840
#define RTCMODE_H              (0x0020)       /* RTC Mode 0:Counter / 1: Calendar */
1841
#define RTCRDY_H               (0x0010)       /* RTC Ready */
1842
#define RTCSSEL1_H             (0x0008)       /* RTC Source Select 1 */
1843
#define RTCSSEL0_H             (0x0004)       /* RTC Source Select 0 */
1844
#define RTCTEV1_H              (0x0002)       /* RTC Time Event 1 */
1845
#define RTCTEV0_H              (0x0001)       /* RTC Time Event 0 */
1846
//#define Reserved          (0x0080)
1847
//#define Reserved          (0x0008)
1848
 
1849
#define RTCSSEL_0              (0x0000)       /* RTC Source Select ACLK */
1850
#define RTCSSEL_1              (0x0400)       /* RTC Source Select SMCLK */
1851
#define RTCSSEL_2              (0x0800)       /* RTC Source Select RT1PS */
1852
#define RTCSSEL_3              (0x0C00)       /* RTC Source Select RT1PS */
1853
#define RTCSSEL__ACLK          (0x0000)       /* RTC Source Select ACLK */
1854
#define RTCSSEL__SMCLK         (0x0400)       /* RTC Source Select SMCLK */
1855
#define RTCSSEL__RT1PS         (0x0800)       /* RTC Source Select RT1PS */
1856
#define RTCTEV_0               (0x0000)       /* RTC Time Event: 0 (Min. changed) */
1857
#define RTCTEV_1               (0x0100)       /* RTC Time Event: 1 (Hour changed) */
1858
#define RTCTEV_2               (0x0200)       /* RTC Time Event: 2 (12:00 changed) */
1859
#define RTCTEV_3               (0x0300)       /* RTC Time Event: 3 (00:00 changed) */
1860
#define RTCTEV__MIN            (0x0000)       /* RTC Time Event: 0 (Min. changed) */
1861
#define RTCTEV__HOUR           (0x0100)       /* RTC Time Event: 1 (Hour changed) */
1862
#define RTCTEV__1200           (0x0200)       /* RTC Time Event: 2 (12:00 changed) */
1863
#define RTCTEV__0000           (0x0300)       /* RTC Time Event: 3 (00:00 changed) */
1864
 
1865
/* RTCCTL23 Control Bits */
1866
#define RTCCALF1               (0x0200)       /* RTC Calibration Frequency Bit 1 */
1867
#define RTCCALF0               (0x0100)       /* RTC Calibration Frequency Bit 0 */
1868
#define RTCCALS                (0x0080)       /* RTC Calibration Sign */
1869
//#define Reserved          (0x0040)
1870
#define RTCCAL5                (0x0020)       /* RTC Calibration Bit 5 */
1871
#define RTCCAL4                (0x0010)       /* RTC Calibration Bit 4 */
1872
#define RTCCAL3                (0x0008)       /* RTC Calibration Bit 3 */
1873
#define RTCCAL2                (0x0004)       /* RTC Calibration Bit 2 */
1874
#define RTCCAL1                (0x0002)       /* RTC Calibration Bit 1 */
1875
#define RTCCAL0                (0x0001)       /* RTC Calibration Bit 0 */
1876
 
1877
/* RTCCTL23 Control Bits */
1878
#define RTCCALS_L              (0x0080)       /* RTC Calibration Sign */
1879
//#define Reserved          (0x0040)
1880
#define RTCCAL5_L              (0x0020)       /* RTC Calibration Bit 5 */
1881
#define RTCCAL4_L              (0x0010)       /* RTC Calibration Bit 4 */
1882
#define RTCCAL3_L              (0x0008)       /* RTC Calibration Bit 3 */
1883
#define RTCCAL2_L              (0x0004)       /* RTC Calibration Bit 2 */
1884
#define RTCCAL1_L              (0x0002)       /* RTC Calibration Bit 1 */
1885
#define RTCCAL0_L              (0x0001)       /* RTC Calibration Bit 0 */
1886
 
1887
/* RTCCTL23 Control Bits */
1888
#define RTCCALF1_H             (0x0002)       /* RTC Calibration Frequency Bit 1 */
1889
#define RTCCALF0_H             (0x0001)       /* RTC Calibration Frequency Bit 0 */
1890
//#define Reserved          (0x0040)
1891
 
1892
#define RTCCALF_0              (0x0000)       /* RTC Calibration Frequency: No Output */
1893
#define RTCCALF_1              (0x0100)       /* RTC Calibration Frequency: 512 Hz */
1894
#define RTCCALF_2              (0x0200)       /* RTC Calibration Frequency: 256 Hz */
1895
#define RTCCALF_3              (0x0300)       /* RTC Calibration Frequency: 1 Hz */
1896
 
1897
/* RTCPS0CTL Control Bits */
1898
//#define Reserved          (0x8000)
1899
#define RT0SSEL                (0x4000)       /* RTC Prescale Timer 0 Source Select 0:ACLK / 1:SMCLK */
1900
#define RT0PSDIV2              (0x2000)       /* RTC Prescale Timer 0 Clock Divide Bit: 2 */
1901
#define RT0PSDIV1              (0x1000)       /* RTC Prescale Timer 0 Clock Divide Bit: 1 */
1902
#define RT0PSDIV0              (0x0800)       /* RTC Prescale Timer 0 Clock Divide Bit: 0 */
1903
//#define Reserved          (0x0400)
1904
//#define Reserved          (0x0200)
1905
#define RT0PSHOLD              (0x0100)       /* RTC Prescale Timer 0 Hold */
1906
//#define Reserved          (0x0080)
1907
//#define Reserved          (0x0040)
1908
//#define Reserved          (0x0020)
1909
#define RT0IP2                 (0x0010)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 2 */
1910
#define RT0IP1                 (0x0008)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 1 */
1911
#define RT0IP0                 (0x0004)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 0 */
1912
#define RT0PSIE                (0x0002)       /* RTC Prescale Timer 0 Interrupt Enable Flag */
1913
#define RT0PSIFG               (0x0001)       /* RTC Prescale Timer 0 Interrupt Flag */
1914
 
1915
/* RTCPS0CTL Control Bits */
1916
//#define Reserved          (0x8000)
1917
//#define Reserved          (0x0400)
1918
//#define Reserved          (0x0200)
1919
//#define Reserved          (0x0080)
1920
//#define Reserved          (0x0040)
1921
//#define Reserved          (0x0020)
1922
#define RT0IP2_L               (0x0010)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 2 */
1923
#define RT0IP1_L               (0x0008)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 1 */
1924
#define RT0IP0_L               (0x0004)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 0 */
1925
#define RT0PSIE_L              (0x0002)       /* RTC Prescale Timer 0 Interrupt Enable Flag */
1926
#define RT0PSIFG_L             (0x0001)       /* RTC Prescale Timer 0 Interrupt Flag */
1927
 
1928
/* RTCPS0CTL Control Bits */
1929
//#define Reserved          (0x8000)
1930
#define RT0SSEL_H              (0x0040)       /* RTC Prescale Timer 0 Source Select 0:ACLK / 1:SMCLK */
1931
#define RT0PSDIV2_H            (0x0020)       /* RTC Prescale Timer 0 Clock Divide Bit: 2 */
1932
#define RT0PSDIV1_H            (0x0010)       /* RTC Prescale Timer 0 Clock Divide Bit: 1 */
1933
#define RT0PSDIV0_H            (0x0008)       /* RTC Prescale Timer 0 Clock Divide Bit: 0 */
1934
//#define Reserved          (0x0400)
1935
//#define Reserved          (0x0200)
1936
#define RT0PSHOLD_H            (0x0001)       /* RTC Prescale Timer 0 Hold */
1937
//#define Reserved          (0x0080)
1938
//#define Reserved          (0x0040)
1939
//#define Reserved          (0x0020)
1940
 
1941
#define RT0IP_0                (0x0000)       /* RTC Prescale Timer 0 Interrupt Interval /2 */
1942
#define RT0IP_1                (0x0004)       /* RTC Prescale Timer 0 Interrupt Interval /4 */
1943
#define RT0IP_2                (0x0008)       /* RTC Prescale Timer 0 Interrupt Interval /8 */
1944
#define RT0IP_3                (0x000C)       /* RTC Prescale Timer 0 Interrupt Interval /16 */
1945
#define RT0IP_4                (0x0010)       /* RTC Prescale Timer 0 Interrupt Interval /32 */
1946
#define RT0IP_5                (0x0014)       /* RTC Prescale Timer 0 Interrupt Interval /64 */
1947
#define RT0IP_6                (0x0018)       /* RTC Prescale Timer 0 Interrupt Interval /128 */
1948
#define RT0IP_7                (0x001C)       /* RTC Prescale Timer 0 Interrupt Interval /256 */
1949
 
1950
#define RT0PSDIV_0             (0x0000)       /* RTC Prescale Timer 0 Clock Divide /2 */
1951
#define RT0PSDIV_1             (0x0800)       /* RTC Prescale Timer 0 Clock Divide /4 */
1952
#define RT0PSDIV_2             (0x1000)       /* RTC Prescale Timer 0 Clock Divide /8 */
1953
#define RT0PSDIV_3             (0x1800)       /* RTC Prescale Timer 0 Clock Divide /16 */
1954
#define RT0PSDIV_4             (0x2000)       /* RTC Prescale Timer 0 Clock Divide /32 */
1955
#define RT0PSDIV_5             (0x2800)       /* RTC Prescale Timer 0 Clock Divide /64 */
1956
#define RT0PSDIV_6             (0x3000)       /* RTC Prescale Timer 0 Clock Divide /128 */
1957
#define RT0PSDIV_7             (0x3800)       /* RTC Prescale Timer 0 Clock Divide /256 */
1958
 
1959
/* RTCPS1CTL Control Bits */
1960
#define RT1SSEL1               (0x8000)       /* RTC Prescale Timer 1 Source Select Bit 1 */
1961
#define RT1SSEL0               (0x4000)       /* RTC Prescale Timer 1 Source Select Bit 0 */
1962
#define RT1PSDIV2              (0x2000)       /* RTC Prescale Timer 1 Clock Divide Bit: 2 */
1963
#define RT1PSDIV1              (0x1000)       /* RTC Prescale Timer 1 Clock Divide Bit: 1 */
1964
#define RT1PSDIV0              (0x0800)       /* RTC Prescale Timer 1 Clock Divide Bit: 0 */
1965
//#define Reserved          (0x0400)
1966
//#define Reserved          (0x0200)
1967
#define RT1PSHOLD              (0x0100)       /* RTC Prescale Timer 1 Hold */
1968
//#define Reserved          (0x0080)
1969
//#define Reserved          (0x0040)
1970
//#define Reserved          (0x0020)
1971
#define RT1IP2                 (0x0010)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 2 */
1972
#define RT1IP1                 (0x0008)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 1 */
1973
#define RT1IP0                 (0x0004)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 0 */
1974
#define RT1PSIE                (0x0002)       /* RTC Prescale Timer 1 Interrupt Enable Flag */
1975
#define RT1PSIFG               (0x0001)       /* RTC Prescale Timer 1 Interrupt Flag */
1976
 
1977
/* RTCPS1CTL Control Bits */
1978
//#define Reserved          (0x0400)
1979
//#define Reserved          (0x0200)
1980
//#define Reserved          (0x0080)
1981
//#define Reserved          (0x0040)
1982
//#define Reserved          (0x0020)
1983
#define RT1IP2_L               (0x0010)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 2 */
1984
#define RT1IP1_L               (0x0008)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 1 */
1985
#define RT1IP0_L               (0x0004)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 0 */
1986
#define RT1PSIE_L              (0x0002)       /* RTC Prescale Timer 1 Interrupt Enable Flag */
1987
#define RT1PSIFG_L             (0x0001)       /* RTC Prescale Timer 1 Interrupt Flag */
1988
 
1989
/* RTCPS1CTL Control Bits */
1990
#define RT1SSEL1_H             (0x0080)       /* RTC Prescale Timer 1 Source Select Bit 1 */
1991
#define RT1SSEL0_H             (0x0040)       /* RTC Prescale Timer 1 Source Select Bit 0 */
1992
#define RT1PSDIV2_H            (0x0020)       /* RTC Prescale Timer 1 Clock Divide Bit: 2 */
1993
#define RT1PSDIV1_H            (0x0010)       /* RTC Prescale Timer 1 Clock Divide Bit: 1 */
1994
#define RT1PSDIV0_H            (0x0008)       /* RTC Prescale Timer 1 Clock Divide Bit: 0 */
1995
//#define Reserved          (0x0400)
1996
//#define Reserved          (0x0200)
1997
#define RT1PSHOLD_H            (0x0001)       /* RTC Prescale Timer 1 Hold */
1998
//#define Reserved          (0x0080)
1999
//#define Reserved          (0x0040)
2000
//#define Reserved          (0x0020)
2001
 
2002
#define RT1IP_0                (0x0000)       /* RTC Prescale Timer 1 Interrupt Interval /2 */
2003
#define RT1IP_1                (0x0004)       /* RTC Prescale Timer 1 Interrupt Interval /4 */
2004
#define RT1IP_2                (0x0008)       /* RTC Prescale Timer 1 Interrupt Interval /8 */
2005
#define RT1IP_3                (0x000C)       /* RTC Prescale Timer 1 Interrupt Interval /16 */
2006
#define RT1IP_4                (0x0010)       /* RTC Prescale Timer 1 Interrupt Interval /32 */
2007
#define RT1IP_5                (0x0014)       /* RTC Prescale Timer 1 Interrupt Interval /64 */
2008
#define RT1IP_6                (0x0018)       /* RTC Prescale Timer 1 Interrupt Interval /128 */
2009
#define RT1IP_7                (0x001C)       /* RTC Prescale Timer 1 Interrupt Interval /256 */
2010
 
2011
#define RT1PSDIV_0             (0x0000)       /* RTC Prescale Timer 1 Clock Divide /2 */
2012
#define RT1PSDIV_1             (0x0800)       /* RTC Prescale Timer 1 Clock Divide /4 */
2013
#define RT1PSDIV_2             (0x1000)       /* RTC Prescale Timer 1 Clock Divide /8 */
2014
#define RT1PSDIV_3             (0x1800)       /* RTC Prescale Timer 1 Clock Divide /16 */
2015
#define RT1PSDIV_4             (0x2000)       /* RTC Prescale Timer 1 Clock Divide /32 */
2016
#define RT1PSDIV_5             (0x2800)       /* RTC Prescale Timer 1 Clock Divide /64 */
2017
#define RT1PSDIV_6             (0x3000)       /* RTC Prescale Timer 1 Clock Divide /128 */
2018
#define RT1PSDIV_7             (0x3800)       /* RTC Prescale Timer 1 Clock Divide /256 */
2019
 
2020
#define RT1SSEL_0              (0x0000)       /* RTC Prescale Timer Source Select ACLK */
2021
#define RT1SSEL_1              (0x4000)       /* RTC Prescale Timer Source Select SMCLK */
2022
#define RT1SSEL_2              (0x8000)       /* RTC Prescale Timer Source Select RT0PS */
2023
#define RT1SSEL_3              (0xC000)       /* RTC Prescale Timer Source Select RT0PS */
2024
 
2025
/* RTC Definitions */
2026
#define RTCIV_NONE             (0x0000)       /* No Interrupt pending */
2027
#define RTCIV_RTCRDYIFG        (0x0002)       /* RTC ready: RTCRDYIFG */
2028
#define RTCIV_RTCTEVIFG        (0x0004)       /* RTC interval timer: RTCTEVIFG */
2029
#define RTCIV_RTCAIFG          (0x0006)       /* RTC user alarm: RTCAIFG */
2030
#define RTCIV_RT0PSIFG         (0x0008)       /* RTC prescaler 0: RT0PSIFG */
2031
#define RTCIV_RT1PSIFG         (0x000A)       /* RTC prescaler 1: RT1PSIFG */
2032
 
2033
/* Legacy Definitions */
2034
#define RTC_NONE               (0x0000)       /* No Interrupt pending */
2035
#define RTC_RTCRDYIFG          (0x0002)       /* RTC ready: RTCRDYIFG */
2036
#define RTC_RTCTEVIFG          (0x0004)       /* RTC interval timer: RTCTEVIFG */
2037
#define RTC_RTCAIFG            (0x0006)       /* RTC user alarm: RTCAIFG */
2038
#define RTC_RT0PSIFG           (0x0008)       /* RTC prescaler 0: RT0PSIFG */
2039
#define RTC_RT1PSIFG           (0x000A)       /* RTC prescaler 1: RT1PSIFG */
2040
 
2041
/************************************************************
2042
* SFR - Special Function Register Module
2043
************************************************************/
2044
#define __MSP430_HAS_SFR__                    /* Definition to show that Module is available */
2045
#define __MSP430_BASEADDRESS_SFR__ 0x0100
2046
 
2047
SFR_16BIT(SFRIE1);                            /* Interrupt Enable 1 */
2048
SFR_8BIT(SFRIE1_L);                           /* Interrupt Enable 1 */
2049
SFR_8BIT(SFRIE1_H);                           /* Interrupt Enable 1 */
2050
 
2051
/* SFRIE1 Control Bits */
2052
#define WDTIE                  (0x0001)       /* WDT Interrupt Enable */
2053
#define OFIE                   (0x0002)       /* Osc Fault Enable */
2054
//#define Reserved          (0x0004)
2055
#define VMAIE                  (0x0008)       /* Vacant Memory Interrupt Enable */
2056
#define NMIIE                  (0x0010)       /* NMI Interrupt Enable */
2057
#define ACCVIE                 (0x0020)       /* Flash Access Violation Interrupt Enable */
2058
#define JMBINIE                (0x0040)       /* JTAG Mail Box input Interrupt Enable */
2059
#define JMBOUTIE               (0x0080)       /* JTAG Mail Box output Interrupt Enable */
2060
 
2061
#define WDTIE_L                (0x0001)       /* WDT Interrupt Enable */
2062
#define OFIE_L                 (0x0002)       /* Osc Fault Enable */
2063
//#define Reserved          (0x0004)
2064
#define VMAIE_L                (0x0008)       /* Vacant Memory Interrupt Enable */
2065
#define NMIIE_L                (0x0010)       /* NMI Interrupt Enable */
2066
#define ACCVIE_L               (0x0020)       /* Flash Access Violation Interrupt Enable */
2067
#define JMBINIE_L              (0x0040)       /* JTAG Mail Box input Interrupt Enable */
2068
#define JMBOUTIE_L             (0x0080)       /* JTAG Mail Box output Interrupt Enable */
2069
 
2070
//#define Reserved          (0x0004)
2071
 
2072
SFR_16BIT(SFRIFG1);                           /* Interrupt Flag 1 */
2073
SFR_8BIT(SFRIFG1_L);                          /* Interrupt Flag 1 */
2074
SFR_8BIT(SFRIFG1_H);                          /* Interrupt Flag 1 */
2075
/* SFRIFG1 Control Bits */
2076
#define WDTIFG                 (0x0001)       /* WDT Interrupt Flag */
2077
#define OFIFG                  (0x0002)       /* Osc Fault Flag */
2078
//#define Reserved          (0x0004)
2079
#define VMAIFG                 (0x0008)       /* Vacant Memory Interrupt Flag */
2080
#define NMIIFG                 (0x0010)       /* NMI Interrupt Flag */
2081
//#define Reserved          (0x0020)
2082
#define JMBINIFG               (0x0040)       /* JTAG Mail Box input Interrupt Flag */
2083
#define JMBOUTIFG              (0x0080)       /* JTAG Mail Box output Interrupt Flag */
2084
 
2085
#define WDTIFG_L               (0x0001)       /* WDT Interrupt Flag */
2086
#define OFIFG_L                (0x0002)       /* Osc Fault Flag */
2087
//#define Reserved          (0x0004)
2088
#define VMAIFG_L               (0x0008)       /* Vacant Memory Interrupt Flag */
2089
#define NMIIFG_L               (0x0010)       /* NMI Interrupt Flag */
2090
//#define Reserved          (0x0020)
2091
#define JMBINIFG_L             (0x0040)       /* JTAG Mail Box input Interrupt Flag */
2092
#define JMBOUTIFG_L            (0x0080)       /* JTAG Mail Box output Interrupt Flag */
2093
 
2094
//#define Reserved          (0x0004)
2095
//#define Reserved          (0x0020)
2096
 
2097
SFR_16BIT(SFRRPCR);                           /* RESET Pin Control Register */
2098
SFR_8BIT(SFRRPCR_L);                          /* RESET Pin Control Register */
2099
SFR_8BIT(SFRRPCR_H);                          /* RESET Pin Control Register */
2100
/* SFRRPCR Control Bits */
2101
#define SYSNMI                 (0x0001)       /* NMI select */
2102
#define SYSNMIIES              (0x0002)       /* NMI edge select */
2103
#define SYSRSTUP               (0x0004)       /* RESET Pin pull down/up select */
2104
#define SYSRSTRE               (0x0008)       /* RESET Pin Resistor enable */
2105
 
2106
#define SYSNMI_L               (0x0001)       /* NMI select */
2107
#define SYSNMIIES_L            (0x0002)       /* NMI edge select */
2108
#define SYSRSTUP_L             (0x0004)       /* RESET Pin pull down/up select */
2109
#define SYSRSTRE_L             (0x0008)       /* RESET Pin Resistor enable */
2110
 
2111
/************************************************************
2112
* SYS - System Module
2113
************************************************************/
2114
#define __MSP430_HAS_SYS__                    /* Definition to show that Module is available */
2115
#define __MSP430_BASEADDRESS_SYS__ 0x0180
2116
 
2117
SFR_16BIT(SYSCTL);                            /* System control */
2118
SFR_8BIT(SYSCTL_L);                           /* System control */
2119
SFR_8BIT(SYSCTL_H);                           /* System control */
2120
SFR_16BIT(SYSBSLC);                           /* Boot strap configuration area */
2121
SFR_8BIT(SYSBSLC_L);                          /* Boot strap configuration area */
2122
SFR_8BIT(SYSBSLC_H);                          /* Boot strap configuration area */
2123
SFR_16BIT(SYSJMBC);                           /* JTAG mailbox control */
2124
SFR_8BIT(SYSJMBC_L);                          /* JTAG mailbox control */
2125
SFR_8BIT(SYSJMBC_H);                          /* JTAG mailbox control */
2126
SFR_16BIT(SYSJMBI0);                          /* JTAG mailbox input 0 */
2127
SFR_8BIT(SYSJMBI0_L);                         /* JTAG mailbox input 0 */
2128
SFR_8BIT(SYSJMBI0_H);                         /* JTAG mailbox input 0 */
2129
SFR_16BIT(SYSJMBI1);                          /* JTAG mailbox input 1 */
2130
SFR_8BIT(SYSJMBI1_L);                         /* JTAG mailbox input 1 */
2131
SFR_8BIT(SYSJMBI1_H);                         /* JTAG mailbox input 1 */
2132
SFR_16BIT(SYSJMBO0);                          /* JTAG mailbox output 0 */
2133
SFR_8BIT(SYSJMBO0_L);                         /* JTAG mailbox output 0 */
2134
SFR_8BIT(SYSJMBO0_H);                         /* JTAG mailbox output 0 */
2135
SFR_16BIT(SYSJMBO1);                          /* JTAG mailbox output 1 */
2136
SFR_8BIT(SYSJMBO1_L);                         /* JTAG mailbox output 1 */
2137
SFR_8BIT(SYSJMBO1_H);                         /* JTAG mailbox output 1 */
2138
 
2139
SFR_16BIT(SYSBERRIV);                         /* Bus Error vector generator */
2140
SFR_8BIT(SYSBERRIV_L);                        /* Bus Error vector generator */
2141
SFR_8BIT(SYSBERRIV_H);                        /* Bus Error vector generator */
2142
SFR_16BIT(SYSUNIV);                           /* User NMI vector generator */
2143
SFR_8BIT(SYSUNIV_L);                          /* User NMI vector generator */
2144
SFR_8BIT(SYSUNIV_H);                          /* User NMI vector generator */
2145
SFR_16BIT(SYSSNIV);                           /* System NMI vector generator */
2146
SFR_8BIT(SYSSNIV_L);                          /* System NMI vector generator */
2147
SFR_8BIT(SYSSNIV_H);                          /* System NMI vector generator */
2148
SFR_16BIT(SYSRSTIV);                          /* Reset vector generator */
2149
SFR_8BIT(SYSRSTIV_L);                         /* Reset vector generator */
2150
SFR_8BIT(SYSRSTIV_H);                         /* Reset vector generator */
2151
 
2152
/* SYSCTL Control Bits */
2153
#define SYSRIVECT              (0x0001)       /* SYS - RAM based interrupt vectors */
2154
//#define RESERVED            (0x0002)  /* SYS - Reserved */
2155
#define SYSPMMPE               (0x0004)       /* SYS - PMM access protect */
2156
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2157
#define SYSBSLIND              (0x0010)       /* SYS - TCK/RST indication detected */
2158
#define SYSJTAGPIN             (0x0020)       /* SYS - Dedicated JTAG pins enabled */
2159
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2160
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2161
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2162
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2163
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2164
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2165
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2166
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2167
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2168
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2169
 
2170
/* SYSCTL Control Bits */
2171
#define SYSRIVECT_L            (0x0001)       /* SYS - RAM based interrupt vectors */
2172
//#define RESERVED            (0x0002)  /* SYS - Reserved */
2173
#define SYSPMMPE_L             (0x0004)       /* SYS - PMM access protect */
2174
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2175
#define SYSBSLIND_L            (0x0010)       /* SYS - TCK/RST indication detected */
2176
#define SYSJTAGPIN_L           (0x0020)       /* SYS - Dedicated JTAG pins enabled */
2177
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2178
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2179
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2180
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2181
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2182
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2183
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2184
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2185
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2186
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2187
 
2188
/* SYSCTL Control Bits */
2189
//#define RESERVED            (0x0002)  /* SYS - Reserved */
2190
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2191
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2192
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2193
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2194
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2195
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2196
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2197
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2198
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2199
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2200
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2201
 
2202
/* SYSBSLC Control Bits */
2203
#define SYSBSLSIZE0            (0x0001)       /* SYS - BSL Protection Size 0 */
2204
#define SYSBSLSIZE1            (0x0002)       /* SYS - BSL Protection Size 1 */
2205
#define SYSBSLR                (0x0004)       /* SYS - RAM assigned to BSL */
2206
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2207
//#define RESERVED            (0x0010)  /* SYS - Reserved */
2208
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2209
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2210
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2211
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2212
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2213
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2214
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2215
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2216
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2217
#define SYSBSLOFF              (0x4000)       /* SYS - BSL Memeory disabled */
2218
#define SYSBSLPE               (0x8000)       /* SYS - BSL Memory protection enabled */
2219
 
2220
/* SYSBSLC Control Bits */
2221
#define SYSBSLSIZE0_L          (0x0001)       /* SYS - BSL Protection Size 0 */
2222
#define SYSBSLSIZE1_L          (0x0002)       /* SYS - BSL Protection Size 1 */
2223
#define SYSBSLR_L              (0x0004)       /* SYS - RAM assigned to BSL */
2224
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2225
//#define RESERVED            (0x0010)  /* SYS - Reserved */
2226
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2227
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2228
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2229
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2230
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2231
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2232
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2233
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2234
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2235
 
2236
/* SYSBSLC Control Bits */
2237
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2238
//#define RESERVED            (0x0010)  /* SYS - Reserved */
2239
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2240
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2241
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2242
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2243
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2244
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2245
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2246
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2247
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2248
#define SYSBSLOFF_H            (0x0040)       /* SYS - BSL Memeory disabled */
2249
#define SYSBSLPE_H             (0x0080)       /* SYS - BSL Memory protection enabled */
2250
 
2251
/* SYSJMBC Control Bits */
2252
#define JMBIN0FG               (0x0001)       /* SYS - Incoming JTAG Mailbox 0 Flag */
2253
#define JMBIN1FG               (0x0002)       /* SYS - Incoming JTAG Mailbox 1 Flag */
2254
#define JMBOUT0FG              (0x0004)       /* SYS - Outgoing JTAG Mailbox 0 Flag */
2255
#define JMBOUT1FG              (0x0008)       /* SYS - Outgoing JTAG Mailbox 1 Flag */
2256
#define JMBMODE                (0x0010)       /* SYS - JMB 16/32 Bit Mode */
2257
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2258
#define JMBCLR0OFF             (0x0040)       /* SYS - Incoming JTAG Mailbox 0 Flag auto-clear disalbe */
2259
#define JMBCLR1OFF             (0x0080)       /* SYS - Incoming JTAG Mailbox 1 Flag auto-clear disalbe */
2260
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2261
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2262
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2263
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2264
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2265
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2266
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2267
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2268
 
2269
/* SYSJMBC Control Bits */
2270
#define JMBIN0FG_L             (0x0001)       /* SYS - Incoming JTAG Mailbox 0 Flag */
2271
#define JMBIN1FG_L             (0x0002)       /* SYS - Incoming JTAG Mailbox 1 Flag */
2272
#define JMBOUT0FG_L            (0x0004)       /* SYS - Outgoing JTAG Mailbox 0 Flag */
2273
#define JMBOUT1FG_L            (0x0008)       /* SYS - Outgoing JTAG Mailbox 1 Flag */
2274
#define JMBMODE_L              (0x0010)       /* SYS - JMB 16/32 Bit Mode */
2275
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2276
#define JMBCLR0OFF_L           (0x0040)       /* SYS - Incoming JTAG Mailbox 0 Flag auto-clear disalbe */
2277
#define JMBCLR1OFF_L           (0x0080)       /* SYS - Incoming JTAG Mailbox 1 Flag auto-clear disalbe */
2278
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2279
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2280
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2281
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2282
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2283
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2284
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2285
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2286
 
2287
/* SYSJMBC Control Bits */
2288
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2289
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2290
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2291
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2292
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2293
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2294
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2295
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2296
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2297
 
2298
/* SYSUNIV Definitions */
2299
#define SYSUNIV_NONE           (0x0000)       /* No Interrupt pending */
2300
#define SYSUNIV_NMIIFG         (0x0002)       /* SYSUNIV : NMIIFG */
2301
#define SYSUNIV_OFIFG          (0x0004)       /* SYSUNIV : Osc. Fail - OFIFG */
2302
#define SYSUNIV_ACCVIFG        (0x0006)       /* SYSUNIV : Access Violation - ACCVIFG */
2303
#define SYSUNIV_BUSIFG         (0x0008)       /* SYSUNIV : Bus Error */
2304
#define SYSUNIV_SYSBUSIV       (0x0008)       /* SYSUNIV : Bus Error - SYSBERRIFG (legacy) */
2305
 
2306
/* SYSSNIV Definitions */
2307
#define SYSSNIV_NONE           (0x0000)       /* No Interrupt pending */
2308
#define SYSSNIV_SVMLIFG        (0x0002)       /* SYSSNIV : SVMLIFG */
2309
#define SYSSNIV_SVMHIFG        (0x0004)       /* SYSSNIV : SVMHIFG */
2310
#define SYSSNIV_DLYLIFG        (0x0006)       /* SYSSNIV : DLYLIFG */
2311
#define SYSSNIV_DLYHIFG        (0x0008)       /* SYSSNIV : DLYHIFG */
2312
#define SYSSNIV_VMAIFG         (0x000A)       /* SYSSNIV : VMAIFG */
2313
#define SYSSNIV_JMBINIFG       (0x000C)       /* SYSSNIV : JMBINIFG */
2314
#define SYSSNIV_JMBOUTIFG      (0x000E)       /* SYSSNIV : JMBOUTIFG */
2315
#define SYSSNIV_VLRLIFG        (0x0010)       /* SYSSNIV : VLRLIFG */
2316
#define SYSSNIV_VLRHIFG        (0x0012)       /* SYSSNIV : VLRHIFG */
2317
 
2318
/* SYSRSTIV Definitions */
2319
#define SYSRSTIV_NONE          (0x0000)       /* No Interrupt pending */
2320
#define SYSRSTIV_BOR           (0x0002)       /* SYSRSTIV : BOR */
2321
#define SYSRSTIV_RSTNMI        (0x0004)       /* SYSRSTIV : RST/NMI */
2322
#define SYSRSTIV_DOBOR         (0x0006)       /* SYSRSTIV : Do BOR */
2323
#define SYSRSTIV_LPM5WU        (0x0008)       /* SYSRSTIV : Port LPM5 Wake Up */
2324
#define SYSRSTIV_SECYV         (0x000A)       /* SYSRSTIV : Security violation */
2325
#define SYSRSTIV_SVSL          (0x000C)       /* SYSRSTIV : SVSL */
2326
#define SYSRSTIV_SVSH          (0x000E)       /* SYSRSTIV : SVSH */
2327
#define SYSRSTIV_SVML_OVP      (0x0010)       /* SYSRSTIV : SVML_OVP */
2328
#define SYSRSTIV_SVMH_OVP      (0x0012)       /* SYSRSTIV : SVMH_OVP */
2329
#define SYSRSTIV_DOPOR         (0x0014)       /* SYSRSTIV : Do POR */
2330
#define SYSRSTIV_WDTTO         (0x0016)       /* SYSRSTIV : WDT Time out */
2331
#define SYSRSTIV_WDTKEY        (0x0018)       /* SYSRSTIV : WDTKEY violation */
2332
#define SYSRSTIV_KEYV          (0x001A)       /* SYSRSTIV : Flash Key violation */
2333
#define SYSRSTIV_FLLUL         (0x001C)       /* SYSRSTIV : FLL unlock */
2334
#define SYSRSTIV_PERF          (0x001E)       /* SYSRSTIV : peripheral/config area fetch */
2335
#define SYSRSTIV_PMMKEY        (0x0020)       /* SYSRSTIV : PMMKEY violation */
2336
 
2337
/************************************************************
2338
* Timer0_A5
2339
************************************************************/
2340
#define __MSP430_HAS_T0A5__                   /* Definition to show that Module is available */
2341
#define __MSP430_BASEADDRESS_T0A5__ 0x0340
2342
 
2343
SFR_16BIT(TA0CTL);                            /* Timer0_A5 Control */
2344
SFR_16BIT(TA0CCTL0);                          /* Timer0_A5 Capture/Compare Control 0 */
2345
SFR_16BIT(TA0CCTL1);                          /* Timer0_A5 Capture/Compare Control 1 */
2346
SFR_16BIT(TA0CCTL2);                          /* Timer0_A5 Capture/Compare Control 2 */
2347
SFR_16BIT(TA0CCTL3);                          /* Timer0_A5 Capture/Compare Control 3 */
2348
SFR_16BIT(TA0CCTL4);                          /* Timer0_A5 Capture/Compare Control 4 */
2349
SFR_16BIT(TA0R);                              /* Timer0_A5 */
2350
SFR_16BIT(TA0CCR0);                           /* Timer0_A5 Capture/Compare 0 */
2351
SFR_16BIT(TA0CCR1);                           /* Timer0_A5 Capture/Compare 1 */
2352
SFR_16BIT(TA0CCR2);                           /* Timer0_A5 Capture/Compare 2 */
2353
SFR_16BIT(TA0CCR3);                           /* Timer0_A5 Capture/Compare 3 */
2354
SFR_16BIT(TA0CCR4);                           /* Timer0_A5 Capture/Compare 4 */
2355
SFR_16BIT(TA0IV);                             /* Timer0_A5 Interrupt Vector Word */
2356
SFR_16BIT(TA0EX0);                            /* Timer0_A5 Expansion Register 0 */
2357
 
2358
/* TAxCTL Control Bits */
2359
#define TASSEL1                (0x0200)       /* Timer A clock source select 0 */
2360
#define TASSEL0                (0x0100)       /* Timer A clock source select 1 */
2361
#define ID1                    (0x0080)       /* Timer A clock input divider 1 */
2362
#define ID0                    (0x0040)       /* Timer A clock input divider 0 */
2363
#define MC1                    (0x0020)       /* Timer A mode control 1 */
2364
#define MC0                    (0x0010)       /* Timer A mode control 0 */
2365
#define TACLR                  (0x0004)       /* Timer A counter clear */
2366
#define TAIE                   (0x0002)       /* Timer A counter interrupt enable */
2367
#define TAIFG                  (0x0001)       /* Timer A counter interrupt flag */
2368
 
2369
#define MC_0                   (0*0x10u)      /* Timer A mode control: 0 - Stop */
2370
#define MC_1                   (1*0x10u)      /* Timer A mode control: 1 - Up to CCR0 */
2371
#define MC_2                   (2*0x10u)      /* Timer A mode control: 2 - Continous up */
2372
#define MC_3                   (3*0x10u)      /* Timer A mode control: 3 - Up/Down */
2373
#define ID_0                   (0*0x40u)      /* Timer A input divider: 0 - /1 */
2374
#define ID_1                   (1*0x40u)      /* Timer A input divider: 1 - /2 */
2375
#define ID_2                   (2*0x40u)      /* Timer A input divider: 2 - /4 */
2376
#define ID_3                   (3*0x40u)      /* Timer A input divider: 3 - /8 */
2377
#define TASSEL_0               (0*0x100u)     /* Timer A clock source select: 0 - TACLK */
2378
#define TASSEL_1               (1*0x100u)     /* Timer A clock source select: 1 - ACLK  */
2379
#define TASSEL_2               (2*0x100u)     /* Timer A clock source select: 2 - SMCLK */
2380
#define TASSEL_3               (3*0x100u)     /* Timer A clock source select: 3 - INCLK */
2381
#define MC__STOP               (0*0x10u)      /* Timer A mode control: 0 - Stop */
2382
#define MC__UP                 (1*0x10u)      /* Timer A mode control: 1 - Up to CCR0 */
2383
#define MC__CONTINOUS          (2*0x10u)      /* Timer A mode control: 2 - Continous up */
2384
#define MC__UPDOWN             (3*0x10u)      /* Timer A mode control: 3 - Up/Down */
2385
#define ID__1                  (0*0x40u)      /* Timer A input divider: 0 - /1 */
2386
#define ID__2                  (1*0x40u)      /* Timer A input divider: 1 - /2 */
2387
#define ID__4                  (2*0x40u)      /* Timer A input divider: 2 - /4 */
2388
#define ID__8                  (3*0x40u)      /* Timer A input divider: 3 - /8 */
2389
#define TASSEL__TACLK          (0*0x100u)     /* Timer A clock source select: 0 - TACLK */
2390
#define TASSEL__ACLK           (1*0x100u)     /* Timer A clock source select: 1 - ACLK  */
2391
#define TASSEL__SMCLK          (2*0x100u)     /* Timer A clock source select: 2 - SMCLK */
2392
#define TASSEL__INCLK          (3*0x100u)     /* Timer A clock source select: 3 - INCLK */
2393
 
2394
/* TAxCCTLx Control Bits */
2395
#define CM1                    (0x8000)       /* Capture mode 1 */
2396
#define CM0                    (0x4000)       /* Capture mode 0 */
2397
#define CCIS1                  (0x2000)       /* Capture input select 1 */
2398
#define CCIS0                  (0x1000)       /* Capture input select 0 */
2399
#define SCS                    (0x0800)       /* Capture sychronize */
2400
#define SCCI                   (0x0400)       /* Latched capture signal (read) */
2401
#define CAP                    (0x0100)       /* Capture mode: 1 /Compare mode : 0 */
2402
#define OUTMOD2                (0x0080)       /* Output mode 2 */
2403
#define OUTMOD1                (0x0040)       /* Output mode 1 */
2404
#define OUTMOD0                (0x0020)       /* Output mode 0 */
2405
#define CCIE                   (0x0010)       /* Capture/compare interrupt enable */
2406
#define CCI                    (0x0008)       /* Capture input signal (read) */
2407
#define OUT                    (0x0004)       /* PWM Output signal if output mode 0 */
2408
#define COV                    (0x0002)       /* Capture/compare overflow flag */
2409
#define CCIFG                  (0x0001)       /* Capture/compare interrupt flag */
2410
 
2411
#define OUTMOD_0               (0*0x20u)      /* PWM output mode: 0 - output only */
2412
#define OUTMOD_1               (1*0x20u)      /* PWM output mode: 1 - set */
2413
#define OUTMOD_2               (2*0x20u)      /* PWM output mode: 2 - PWM toggle/reset */
2414
#define OUTMOD_3               (3*0x20u)      /* PWM output mode: 3 - PWM set/reset */
2415
#define OUTMOD_4               (4*0x20u)      /* PWM output mode: 4 - toggle */
2416
#define OUTMOD_5               (5*0x20u)      /* PWM output mode: 5 - Reset */
2417
#define OUTMOD_6               (6*0x20u)      /* PWM output mode: 6 - PWM toggle/set */
2418
#define OUTMOD_7               (7*0x20u)      /* PWM output mode: 7 - PWM reset/set */
2419
#define CCIS_0                 (0*0x1000u)    /* Capture input select: 0 - CCIxA */
2420
#define CCIS_1                 (1*0x1000u)    /* Capture input select: 1 - CCIxB */
2421
#define CCIS_2                 (2*0x1000u)    /* Capture input select: 2 - GND */
2422
#define CCIS_3                 (3*0x1000u)    /* Capture input select: 3 - Vcc */
2423
#define CM_0                   (0*0x4000u)    /* Capture mode: 0 - disabled */
2424
#define CM_1                   (1*0x4000u)    /* Capture mode: 1 - pos. edge */
2425
#define CM_2                   (2*0x4000u)    /* Capture mode: 1 - neg. edge */
2426
#define CM_3                   (3*0x4000u)    /* Capture mode: 1 - both edges */
2427
 
2428
/* TAxEX0 Control Bits */
2429
#define TAIDEX0                (0x0001)       /* Timer A Input divider expansion Bit: 0 */
2430
#define TAIDEX1                (0x0002)       /* Timer A Input divider expansion Bit: 1 */
2431
#define TAIDEX2                (0x0004)       /* Timer A Input divider expansion Bit: 2 */
2432
 
2433
#define TAIDEX_0               (0*0x0001u)    /* Timer A Input divider expansion : /1 */
2434
#define TAIDEX_1               (1*0x0001u)    /* Timer A Input divider expansion : /2 */
2435
#define TAIDEX_2               (2*0x0001u)    /* Timer A Input divider expansion : /3 */
2436
#define TAIDEX_3               (3*0x0001u)    /* Timer A Input divider expansion : /4 */
2437
#define TAIDEX_4               (4*0x0001u)    /* Timer A Input divider expansion : /5 */
2438
#define TAIDEX_5               (5*0x0001u)    /* Timer A Input divider expansion : /6 */
2439
#define TAIDEX_6               (6*0x0001u)    /* Timer A Input divider expansion : /7 */
2440
#define TAIDEX_7               (7*0x0001u)    /* Timer A Input divider expansion : /8 */
2441
 
2442
/* T0A5IV Definitions */
2443
#define TA0IV_NONE             (0x0000)       /* No Interrupt pending */
2444
#define TA0IV_TA0CCR1          (0x0002)       /* TA0CCR1_CCIFG */
2445
#define TA0IV_TA0CCR2          (0x0004)       /* TA0CCR2_CCIFG */
2446
#define TA0IV_TA0CCR3          (0x0006)       /* TA0CCR3_CCIFG */
2447
#define TA0IV_TA0CCR4          (0x0008)       /* TA0CCR4_CCIFG */
2448
#define TA0IV_5                (0x000A)       /* Reserved */
2449
#define TA0IV_6                (0x000C)       /* Reserved */
2450
#define TA0IV_TA0IFG           (0x000E)       /* TA0IFG */
2451
 
2452
/************************************************************
2453
* Timer1_A3
2454
************************************************************/
2455
#define __MSP430_HAS_T1A3__                   /* Definition to show that Module is available */
2456
#define __MSP430_BASEADDRESS_T1A3__ 0x0380
2457
 
2458
SFR_16BIT(TA1CTL);                            /* Timer1_A3 Control */
2459
SFR_16BIT(TA1CCTL0);                          /* Timer1_A3 Capture/Compare Control 0 */
2460
SFR_16BIT(TA1CCTL1);                          /* Timer1_A3 Capture/Compare Control 1 */
2461
SFR_16BIT(TA1CCTL2);                          /* Timer1_A3 Capture/Compare Control 2 */
2462
SFR_16BIT(TA1R);                              /* Timer1_A3 */
2463
SFR_16BIT(TA1CCR0);                           /* Timer1_A3 Capture/Compare 0 */
2464
SFR_16BIT(TA1CCR1);                           /* Timer1_A3 Capture/Compare 1 */
2465
SFR_16BIT(TA1CCR2);                           /* Timer1_A3 Capture/Compare 2 */
2466
SFR_16BIT(TA1IV);                             /* Timer1_A3 Interrupt Vector Word */
2467
SFR_16BIT(TA1EX0);                            /* Timer1_A3 Expansion Register 0 */
2468
 
2469
/* Bits are already defined within the Timer0_Ax */
2470
 
2471
/* TA1IV Definitions */
2472
#define TA1IV_NONE             (0x0000)       /* No Interrupt pending */
2473
#define TA1IV_TA1CCR1          (0x0002)       /* TA1CCR1_CCIFG */
2474
#define TA1IV_TA1CCR2          (0x0004)       /* TA1CCR2_CCIFG */
2475
#define TA1IV_3                (0x0006)       /* Reserved */
2476
#define TA1IV_4                (0x0008)       /* Reserved */
2477
#define TA1IV_5                (0x000A)       /* Reserved */
2478
#define TA1IV_6                (0x000C)       /* Reserved */
2479
#define TA1IV_TA1IFG           (0x000E)       /* TA1IFG */
2480
 
2481
/************************************************************
2482
* Timer2_A3
2483
************************************************************/
2484
#define __MSP430_HAS_T2A3__                   /* Definition to show that Module is available */
2485
#define __MSP430_BASEADDRESS_T2A3__ 0x0400
2486
 
2487
SFR_16BIT(TA2CTL);                            /* Timer2_A3 Control */
2488
SFR_16BIT(TA2CCTL0);                          /* Timer2_A3 Capture/Compare Control 0 */
2489
SFR_16BIT(TA2CCTL1);                          /* Timer2_A3 Capture/Compare Control 1 */
2490
SFR_16BIT(TA2CCTL2);                          /* Timer2_A3 Capture/Compare Control 2 */
2491
SFR_16BIT(TA2R);                              /* Timer2_A3 */
2492
SFR_16BIT(TA2CCR0);                           /* Timer2_A3 Capture/Compare 0 */
2493
SFR_16BIT(TA2CCR1);                           /* Timer2_A3 Capture/Compare 1 */
2494
SFR_16BIT(TA2CCR2);                           /* Timer2_A3 Capture/Compare 2 */
2495
SFR_16BIT(TA2IV);                             /* Timer2_A3 Interrupt Vector Word */
2496
SFR_16BIT(TA2EX0);                            /* Timer2_A3 Expansion Register 0 */
2497
 
2498
/* Bits are already defined within the Timer0_Ax */
2499
 
2500
/* TA2IV Definitions */
2501
#define TA2IV_NONE             (0x0000)       /* No Interrupt pending */
2502
#define TA2IV_TA1CCR1          (0x0002)       /* TA2CCR1_CCIFG */
2503
#define TA2IV_TA1CCR2          (0x0004)       /* TA2CCR2_CCIFG */
2504
#define TA2IV_3                (0x0006)       /* Reserved */
2505
#define TA2IV_4                (0x0008)       /* Reserved */
2506
#define TA2IV_5                (0x000A)       /* Reserved */
2507
#define TA2IV_6                (0x000C)       /* Reserved */
2508
#define TA2IV_TA2IFG           (0x000E)       /* TA2IFG */
2509
 
2510
/************************************************************
2511
* Timer0_B7
2512
************************************************************/
2513
#define __MSP430_HAS_T0B7__                   /* Definition to show that Module is available */
2514
#define __MSP430_BASEADDRESS_T0B7__ 0x03C0
2515
 
2516
SFR_16BIT(TB0CTL);                            /* Timer0_B7 Control */
2517
SFR_16BIT(TB0CCTL0);                          /* Timer0_B7 Capture/Compare Control 0 */
2518
SFR_16BIT(TB0CCTL1);                          /* Timer0_B7 Capture/Compare Control 1 */
2519
SFR_16BIT(TB0CCTL2);                          /* Timer0_B7 Capture/Compare Control 2 */
2520
SFR_16BIT(TB0CCTL3);                          /* Timer0_B7 Capture/Compare Control 3 */
2521
SFR_16BIT(TB0CCTL4);                          /* Timer0_B7 Capture/Compare Control 4 */
2522
SFR_16BIT(TB0CCTL5);                          /* Timer0_B7 Capture/Compare Control 5 */
2523
SFR_16BIT(TB0CCTL6);                          /* Timer0_B7 Capture/Compare Control 6 */
2524
SFR_16BIT(TB0R);                              /* Timer0_B7 */
2525
SFR_16BIT(TB0CCR0);                           /* Timer0_B7 Capture/Compare 0 */
2526
SFR_16BIT(TB0CCR1);                           /* Timer0_B7 Capture/Compare 1 */
2527
SFR_16BIT(TB0CCR2);                           /* Timer0_B7 Capture/Compare 2 */
2528
SFR_16BIT(TB0CCR3);                           /* Timer0_B7 Capture/Compare 3 */
2529
SFR_16BIT(TB0CCR4);                           /* Timer0_B7 Capture/Compare 4 */
2530
SFR_16BIT(TB0CCR5);                           /* Timer0_B7 Capture/Compare 5 */
2531
SFR_16BIT(TB0CCR6);                           /* Timer0_B7 Capture/Compare 6 */
2532
SFR_16BIT(TB0EX0);                            /* Timer0_B7 Expansion Register 0 */
2533
SFR_16BIT(TB0IV);                             /* Timer0_B7 Interrupt Vector Word */
2534
 
2535
/* Legacy Type Definitions for TimerB */
2536
#define TBCTL                  TB0CTL         /* Timer0_B7 Control */
2537
#define TBCCTL0                TB0CCTL0       /* Timer0_B7 Capture/Compare Control 0 */
2538
#define TBCCTL1                TB0CCTL1       /* Timer0_B7 Capture/Compare Control 1 */
2539
#define TBCCTL2                TB0CCTL2       /* Timer0_B7 Capture/Compare Control 2 */
2540
#define TBCCTL3                TB0CCTL3       /* Timer0_B7 Capture/Compare Control 3 */
2541
#define TBCCTL4                TB0CCTL4       /* Timer0_B7 Capture/Compare Control 4 */
2542
#define TBCCTL5                TB0CCTL5       /* Timer0_B7 Capture/Compare Control 5 */
2543
#define TBCCTL6                TB0CCTL6       /* Timer0_B7 Capture/Compare Control 6 */
2544
#define TBR                    TB0R           /* Timer0_B7 */
2545
#define TBCCR0                 TB0CCR0        /* Timer0_B7 Capture/Compare 0 */
2546
#define TBCCR1                 TB0CCR1        /* Timer0_B7 Capture/Compare 1 */
2547
#define TBCCR2                 TB0CCR2        /* Timer0_B7 Capture/Compare 2 */
2548
#define TBCCR3                 TB0CCR3        /* Timer0_B7 Capture/Compare 3 */
2549
#define TBCCR4                 TB0CCR4        /* Timer0_B7 Capture/Compare 4 */
2550
#define TBCCR5                 TB0CCR5        /* Timer0_B7 Capture/Compare 5 */
2551
#define TBCCR6                 TB0CCR6        /* Timer0_B7 Capture/Compare 6 */
2552
#define TBEX0                  TB0EX0         /* Timer0_B7 Expansion Register 0 */
2553
#define TBIV                   TB0IV          /* Timer0_B7 Interrupt Vector Word */
2554
#define TIMERB1_VECTOR       TIMER0_B1_VECTOR /* Timer0_B7 CC1-6, TB */
2555
#define TIMERB0_VECTOR       TIMER0_B0_VECTOR /* Timer0_B7 CC0 */
2556
 
2557
/* TBxCTL Control Bits */
2558
#define TBCLGRP1               (0x4000)       /* Timer0_B7 Compare latch load group 1 */
2559
#define TBCLGRP0               (0x2000)       /* Timer0_B7 Compare latch load group 0 */
2560
#define CNTL1                  (0x1000)       /* Counter lenght 1 */
2561
#define CNTL0                  (0x0800)       /* Counter lenght 0 */
2562
#define TBSSEL1                (0x0200)       /* Clock source 1 */
2563
#define TBSSEL0                (0x0100)       /* Clock source 0 */
2564
#define TBCLR                  (0x0004)       /* Timer0_B7 counter clear */
2565
#define TBIE                   (0x0002)       /* Timer0_B7 interrupt enable */
2566
#define TBIFG                  (0x0001)       /* Timer0_B7 interrupt flag */
2567
 
2568
#define SHR1                   (0x4000)       /* Timer0_B7 Compare latch load group 1 */
2569
#define SHR0                   (0x2000)       /* Timer0_B7 Compare latch load group 0 */
2570
 
2571
#define TBSSEL_0               (0*0x0100u)    /* Clock Source: TBCLK */
2572
#define TBSSEL_1               (1*0x0100u)    /* Clock Source: ACLK  */
2573
#define TBSSEL_2               (2*0x0100u)    /* Clock Source: SMCLK */
2574
#define TBSSEL_3               (3*0x0100u)    /* Clock Source: INCLK */
2575
#define CNTL_0                 (0*0x0800u)    /* Counter lenght: 16 bit */
2576
#define CNTL_1                 (1*0x0800u)    /* Counter lenght: 12 bit */
2577
#define CNTL_2                 (2*0x0800u)    /* Counter lenght: 10 bit */
2578
#define CNTL_3                 (3*0x0800u)    /* Counter lenght:  8 bit */
2579
#define SHR_0                  (0*0x2000u)    /* Timer0_B7 Group: 0 - individually */
2580
#define SHR_1                  (1*0x2000u)    /* Timer0_B7 Group: 1 - 3 groups (1-2, 3-4, 5-6) */
2581
#define SHR_2                  (2*0x2000u)    /* Timer0_B7 Group: 2 - 2 groups (1-3, 4-6)*/
2582
#define SHR_3                  (3*0x2000u)    /* Timer0_B7 Group: 3 - 1 group (all) */
2583
#define TBCLGRP_0              (0*0x2000u)    /* Timer0_B7 Group: 0 - individually */
2584
#define TBCLGRP_1              (1*0x2000u)    /* Timer0_B7 Group: 1 - 3 groups (1-2, 3-4, 5-6) */
2585
#define TBCLGRP_2              (2*0x2000u)    /* Timer0_B7 Group: 2 - 2 groups (1-3, 4-6)*/
2586
#define TBCLGRP_3              (3*0x2000u)    /* Timer0_B7 Group: 3 - 1 group (all) */
2587
#define TBSSEL__TACLK          (0*0x100u)     /* Timer0_B7 clock source select: 0 - TACLK */
2588
#define TBSSEL__ACLK           (1*0x100u)     /* Timer0_B7 clock source select: 1 - ACLK  */
2589
#define TBSSEL__SMCLK          (2*0x100u)     /* Timer0_B7 clock source select: 2 - SMCLK */
2590
#define TBSSEL__INCLK          (3*0x100u)     /* Timer0_B7 clock source select: 3 - INCLK */
2591
#define CNTL__16               (0*0x0800u)    /* Counter lenght: 16 bit */
2592
#define CNTL__12               (1*0x0800u)    /* Counter lenght: 12 bit */
2593
#define CNTL__10               (2*0x0800u)    /* Counter lenght: 10 bit */
2594
#define CNTL__8                (3*0x0800u)    /* Counter lenght:  8 bit */
2595
 
2596
/* Additional Timer B Control Register bits are defined in Timer A */
2597
/* TBxCCTLx Control Bits */
2598
#define CLLD1                  (0x0400)       /* Compare latch load source 1 */
2599
#define CLLD0                  (0x0200)       /* Compare latch load source 0 */
2600
 
2601
#define SLSHR1                 (0x0400)       /* Compare latch load source 1 */
2602
#define SLSHR0                 (0x0200)       /* Compare latch load source 0 */
2603
 
2604
#define SLSHR_0                (0*0x0200u)    /* Compare latch load sourec : 0 - immediate */
2605
#define SLSHR_1                (1*0x0200u)    /* Compare latch load sourec : 1 - TBR counts to 0 */
2606
#define SLSHR_2                (2*0x0200u)    /* Compare latch load sourec : 2 - up/down */
2607
#define SLSHR_3                (3*0x0200u)    /* Compare latch load sourec : 3 - TBR counts to TBCTL0 */
2608
 
2609
#define CLLD_0                 (0*0x0200u)    /* Compare latch load sourec : 0 - immediate */
2610
#define CLLD_1                 (1*0x0200u)    /* Compare latch load sourec : 1 - TBR counts to 0 */
2611
#define CLLD_2                 (2*0x0200u)    /* Compare latch load sourec : 2 - up/down */
2612
#define CLLD_3                 (3*0x0200u)    /* Compare latch load sourec : 3 - TBR counts to TBCTL0 */
2613
 
2614
/* TBxEX0 Control Bits */
2615
#define TBIDEX0                (0x0001)       /* Timer0_B7 Input divider expansion Bit: 0 */
2616
#define TBIDEX1                (0x0002)       /* Timer0_B7 Input divider expansion Bit: 1 */
2617
#define TBIDEX2                (0x0004)       /* Timer0_B7 Input divider expansion Bit: 2 */
2618
 
2619
#define TBIDEX_0               (0*0x0001u)    /* Timer0_B7 Input divider expansion : /1 */
2620
#define TBIDEX_1               (1*0x0001u)    /* Timer0_B7 Input divider expansion : /2 */
2621
#define TBIDEX_2               (2*0x0001u)    /* Timer0_B7 Input divider expansion : /3 */
2622
#define TBIDEX_3               (3*0x0001u)    /* Timer0_B7 Input divider expansion : /4 */
2623
#define TBIDEX_4               (4*0x0001u)    /* Timer0_B7 Input divider expansion : /5 */
2624
#define TBIDEX_5               (5*0x0001u)    /* Timer0_B7 Input divider expansion : /6 */
2625
#define TBIDEX_6               (6*0x0001u)    /* Timer0_B7 Input divider expansion : /7 */
2626
#define TBIDEX_7               (7*0x0001u)    /* Timer0_B7 Input divider expansion : /8 */
2627
#define TBIDEX__1              (0*0x0001u)    /* Timer0_B7 Input divider expansion : /1 */
2628
#define TBIDEX__2              (1*0x0001u)    /* Timer0_B7 Input divider expansion : /2 */
2629
#define TBIDEX__3              (2*0x0001u)    /* Timer0_B7 Input divider expansion : /3 */
2630
#define TBIDEX__4              (3*0x0001u)    /* Timer0_B7 Input divider expansion : /4 */
2631
#define TBIDEX__5              (4*0x0001u)    /* Timer0_B7 Input divider expansion : /5 */
2632
#define TBIDEX__6              (5*0x0001u)    /* Timer0_B7 Input divider expansion : /6 */
2633
#define TBIDEX__7              (6*0x0001u)    /* Timer0_B7 Input divider expansion : /7 */
2634
#define TBIDEX__8              (7*0x0001u)    /* Timer0_B7 Input divider expansion : /8 */
2635
 
2636
/* TB0IV Definitions */
2637
#define TB0IV_NONE             (0x0000)       /* No Interrupt pending */
2638
#define TB0IV_TB1CCR1          (0x0002)       /* TBCCR1_CCIFG */
2639
#define TB0IV_TB1CCR2          (0x0004)       /* TBCCR2_CCIFG */
2640
#define TB0IV_3                (0x0006)       /* Reserved */
2641
#define TB0IV_4                (0x0008)       /* Reserved */
2642
#define TB0IV_5                (0x000A)       /* Reserved */
2643
#define TB0IV_6                (0x000C)       /* Reserved */
2644
#define TB0IV_TB0IFG           (0x000E)       /* TBIFG */
2645
 
2646
 
2647
/************************************************************
2648
* USB
2649
************************************************************/
2650
#define __MSP430_HAS_USB__                    /* Definition to show that Module is available */
2651
#define __MSP430_BASEADDRESS_USB__ 0x0900
2652
 
2653
/* ========================================================================= */
2654
/* USB Configuration Registers */
2655
/* ========================================================================= */
2656
SFR_16BIT(USBKEYID);                          /* USB Controller key register */
2657
SFR_8BIT(USBKEYID_L);                         /* USB Controller key register */
2658
SFR_8BIT(USBKEYID_H);                         /* USB Controller key register */
2659
SFR_16BIT(USBCNF);                            /* USB Module  configuration register */
2660
SFR_8BIT(USBCNF_L);                           /* USB Module  configuration register */
2661
SFR_8BIT(USBCNF_H);                           /* USB Module  configuration register */
2662
SFR_16BIT(USBPHYCTL);                         /* USB PHY control register */
2663
SFR_8BIT(USBPHYCTL_L);                        /* USB PHY control register */
2664
SFR_8BIT(USBPHYCTL_H);                        /* USB PHY control register */
2665
SFR_16BIT(USBPWRCTL);                         /* USB Power control register */
2666
SFR_8BIT(USBPWRCTL_L);                        /* USB Power control register */
2667
SFR_8BIT(USBPWRCTL_H);                        /* USB Power control register */
2668
SFR_16BIT(USBPLLCTL);                         /* USB PLL control register */
2669
SFR_8BIT(USBPLLCTL_L);                        /* USB PLL control register */
2670
SFR_8BIT(USBPLLCTL_H);                        /* USB PLL control register */
2671
SFR_16BIT(USBPLLDIVB);                        /* USB PLL Clock Divider Buffer control register */
2672
SFR_8BIT(USBPLLDIVB_L);                       /* USB PLL Clock Divider Buffer control register */
2673
SFR_8BIT(USBPLLDIVB_H);                       /* USB PLL Clock Divider Buffer control register */
2674
SFR_16BIT(USBPLLIR);                          /* USB PLL Interrupt control register */
2675
SFR_8BIT(USBPLLIR_L);                         /* USB PLL Interrupt control register */
2676
SFR_8BIT(USBPLLIR_H);                         /* USB PLL Interrupt control register */
2677
 
2678
#define USBKEYPID              USBKEYID       /* Legacy Definition: USB Controller key register */
2679
#define USBKEY                 (0x9628)       /* USB Control Register key */
2680
 
2681
/* USBCNF Control Bits */
2682
#define USB_EN                 (0x0001)       /* USB - Module enable */
2683
#define PUR_EN                 (0x0002)       /* USB - PUR pin enable */
2684
#define PUR_IN                 (0x0004)       /* USB - PUR pin input value */
2685
#define BLKRDY                 (0x0008)       /* USB - Block ready signal for DMA */
2686
#define FNTEN                  (0x0010)       /* USB - Frame Number receive Trigger enable for DMA */
2687
//#define RESERVED            (0x0020)  /* USB -  */
2688
//#define RESERVED            (0x0040)  /* USB -  */
2689
//#define RESERVED            (0x0080)  /* USB -  */
2690
//#define RESERVED            (0x0100)  /* USB -  */
2691
//#define RESERVED            (0x0200)  /* USB -  */
2692
//#define RESERVED            (0x0400)  /* USB -  */
2693
//#define RESERVED            (0x0800)  /* USB -  */
2694
//#define RESERVED            (0x1000)  /* USB -  */
2695
//#define RESERVED            (0x2000)  /* USB -  */
2696
//#define RESERVED            (0x4000)  /* USB -  */
2697
//#define RESERVED            (0x8000)  /* USB -  */
2698
 
2699
/* USBCNF Control Bits */
2700
#define USB_EN_L               (0x0001)       /* USB - Module enable */
2701
#define PUR_EN_L               (0x0002)       /* USB - PUR pin enable */
2702
#define PUR_IN_L               (0x0004)       /* USB - PUR pin input value */
2703
#define BLKRDY_L               (0x0008)       /* USB - Block ready signal for DMA */
2704
#define FNTEN_L                (0x0010)       /* USB - Frame Number receive Trigger enable for DMA */
2705
//#define RESERVED            (0x0020)  /* USB -  */
2706
//#define RESERVED            (0x0040)  /* USB -  */
2707
//#define RESERVED            (0x0080)  /* USB -  */
2708
//#define RESERVED            (0x0100)  /* USB -  */
2709
//#define RESERVED            (0x0200)  /* USB -  */
2710
//#define RESERVED            (0x0400)  /* USB -  */
2711
//#define RESERVED            (0x0800)  /* USB -  */
2712
//#define RESERVED            (0x1000)  /* USB -  */
2713
//#define RESERVED            (0x2000)  /* USB -  */
2714
//#define RESERVED            (0x4000)  /* USB -  */
2715
//#define RESERVED            (0x8000)  /* USB -  */
2716
 
2717
/* USBCNF Control Bits */
2718
//#define RESERVED            (0x0020)  /* USB -  */
2719
//#define RESERVED            (0x0040)  /* USB -  */
2720
//#define RESERVED            (0x0080)  /* USB -  */
2721
//#define RESERVED            (0x0100)  /* USB -  */
2722
//#define RESERVED            (0x0200)  /* USB -  */
2723
//#define RESERVED            (0x0400)  /* USB -  */
2724
//#define RESERVED            (0x0800)  /* USB -  */
2725
//#define RESERVED            (0x1000)  /* USB -  */
2726
//#define RESERVED            (0x2000)  /* USB -  */
2727
//#define RESERVED            (0x4000)  /* USB -  */
2728
//#define RESERVED            (0x8000)  /* USB -  */
2729
 
2730
/* USBPHYCTL Control Bits */
2731
#define PUOUT0                 (0x0001)       /* USB - USB Port Output Signal Bit 0 */
2732
#define PUOUT1                 (0x0002)       /* USB - USB Port Output Signal Bit 1 */
2733
#define PUIN0                  (0x0004)       /* USB - PU0/DP Input Data */
2734
#define PUIN1                  (0x0008)       /* USB - PU1/DM Input Data */
2735
//#define RESERVED            (0x0010)  /* USB -  */
2736
#define PUOPE                  (0x0020)       /* USB - USB Port Output Enable */
2737
//#define RESERVED            (0x0040)  /* USB -  */
2738
#define PUSEL                  (0x0080)       /* USB - USB Port Function Select */
2739
#define PUIPE                  (0x0100)       /* USB - PHY Single Ended Input enable */
2740
//#define RESERVED            (0x0200)  /* USB -  */
2741
//#define RESERVED            (0x0100)  /* USB -  */
2742
//#define RESERVED            (0x0200)  /* USB -  */
2743
//#define RESERVED            (0x0400)  /* USB -  */
2744
//#define RESERVED            (0x0800)  /* USB -  */
2745
//#define RESERVED            (0x1000)  /* USB -  */
2746
//#define RESERVED            (0x2000)  /* USB -  */
2747
//#define RESERVED            (0x4000)  /* USB -  */
2748
//#define RESERVED            (0x8000)  /* USB -  */
2749
 
2750
/* USBPHYCTL Control Bits */
2751
#define PUOUT0_L               (0x0001)       /* USB - USB Port Output Signal Bit 0 */
2752
#define PUOUT1_L               (0x0002)       /* USB - USB Port Output Signal Bit 1 */
2753
#define PUIN0_L                (0x0004)       /* USB - PU0/DP Input Data */
2754
#define PUIN1_L                (0x0008)       /* USB - PU1/DM Input Data */
2755
//#define RESERVED            (0x0010)  /* USB -  */
2756
#define PUOPE_L                (0x0020)       /* USB - USB Port Output Enable */
2757
//#define RESERVED            (0x0040)  /* USB -  */
2758
#define PUSEL_L                (0x0080)       /* USB - USB Port Function Select */
2759
//#define RESERVED            (0x0200)  /* USB -  */
2760
//#define RESERVED            (0x0100)  /* USB -  */
2761
//#define RESERVED            (0x0200)  /* USB -  */
2762
//#define RESERVED            (0x0400)  /* USB -  */
2763
//#define RESERVED            (0x0800)  /* USB -  */
2764
//#define RESERVED            (0x1000)  /* USB -  */
2765
//#define RESERVED            (0x2000)  /* USB -  */
2766
//#define RESERVED            (0x4000)  /* USB -  */
2767
//#define RESERVED            (0x8000)  /* USB -  */
2768
 
2769
/* USBPHYCTL Control Bits */
2770
//#define RESERVED            (0x0010)  /* USB -  */
2771
//#define RESERVED            (0x0040)  /* USB -  */
2772
#define PUIPE_H                (0x0001)       /* USB - PHY Single Ended Input enable */
2773
//#define RESERVED            (0x0200)  /* USB -  */
2774
//#define RESERVED            (0x0100)  /* USB -  */
2775
//#define RESERVED            (0x0200)  /* USB -  */
2776
//#define RESERVED            (0x0400)  /* USB -  */
2777
//#define RESERVED            (0x0800)  /* USB -  */
2778
//#define RESERVED            (0x1000)  /* USB -  */
2779
//#define RESERVED            (0x2000)  /* USB -  */
2780
//#define RESERVED            (0x4000)  /* USB -  */
2781
//#define RESERVED            (0x8000)  /* USB -  */
2782
 
2783
#define PUDIR                  (0x0020)       /* USB - Legacy Definition: USB Port Output Enable */
2784
#define PSEIEN                 (0x0100)       /* USB - Legacy Definition: PHY Single Ended Input enable */
2785
 
2786
/* USBPWRCTL Control Bits */
2787
#define VUOVLIFG               (0x0001)       /* USB - VUSB Overload Interrupt Flag */
2788
#define VBONIFG                (0x0002)       /* USB - VBUS "Coming ON" Interrupt Flag */
2789
#define VBOFFIFG               (0x0004)       /* USB - VBUS "Going OFF" Interrupt Flag */
2790
#define USBBGVBV               (0x0008)       /* USB - USB Bandgap and VBUS valid */
2791
#define USBDETEN               (0x0010)       /* USB - VBUS on/off events enable */
2792
#define OVLAOFF                (0x0020)       /* USB - LDO overload auto off enable */
2793
#define SLDOAON                (0x0040)       /* USB - Secondary LDO auto on enable */
2794
//#define RESERVED            (0x0080)  /* USB -  */
2795
#define VUOVLIE                (0x0100)       /* USB - Overload indication Interrupt Enable */
2796
#define VBONIE                 (0x0200)       /* USB - VBUS "Coming ON" Interrupt Enable */
2797
#define VBOFFIE                (0x0400)       /* USB - VBUS "Going OFF" Interrupt Enable */
2798
#define VUSBEN                 (0x0800)       /* USB - LDO Enable (3.3V) */
2799
#define SLDOEN                 (0x1000)       /* USB - Secondary LDO Enable (1.8V) */
2800
//#define RESERVED            (0x2000)  /* USB -  */
2801
//#define RESERVED            (0x4000)  /* USB -  */
2802
//#define RESERVED            (0x8000)  /* USB -  */
2803
 
2804
/* USBPWRCTL Control Bits */
2805
#define VUOVLIFG_L             (0x0001)       /* USB - VUSB Overload Interrupt Flag */
2806
#define VBONIFG_L              (0x0002)       /* USB - VBUS "Coming ON" Interrupt Flag */
2807
#define VBOFFIFG_L             (0x0004)       /* USB - VBUS "Going OFF" Interrupt Flag */
2808
#define USBBGVBV_L             (0x0008)       /* USB - USB Bandgap and VBUS valid */
2809
#define USBDETEN_L             (0x0010)       /* USB - VBUS on/off events enable */
2810
#define OVLAOFF_L              (0x0020)       /* USB - LDO overload auto off enable */
2811
#define SLDOAON_L              (0x0040)       /* USB - Secondary LDO auto on enable */
2812
//#define RESERVED            (0x0080)  /* USB -  */
2813
//#define RESERVED            (0x2000)  /* USB -  */
2814
//#define RESERVED            (0x4000)  /* USB -  */
2815
//#define RESERVED            (0x8000)  /* USB -  */
2816
 
2817
/* USBPWRCTL Control Bits */
2818
//#define RESERVED            (0x0080)  /* USB -  */
2819
#define VUOVLIE_H              (0x0001)       /* USB - Overload indication Interrupt Enable */
2820
#define VBONIE_H               (0x0002)       /* USB - VBUS "Coming ON" Interrupt Enable */
2821
#define VBOFFIE_H              (0x0004)       /* USB - VBUS "Going OFF" Interrupt Enable */
2822
#define VUSBEN_H               (0x0008)       /* USB - LDO Enable (3.3V) */
2823
#define SLDOEN_H               (0x0010)       /* USB - Secondary LDO Enable (1.8V) */
2824
//#define RESERVED            (0x2000)  /* USB -  */
2825
//#define RESERVED            (0x4000)  /* USB -  */
2826
//#define RESERVED            (0x8000)  /* USB -  */
2827
 
2828
/* USBPLLCTL Control Bits */
2829
//#define RESERVED            (0x0001)  /* USB -  */
2830
//#define RESERVED            (0x0002)  /* USB -  */
2831
//#define RESERVED            (0x0004)  /* USB -  */
2832
//#define RESERVED            (0x0008)  /* USB -  */
2833
//#define RESERVED            (0x0010)  /* USB -  */
2834
//#define RESERVED            (0x0020)  /* USB -  */
2835
#define UCLKSEL0               (0x0040)       /* USB - Module Clock Select Bit 0 */
2836
#define UCLKSEL1               (0x0080)       /* USB - Module Clock Select Bit 1 */
2837
#define UPLLEN                 (0x0100)       /* USB - PLL enable */
2838
#define UPFDEN                 (0x0200)       /* USB - Phase Freq. Discriminator enable */
2839
//#define RESERVED            (0x0400)  /* USB -  */
2840
//#define RESERVED            (0x0800)  /* USB -  */
2841
#define UPCS0                  (0x1000)       /* USB - PLL Clock Select Bit 0 */
2842
//#define RESERVED            (0x2000)  /* USB -  */
2843
//#define RESERVED            (0x4000)  /* USB -  */
2844
//#define RESERVED            (0x8000)  /* USB -  */
2845
 
2846
/* USBPLLCTL Control Bits */
2847
//#define RESERVED            (0x0001)  /* USB -  */
2848
//#define RESERVED            (0x0002)  /* USB -  */
2849
//#define RESERVED            (0x0004)  /* USB -  */
2850
//#define RESERVED            (0x0008)  /* USB -  */
2851
//#define RESERVED            (0x0010)  /* USB -  */
2852
//#define RESERVED            (0x0020)  /* USB -  */
2853
#define UCLKSEL0_L             (0x0040)       /* USB - Module Clock Select Bit 0 */
2854
#define UCLKSEL1_L             (0x0080)       /* USB - Module Clock Select Bit 1 */
2855
//#define RESERVED            (0x0400)  /* USB -  */
2856
//#define RESERVED            (0x0800)  /* USB -  */
2857
//#define RESERVED            (0x2000)  /* USB -  */
2858
//#define RESERVED            (0x4000)  /* USB -  */
2859
//#define RESERVED            (0x8000)  /* USB -  */
2860
 
2861
/* USBPLLCTL Control Bits */
2862
//#define RESERVED            (0x0001)  /* USB -  */
2863
//#define RESERVED            (0x0002)  /* USB -  */
2864
//#define RESERVED            (0x0004)  /* USB -  */
2865
//#define RESERVED            (0x0008)  /* USB -  */
2866
//#define RESERVED            (0x0010)  /* USB -  */
2867
//#define RESERVED            (0x0020)  /* USB -  */
2868
#define UPLLEN_H               (0x0001)       /* USB - PLL enable */
2869
#define UPFDEN_H               (0x0002)       /* USB - Phase Freq. Discriminator enable */
2870
//#define RESERVED            (0x0400)  /* USB -  */
2871
//#define RESERVED            (0x0800)  /* USB -  */
2872
#define UPCS0_H                (0x0010)       /* USB - PLL Clock Select Bit 0 */
2873
//#define RESERVED            (0x2000)  /* USB -  */
2874
//#define RESERVED            (0x4000)  /* USB -  */
2875
//#define RESERVED            (0x8000)  /* USB -  */
2876
 
2877
#define UCLKSEL_0              (0x0000)       /* USB - Module Clock Select: 0 */
2878
#define UCLKSEL_1              (0x0040)       /* USB - Module Clock Select: 1 */
2879
#define UCLKSEL_2              (0x0080)       /* USB - Module Clock Select: 2 */
2880
#define UCLKSEL_3              (0x00C0)       /* USB - Module Clock Select: 3 (Reserved) */
2881
 
2882
#define UCLKSEL__PLLCLK        (0x0000)       /* USB - Module Clock Select: PLLCLK */
2883
#define UCLKSEL__XT1CLK        (0x0040)       /* USB - Module Clock Select: XT1CLK */
2884
#define UCLKSEL__XT2CLK        (0x0080)       /* USB - Module Clock Select: XT2CLK */
2885
 
2886
/* USBPLLDIVB Control Bits */
2887
#define UPMB0                  (0x0001)       /* USB - PLL feedback divider buffer Bit 0 */
2888
#define UPMB1                  (0x0002)       /* USB - PLL feedback divider buffer Bit 1 */
2889
#define UPMB2                  (0x0004)       /* USB - PLL feedback divider buffer Bit 2 */
2890
#define UPMB3                  (0x0008)       /* USB - PLL feedback divider buffer Bit 3 */
2891
#define UPMB4                  (0x0010)       /* USB - PLL feedback divider buffer Bit 4 */
2892
#define UPMB5                  (0x0020)       /* USB - PLL feedback divider buffer Bit 5 */
2893
//#define RESERVED            (0x0040)  /* USB -  */
2894
//#define RESERVED            (0x0080)  /* USB -  */
2895
#define UPQB0                  (0x0100)       /* USB - PLL prescale divider buffer Bit 0 */
2896
#define UPQB1                  (0x0200)       /* USB - PLL prescale divider buffer Bit 1 */
2897
#define UPQB2                  (0x0400)       /* USB - PLL prescale divider buffer Bit 2 */
2898
//#define RESERVED            (0x0800)  /* USB -  */
2899
//#define RESERVED            (0x1000)  /* USB -  */
2900
//#define RESERVED            (0x2000)  /* USB -  */
2901
//#define RESERVED            (0x4000)  /* USB -  */
2902
//#define RESERVED            (0x8000)  /* USB -  */
2903
 
2904
/* USBPLLDIVB Control Bits */
2905
#define UPMB0_L                (0x0001)       /* USB - PLL feedback divider buffer Bit 0 */
2906
#define UPMB1_L                (0x0002)       /* USB - PLL feedback divider buffer Bit 1 */
2907
#define UPMB2_L                (0x0004)       /* USB - PLL feedback divider buffer Bit 2 */
2908
#define UPMB3_L                (0x0008)       /* USB - PLL feedback divider buffer Bit 3 */
2909
#define UPMB4_L                (0x0010)       /* USB - PLL feedback divider buffer Bit 4 */
2910
#define UPMB5_L                (0x0020)       /* USB - PLL feedback divider buffer Bit 5 */
2911
//#define RESERVED            (0x0040)  /* USB -  */
2912
//#define RESERVED            (0x0080)  /* USB -  */
2913
//#define RESERVED            (0x0800)  /* USB -  */
2914
//#define RESERVED            (0x1000)  /* USB -  */
2915
//#define RESERVED            (0x2000)  /* USB -  */
2916
//#define RESERVED            (0x4000)  /* USB -  */
2917
//#define RESERVED            (0x8000)  /* USB -  */
2918
 
2919
/* USBPLLDIVB Control Bits */
2920
//#define RESERVED            (0x0040)  /* USB -  */
2921
//#define RESERVED            (0x0080)  /* USB -  */
2922
#define UPQB0_H                (0x0001)       /* USB - PLL prescale divider buffer Bit 0 */
2923
#define UPQB1_H                (0x0002)       /* USB - PLL prescale divider buffer Bit 1 */
2924
#define UPQB2_H                (0x0004)       /* USB - PLL prescale divider buffer Bit 2 */
2925
//#define RESERVED            (0x0800)  /* USB -  */
2926
//#define RESERVED            (0x1000)  /* USB -  */
2927
//#define RESERVED            (0x2000)  /* USB -  */
2928
//#define RESERVED            (0x4000)  /* USB -  */
2929
//#define RESERVED            (0x8000)  /* USB -  */
2930
 
2931
#define USBPLL_SETCLK_1_5      (UPMB0*31      | UPQB0*0)  /* USB - PLL Set for 1.5 MHz input clock */
2932
#define USBPLL_SETCLK_1_6      (UPMB0*29      | UPQB0*0)  /* USB - PLL Set for 1.6 MHz input clock */
2933
#define USBPLL_SETCLK_1_7778   (UPMB0*26      | UPQB0*0)  /* USB - PLL Set for 1.7778 MHz input clock */
2934
#define USBPLL_SETCLK_1_8432   (UPMB0*25      | UPQB0*0)  /* USB - PLL Set for 1.8432 MHz input clock */
2935
#define USBPLL_SETCLK_1_8461   (UPMB0*25      | UPQB0*0)  /* USB - PLL Set for 1.8461 MHz input clock */
2936
#define USBPLL_SETCLK_1_92     (UPMB0*24      | UPQB0*0)  /* USB - PLL Set for 1.92 MHz input clock */
2937
#define USBPLL_SETCLK_2_0      (UPMB0*23      | UPQB0*0)  /* USB - PLL Set for 2.0 MHz input clock */
2938
#define USBPLL_SETCLK_2_4      (UPMB0*19      | UPQB0*0)  /* USB - PLL Set for 2.4 MHz input clock */
2939
#define USBPLL_SETCLK_2_6667   (UPMB0*17      | UPQB0*0)  /* USB - PLL Set for 2.6667 MHz input clock */
2940
#define USBPLL_SETCLK_3_0      (UPMB0*15      | UPQB0*0)  /* USB - PLL Set for 3.0 MHz input clock */
2941
#define USBPLL_SETCLK_3_2      (UPMB0*29      | UPQB0*1)  /* USB - PLL Set for 3.2 MHz input clock */
2942
#define USBPLL_SETCLK_3_5556   (UPMB0*26      | UPQB0*1)  /* USB - PLL Set for 3.5556 MHz input clock */
2943
#define USBPLL_SETCLK_3_579545 (UPMB0*26      | UPQB0*1)  /* USB - PLL Set for 3.579546 MHz input clock */
2944
#define USBPLL_SETCLK_3_84     (UPMB0*24      | UPQB0*1)  /* USB - PLL Set for 3.84 MHz input clock */
2945
#define USBPLL_SETCLK_4_0      (UPMB0*23      | UPQB0*1)  /* USB - PLL Set for 4.0 MHz input clock */
2946
#define USBPLL_SETCLK_4_1739   (UPMB0*22      | UPQB0*1)  /* USB - PLL Set for 4.1739 MHz input clock */
2947
#define USBPLL_SETCLK_4_1943   (UPMB0*22      | UPQB0*1)  /* USB - PLL Set for 4.1943 MHz input clock */
2948
#define USBPLL_SETCLK_4_332    (UPMB0*21      | UPQB0*1)  /* USB - PLL Set for 4.332 MHz input clock */
2949
#define USBPLL_SETCLK_4_3636   (UPMB0*21      | UPQB0*1)  /* USB - PLL Set for 4.3636 MHz input clock */
2950
#define USBPLL_SETCLK_4_5      (UPMB0*31      | UPQB0*2)  /* USB - PLL Set for 4.5 MHz input clock */
2951
#define USBPLL_SETCLK_4_8      (UPMB0*19      | UPQB0*1)  /* USB - PLL Set for 4.8 MHz input clock */
2952
#define USBPLL_SETCLK_5_33     (UPMB0*17      | UPQB0*1)  /* USB - PLL Set for 5.33 MHz input clock */
2953
#define USBPLL_SETCLK_5_76     (UPMB0*24      | UPQB0*2)  /* USB - PLL Set for 5.76 MHz input clock */
2954
#define USBPLL_SETCLK_6_0      (UPMB0*23      | UPQB0*2)  /* USB - PLL Set for 6.0 MHz input clock */
2955
#define USBPLL_SETCLK_6_4      (UPMB0*29      | UPQB0*3)  /* USB - PLL Set for 6.4 MHz input clock */
2956
#define USBPLL_SETCLK_7_2      (UPMB0*19      | UPQB0*2)  /* USB - PLL Set for 7.2 MHz input clock */
2957
#define USBPLL_SETCLK_7_68     (UPMB0*24      | UPQB0*3)  /* USB - PLL Set for 7.68 MHz input clock */
2958
#define USBPLL_SETCLK_8_0      (UPMB0*17      | UPQB0*2)  /* USB - PLL Set for 8.0 MHz input clock */
2959
#define USBPLL_SETCLK_9_0      (UPMB0*15      | UPQB0*2)  /* USB - PLL Set for 9.0 MHz input clock */
2960
#define USBPLL_SETCLK_9_6      (UPMB0*19      | UPQB0*3)  /* USB - PLL Set for 9.6 MHz input clock */
2961
#define USBPLL_SETCLK_10_66    (UPMB0*17      | UPQB0*3)  /* USB - PLL Set for 10.66 MHz input clock */
2962
#define USBPLL_SETCLK_12_0     (UPMB0*15      | UPQB0*3)  /* USB - PLL Set for 12.0 MHz input clock */
2963
#define USBPLL_SETCLK_12_8     (UPMB0*29      | UPQB0*5)  /* USB - PLL Set for 12.8 MHz input clock */
2964
#define USBPLL_SETCLK_14_4     (UPMB0*19      | UPQB0*4)  /* USB - PLL Set for 14.4 MHz input clock */
2965
#define USBPLL_SETCLK_16_0     (UPMB0*17      | UPQB0*4)  /* USB - PLL Set for 16.0 MHz input clock */
2966
#define USBPLL_SETCLK_16_9344  (UPMB0*16      | UPQB0*4)  /* USB - PLL Set for 16.9344 MHz input clock */
2967
#define USBPLL_SETCLK_16_94118 (UPMB0*16      | UPQB0*4)  /* USB - PLL Set for 16.94118 MHz input clock */
2968
#define USBPLL_SETCLK_18_0     (UPMB0*15      | UPQB0*4)  /* USB - PLL Set for 18.0 MHz input clock */
2969
#define USBPLL_SETCLK_19_2     (UPMB0*19      | UPQB0*5)  /* USB - PLL Set for 19.2 MHz input clock */
2970
#define USBPLL_SETCLK_24_0     (UPMB0*15      | UPQB0*5)  /* USB - PLL Set for 24.0 MHz input clock */
2971
#define USBPLL_SETCLK_25_6     (UPMB0*29      | UPQB0*7)  /* USB - PLL Set for 25.6 MHz input clock */
2972
#define USBPLL_SETCLK_26_0     (UPMB0*23      | UPQB0*6)  /* USB - PLL Set for 26.0 MHz input clock */
2973
#define USBPLL_SETCLK_32_0     (UPMB0*23      | UPQB0*7)  /* USB - PLL Set for 32.0 MHz input clock */
2974
 
2975
/* USBPLLIR Control Bits */
2976
#define USBOOLIFG              (0x0001)       /* USB - PLL out of lock Interrupt Flag */
2977
#define USBLOSIFG              (0x0002)       /* USB - PLL loss of signal Interrupt Flag */
2978
#define USBOORIFG              (0x0004)       /* USB - PLL out of range Interrupt Flag */
2979
//#define RESERVED            (0x0008)  /* USB -  */
2980
//#define RESERVED            (0x0010)  /* USB -  */
2981
//#define RESERVED            (0x0020)  /* USB -  */
2982
//#define RESERVED            (0x0040)  /* USB -  */
2983
//#define RESERVED            (0x0080)  /* USB -  */
2984
#define USBOOLIE               (0x0100)       /* USB - PLL out of lock Interrupt enable */
2985
#define USBLOSIE               (0x0200)       /* USB - PLL loss of signal Interrupt enable */
2986
#define USBOORIE               (0x0400)       /* USB - PLL out of range Interrupt enable */
2987
//#define RESERVED            (0x0800)  /* USB -  */
2988
//#define RESERVED            (0x1000)  /* USB -  */
2989
//#define RESERVED            (0x2000)  /* USB -  */
2990
//#define RESERVED            (0x4000)  /* USB -  */
2991
//#define RESERVED            (0x8000)  /* USB -  */
2992
 
2993
/* USBPLLIR Control Bits */
2994
#define USBOOLIFG_L            (0x0001)       /* USB - PLL out of lock Interrupt Flag */
2995
#define USBLOSIFG_L            (0x0002)       /* USB - PLL loss of signal Interrupt Flag */
2996
#define USBOORIFG_L            (0x0004)       /* USB - PLL out of range Interrupt Flag */
2997
//#define RESERVED            (0x0008)  /* USB -  */
2998
//#define RESERVED            (0x0010)  /* USB -  */
2999
//#define RESERVED            (0x0020)  /* USB -  */
3000
//#define RESERVED            (0x0040)  /* USB -  */
3001
//#define RESERVED            (0x0080)  /* USB -  */
3002
//#define RESERVED            (0x0800)  /* USB -  */
3003
//#define RESERVED            (0x1000)  /* USB -  */
3004
//#define RESERVED            (0x2000)  /* USB -  */
3005
//#define RESERVED            (0x4000)  /* USB -  */
3006
//#define RESERVED            (0x8000)  /* USB -  */
3007
 
3008
/* USBPLLIR Control Bits */
3009
//#define RESERVED            (0x0008)  /* USB -  */
3010
//#define RESERVED            (0x0010)  /* USB -  */
3011
//#define RESERVED            (0x0020)  /* USB -  */
3012
//#define RESERVED            (0x0040)  /* USB -  */
3013
//#define RESERVED            (0x0080)  /* USB -  */
3014
#define USBOOLIE_H             (0x0001)       /* USB - PLL out of lock Interrupt enable */
3015
#define USBLOSIE_H             (0x0002)       /* USB - PLL loss of signal Interrupt enable */
3016
#define USBOORIE_H             (0x0004)       /* USB - PLL out of range Interrupt enable */
3017
//#define RESERVED            (0x0800)  /* USB -  */
3018
//#define RESERVED            (0x1000)  /* USB -  */
3019
//#define RESERVED            (0x2000)  /* USB -  */
3020
//#define RESERVED            (0x4000)  /* USB -  */
3021
//#define RESERVED            (0x8000)  /* USB -  */
3022
 
3023
/* ========================================================================= */
3024
/* USB Control Registers */
3025
/* ========================================================================= */
3026
SFR_8BIT(USBIEPCNF_0);                        /* USB Input endpoint_0: Configuration */
3027
SFR_8BIT(USBIEPCNT_0);                        /* USB Input endpoint_0: Byte Count */
3028
SFR_8BIT(USBOEPCNF_0);                        /* USB Output endpoint_0: Configuration */
3029
SFR_8BIT(USBOEPCNT_0);                        /* USB Output endpoint_0: byte count */
3030
SFR_8BIT(USBIEPIE);                           /* USB Input endpoint interrupt enable flags */
3031
SFR_8BIT(USBOEPIE);                           /* USB Output endpoint interrupt enable flags */
3032
SFR_8BIT(USBIEPIFG);                          /* USB Input endpoint interrupt flags */
3033
SFR_8BIT(USBOEPIFG);                          /* USB Output endpoint interrupt flags */
3034
SFR_16BIT(USBVECINT);                         /* USB Vector interrupt register */
3035
SFR_8BIT(USBVECINT_L);                        /* USB Vector interrupt register */
3036
SFR_8BIT(USBVECINT_H);                        /* USB Vector interrupt register */
3037
SFR_16BIT(USBMAINT);                          /* USB maintenance register */
3038
SFR_8BIT(USBMAINT_L);                         /* USB maintenance register */
3039
SFR_8BIT(USBMAINT_H);                         /* USB maintenance register */
3040
SFR_16BIT(USBTSREG);                          /* USB Time Stamp register */
3041
SFR_8BIT(USBTSREG_L);                         /* USB Time Stamp register */
3042
SFR_8BIT(USBTSREG_H);                         /* USB Time Stamp register */
3043
SFR_16BIT(USBFN);                             /* USB Frame number */
3044
SFR_8BIT(USBFN_L);                            /* USB Frame number */
3045
SFR_8BIT(USBFN_H);                            /* USB Frame number */
3046
SFR_8BIT(USBCTL);                             /* USB control register */
3047
SFR_8BIT(USBIE);                              /* USB interrupt enable register */
3048
SFR_8BIT(USBIFG);                             /* USB interrupt flag register */
3049
SFR_8BIT(USBFUNADR);                          /* USB Function address register */
3050
 
3051
#define USBIV                  USBVECINT      /* USB Vector interrupt register (alternate define) */
3052
 
3053
/* USBIEPCNF_0 Control Bits */
3054
/* USBOEPCNF_0 Control Bits */
3055
//#define RESERVED       (0x0001)  /* USB -  */
3056
//#define RESERVED       (0x0001)  /* USB -  */
3057
#define USBIIE                 (0x0004)       /* USB - Transaction Interrupt indication enable */
3058
#define STALL                  (0x0008)       /* USB - Stall Condition */
3059
//#define RESERVED       (0x0010)  /* USB -  */
3060
#define TOGGLE                 (0x0020)       /* USB - Toggle Bit */
3061
//#define RESERVED       (0x0040)  /* USB -  */
3062
#define UBME                   (0x0080)       /* USB - UBM In-Endpoint Enable */
3063
 
3064
/* USBIEPBCNT_0 Control Bits */
3065
/* USBOEPBCNT_0 Control Bits */
3066
#define CNT0                   (0x0001)       /* USB - Byte Count Bit 0 */
3067
#define CNT1                   (0x0001)       /* USB - Byte Count Bit 1 */
3068
#define CNT2                   (0x0004)       /* USB - Byte Count Bit 2 */
3069
#define CNT3                   (0x0008)       /* USB - Byte Count Bit 3 */
3070
//#define RESERVED       (0x0010)  /* USB -  */
3071
//#define RESERVED       (0x0020)  /* USB -  */
3072
//#define RESERVED       (0x0040)  /* USB -  */
3073
#define NAK                    (0x0080)       /* USB - No Acknowledge Status Bit */
3074
 
3075
/* USBMAINT Control Bits */
3076
#define UTIFG                  (0x0001)       /* USB - Timer Interrupt Flag */
3077
#define UTIE                   (0x0002)       /* USB - Timer Interrupt Enable */
3078
//#define RESERVED       (0x0004)  /* USB -  */
3079
//#define RESERVED       (0x0008)  /* USB -  */
3080
//#define RESERVED       (0x0010)  /* USB -  */
3081
//#define RESERVED       (0x0020)  /* USB -  */
3082
//#define RESERVED       (0x0040)  /* USB -  */
3083
//#define RESERVED       (0x0080)  /* USB -  */
3084
#define TSGEN                  (0x0100)       /* USB - Time Stamp Generator Enable */
3085
#define TSESEL0                (0x0200)       /* USB - Time Stamp Event Select Bit 0 */
3086
#define TSESEL1                (0x0400)       /* USB - Time Stamp Event Select Bit 1 */
3087
#define TSE3                   (0x0800)       /* USB - Time Stamp Event #3 Bit */
3088
//#define RESERVED       (0x1000)  /* USB -  */
3089
#define UTSEL0                 (0x2000)       /* USB - Timer Select Bit 0 */
3090
#define UTSEL1                 (0x4000)       /* USB - Timer Select Bit 1 */
3091
#define UTSEL2                 (0x8000)       /* USB - Timer Select Bit 2 */
3092
 
3093
/* USBMAINT Control Bits */
3094
#define UTIFG_L                (0x0001)       /* USB - Timer Interrupt Flag */
3095
#define UTIE_L                 (0x0002)       /* USB - Timer Interrupt Enable */
3096
//#define RESERVED       (0x0004)  /* USB -  */
3097
//#define RESERVED       (0x0008)  /* USB -  */
3098
//#define RESERVED       (0x0010)  /* USB -  */
3099
//#define RESERVED       (0x0020)  /* USB -  */
3100
//#define RESERVED       (0x0040)  /* USB -  */
3101
//#define RESERVED       (0x0080)  /* USB -  */
3102
//#define RESERVED       (0x1000)  /* USB -  */
3103
 
3104
/* USBMAINT Control Bits */
3105
//#define RESERVED       (0x0004)  /* USB -  */
3106
//#define RESERVED       (0x0008)  /* USB -  */
3107
//#define RESERVED       (0x0010)  /* USB -  */
3108
//#define RESERVED       (0x0020)  /* USB -  */
3109
//#define RESERVED       (0x0040)  /* USB -  */
3110
//#define RESERVED       (0x0080)  /* USB -  */
3111
#define TSGEN_H                (0x0001)       /* USB - Time Stamp Generator Enable */
3112
#define TSESEL0_H              (0x0002)       /* USB - Time Stamp Event Select Bit 0 */
3113
#define TSESEL1_H              (0x0004)       /* USB - Time Stamp Event Select Bit 1 */
3114
#define TSE3_H                 (0x0008)       /* USB - Time Stamp Event #3 Bit */
3115
//#define RESERVED       (0x1000)  /* USB -  */
3116
#define UTSEL0_H               (0x0020)       /* USB - Timer Select Bit 0 */
3117
#define UTSEL1_H               (0x0040)       /* USB - Timer Select Bit 1 */
3118
#define UTSEL2_H               (0x0080)       /* USB - Timer Select Bit 2 */
3119
 
3120
#define TSESEL_0               (0x0000)       /* USB - Time Stamp Event Select: 0 */
3121
#define TSESEL_1               (0x0200)       /* USB - Time Stamp Event Select: 1 */
3122
#define TSESEL_2               (0x0400)       /* USB - Time Stamp Event Select: 2 */
3123
#define TSESEL_3               (0x0600)       /* USB - Time Stamp Event Select: 3 */
3124
 
3125
#define UTSEL_0                (0x0000)       /* USB - Timer Select: 0 */
3126
#define UTSEL_1                (0x2000)       /* USB - Timer Select: 1 */
3127
#define UTSEL_2                (0x4000)       /* USB - Timer Select: 2 */
3128
#define UTSEL_3                (0x6000)       /* USB - Timer Select: 3 */
3129
#define UTSEL_4                (0x8000)       /* USB - Timer Select: 4 */
3130
#define UTSEL_5                (0xA000)       /* USB - Timer Select: 5 */
3131
#define UTSEL_6                (0xC000)       /* USB - Timer Select: 6 */
3132
#define UTSEL_7                (0xE000)       /* USB - Timer Select: 7 */
3133
 
3134
/* USBCTL Control Bits */
3135
#define DIR                    (0x0001)       /* USB - Data Response Bit */
3136
//#define RESERVED       (0x0002)  /* USB -  */
3137
//#define RESERVED       (0x0004)  /* USB -  */
3138
//#define RESERVED       (0x0008)  /* USB -  */
3139
#define FRSTE                  (0x0010)       /* USB - Function Reset Connection Enable */
3140
#define RWUP                   (0x0020)       /* USB - Device Remote Wakeup Request */
3141
#define FEN                    (0x0040)       /* USB - Function Enable Bit */
3142
//#define RESERVED       (0x0080)  /* USB -  */
3143
 
3144
/* USBIE Control Bits */
3145
#define STPOWIE                (0x0001)       /* USB - Setup Overwrite Interrupt Enable */
3146
//#define RESERVED       (0x0002)  /* USB -  */
3147
#define SETUPIE                (0x0004)       /* USB - Setup Interrupt Enable */
3148
//#define RESERVED       (0x0008)  /* USB -  */
3149
//#define RESERVED       (0x0010)  /* USB -  */
3150
#define RESRIE                 (0x0020)       /* USB - Function Resume Request Interrupt Enable */
3151
#define SUSRIE                 (0x0040)       /* USB - Function Suspend Request Interrupt Enable */
3152
#define RSTRIE                 (0x0080)       /* USB - Function Reset Request Interrupt Enable */
3153
 
3154
/* USBIFG Control Bits */
3155
#define STPOWIFG               (0x0001)       /* USB - Setup Overwrite Interrupt Flag */
3156
//#define RESERVED       (0x0002)  /* USB -  */
3157
#define SETUPIFG               (0x0004)       /* USB - Setup Interrupt Flag */
3158
//#define RESERVED       (0x0008)  /* USB -  */
3159
//#define RESERVED       (0x0010)  /* USB -  */
3160
#define RESRIFG                (0x0020)       /* USB - Function Resume Request Interrupt Flag */
3161
#define SUSRIFG                (0x0040)       /* USB - Function Suspend Request Interrupt Flag */
3162
#define RSTRIFG                (0x0080)       /* USB - Function Reset Request Interrupt Flag */
3163
 
3164
//values of USBVECINT when USB-interrupt occured
3165
#define     USBVECINT_NONE     0x00
3166
#define     USBVECINT_PWR_DROP 0x02
3167
#define     USBVECINT_PLL_LOCK 0x04
3168
#define     USBVECINT_PLL_SIGNAL 0x06
3169
#define     USBVECINT_PLL_RANGE 0x08
3170
#define     USBVECINT_PWR_VBUSOn 0x0A
3171
#define     USBVECINT_PWR_VBUSOff 0x0C
3172
#define     USBVECINT_USB_TIMESTAMP 0x10
3173
#define     USBVECINT_INPUT_ENDPOINT0 0x12
3174
#define     USBVECINT_OUTPUT_ENDPOINT0 0x14
3175
#define     USBVECINT_RSTR     0x16
3176
#define     USBVECINT_SUSR     0x18
3177
#define     USBVECINT_RESR     0x1A
3178
#define     USBVECINT_SETUP_PACKET_RECEIVED 0x20
3179
#define     USBVECINT_STPOW_PACKET_RECEIVED 0x22
3180
#define     USBVECINT_INPUT_ENDPOINT1 0x24
3181
#define     USBVECINT_INPUT_ENDPOINT2 0x26
3182
#define     USBVECINT_INPUT_ENDPOINT3 0x28
3183
#define     USBVECINT_INPUT_ENDPOINT4 0x2A
3184
#define     USBVECINT_INPUT_ENDPOINT5 0x2C
3185
#define     USBVECINT_INPUT_ENDPOINT6 0x2E
3186
#define     USBVECINT_INPUT_ENDPOINT7 0x30
3187
#define     USBVECINT_OUTPUT_ENDPOINT1 0x32
3188
#define     USBVECINT_OUTPUT_ENDPOINT2 0x34
3189
#define     USBVECINT_OUTPUT_ENDPOINT3 0x36
3190
#define     USBVECINT_OUTPUT_ENDPOINT4 0x38
3191
#define     USBVECINT_OUTPUT_ENDPOINT5 0x3A
3192
#define     USBVECINT_OUTPUT_ENDPOINT6 0x3C
3193
#define     USBVECINT_OUTPUT_ENDPOINT7 0x3E
3194
 
3195
 
3196
/* ========================================================================= */
3197
/* USB Operation Registers */
3198
/* ========================================================================= */
3199
 
3200
SFR_8BIT(USBIEPSIZXY_7);                      /* Input Endpoint_7: X/Y-buffer size  */
3201
SFR_8BIT(USBIEPBCTY_7);                       /* Input Endpoint_7: Y-byte count  */
3202
SFR_8BIT(USBIEPBBAY_7);                       /* Input Endpoint_7: Y-buffer base addr.  */
3203
//sfrb    Spare    (0x23FC)   /* Not used  */
3204
//sfrb    Spare    (0x23FB)   /* Not used  */
3205
SFR_8BIT(USBIEPBCTX_7);                       /* Input Endpoint_7: X-byte count  */
3206
SFR_8BIT(USBIEPBBAX_7);                       /* Input Endpoint_7: X-buffer base addr. */
3207
SFR_8BIT(USBIEPCNF_7);                        /* Input Endpoint_7: Configuration  */
3208
SFR_8BIT(USBIEPSIZXY_6);                      /* Input Endpoint_6: X/Y-buffer size  */
3209
SFR_8BIT(USBIEPBCTY_6);                       /* Input Endpoint_6: Y-byte count */
3210
SFR_8BIT(USBIEPBBAY_6);                       /* Input Endpoint_6: Y-buffer base addr. */
3211
//sfrb    Spare    (0x23F4)   /* Not used  */
3212
//sfrb    Spare    (0x23F3)   /* Not used  */
3213
SFR_8BIT(USBIEPBCTX_6);                       /* Input Endpoint_6: X-byte count */
3214
SFR_8BIT(USBIEPBBAX_6);                       /* Input Endpoint_6: X-buffer base addr. */
3215
SFR_8BIT(USBIEPCNF_6);                        /* Input Endpoint_6: Configuration */
3216
SFR_8BIT(USBIEPSIZXY_5);                      /* Input Endpoint_5: X/Y-buffer size */
3217
SFR_8BIT(USBIEPBCTY_5);                       /* Input Endpoint_5: Y-byte count */
3218
SFR_8BIT(USBIEPBBAY_5);                       /* Input Endpoint_5: Y-buffer base addr. */
3219
//sfrb    Spare    (0x23EC)   /* Not used */
3220
//sfrb    Spare    (0x23EB)   /* Not used */
3221
SFR_8BIT(USBIEPBCTX_5);                       /* Input Endpoint_5: X-byte count */
3222
SFR_8BIT(USBIEPBBAX_5);                       /* Input Endpoint_5: X-buffer base addr. */
3223
SFR_8BIT(USBIEPCNF_5);                        /* Input Endpoint_5: Configuration */
3224
SFR_8BIT(USBIEPSIZXY_4);                      /* Input Endpoint_4: X/Y-buffer size */
3225
SFR_8BIT(USBIEPBCTY_4);                       /* Input Endpoint_4: Y-byte count */
3226
SFR_8BIT(USBIEPBBAY_4);                       /* Input Endpoint_4: Y-buffer base addr. */
3227
//sfrb    Spare    (0x23E4)   /* Not used */
3228
//sfrb    Spare    (0x23E3)   /* Not used */
3229
SFR_8BIT(USBIEPBCTX_4);                       /* Input Endpoint_4: X-byte count */
3230
SFR_8BIT(USBIEPBBAX_4);                       /* Input Endpoint_4: X-buffer base addr. */
3231
SFR_8BIT(USBIEPCNF_4);                        /* Input Endpoint_4: Configuration */
3232
SFR_8BIT(USBIEPSIZXY_3);                      /* Input Endpoint_3: X/Y-buffer size */
3233
SFR_8BIT(USBIEPBCTY_3);                       /* Input Endpoint_3: Y-byte count */
3234
SFR_8BIT(USBIEPBBAY_3);                       /* Input Endpoint_3: Y-buffer base addr. */
3235
//sfrb    Spare    (0x23DC)   /* Not used */
3236
//sfrb    Spare    (0x23DB)   /* Not used */
3237
SFR_8BIT(USBIEPBCTX_3);                       /* Input Endpoint_3: X-byte count */
3238
SFR_8BIT(USBIEPBBAX_3);                       /* Input Endpoint_3: X-buffer base addr. */
3239
SFR_8BIT(USBIEPCNF_3);                        /* Input Endpoint_3: Configuration */
3240
SFR_8BIT(USBIEPSIZXY_2);                      /* Input Endpoint_2: X/Y-buffer size */
3241
SFR_8BIT(USBIEPBCTY_2);                       /* Input Endpoint_2: Y-byte count */
3242
SFR_8BIT(USBIEPBBAY_2);                       /* Input Endpoint_2: Y-buffer base addr. */
3243
//sfrb    Spare    (0x23D4)   /* Not used */
3244
//sfrb    Spare    (0x23D3)   /* Not used */
3245
SFR_8BIT(USBIEPBCTX_2);                       /* Input Endpoint_2: X-byte count */
3246
SFR_8BIT(USBIEPBBAX_2);                       /* Input Endpoint_2: X-buffer base addr. */
3247
SFR_8BIT(USBIEPCNF_2);                        /* Input Endpoint_2: Configuration */
3248
SFR_8BIT(USBIEPSIZXY_1);                      /* Input Endpoint_1: X/Y-buffer size */
3249
SFR_8BIT(USBIEPBCTY_1);                       /* Input Endpoint_1: Y-byte count */
3250
SFR_8BIT(USBIEPBBAY_1);                       /* Input Endpoint_1: Y-buffer base addr. */
3251
//sfrb    Spare    (0x23CC)   /* Not used */
3252
//sfrb    Spare    (0x23CB)   /* Not used */
3253
SFR_8BIT(USBIEPBCTX_1);                       /* Input Endpoint_1: X-byte count */
3254
SFR_8BIT(USBIEPBBAX_1);                       /* Input Endpoint_1: X-buffer base addr. */
3255
SFR_8BIT(USBIEPCNF_1);                        /* Input Endpoint_1: Configuration */
3256
//sfrb       (0x23C7)   0x0000 */
3257
//sfrb     RESERVED      (0x1C00)    /* */
3258
//sfrb       (0x23C0)   0x0000 */
3259
SFR_8BIT(USBOEPSIZXY_7);                      /* Output Endpoint_7: X/Y-buffer size */
3260
SFR_8BIT(USBOEPBCTY_7);                       /* Output Endpoint_7: Y-byte count */
3261
SFR_8BIT(USBOEPBBAY_7);                       /* Output Endpoint_7: Y-buffer base addr. */
3262
//sfrb    Spare    (0x23BC)   /* Not used */
3263
//sfrb    Spare    (0x23BB)   /* Not used */
3264
SFR_8BIT(USBOEPBCTX_7);                       /* Output Endpoint_7: X-byte count */
3265
SFR_8BIT(USBOEPBBAX_7);                       /* Output Endpoint_7: X-buffer base addr. */
3266
SFR_8BIT(USBOEPCNF_7);                        /* Output Endpoint_7: Configuration */
3267
SFR_8BIT(USBOEPSIZXY_6);                      /* Output Endpoint_6: X/Y-buffer size */
3268
SFR_8BIT(USBOEPBCTY_6);                       /* Output Endpoint_6: Y-byte count */
3269
SFR_8BIT(USBOEPBBAY_6);                       /* Output Endpoint_6: Y-buffer base addr. */
3270
//sfrb    Spare    (0x23B4)   /* Not used */
3271
//sfrb    Spare    (0x23B3)   /* Not used */
3272
SFR_8BIT(USBOEPBCTX_6);                       /* Output Endpoint_6: X-byte count */
3273
SFR_8BIT(USBOEPBBAX_6);                       /* Output Endpoint_6: X-buffer base addr. */
3274
SFR_8BIT(USBOEPCNF_6);                        /* Output Endpoint_6: Configuration */
3275
SFR_8BIT(USBOEPSIZXY_5);                      /* Output Endpoint_5: X/Y-buffer size */
3276
SFR_8BIT(USBOEPBCTY_5);                       /* Output Endpoint_5: Y-byte count */
3277
SFR_8BIT(USBOEPBBAY_5);                       /* Output Endpoint_5: Y-buffer base addr. */
3278
//sfrb    Spare    (0x23AC)   /* Not used */
3279
//sfrb    Spare    (0x23AB)   /* Not used */
3280
SFR_8BIT(USBOEPBCTX_5);                       /* Output Endpoint_5: X-byte count */
3281
SFR_8BIT(USBOEPBBAX_5);                       /* Output Endpoint_5: X-buffer base addr. */
3282
SFR_8BIT(USBOEPCNF_5);                        /* Output Endpoint_5: Configuration */
3283
SFR_8BIT(USBOEPSIZXY_4);                      /* Output Endpoint_4: X/Y-buffer size */
3284
SFR_8BIT(USBOEPBCTY_4);                       /* Output Endpoint_4: Y-byte count */
3285
SFR_8BIT(USBOEPBBAY_4);                       /* Output Endpoint_4: Y-buffer base addr. */
3286
//sfrb    Spare    (0x23A4)   /* Not used */
3287
//sfrb    Spare    (0x23A3)   /* Not used */
3288
SFR_8BIT(USBOEPBCTX_4);                       /* Output Endpoint_4: X-byte count */
3289
SFR_8BIT(USBOEPBBAX_4);                       /* Output Endpoint_4: X-buffer base addr. */
3290
SFR_8BIT(USBOEPCNF_4);                        /* Output Endpoint_4: Configuration */
3291
SFR_8BIT(USBOEPSIZXY_3);                      /* Output Endpoint_3: X/Y-buffer size */
3292
SFR_8BIT(USBOEPBCTY_3);                       /* Output Endpoint_3: Y-byte count */
3293
SFR_8BIT(USBOEPBBAY_3);                       /* Output Endpoint_3: Y-buffer base addr. */
3294
//sfrb    Spare    (0x239C)   /* Not used */
3295
//sfrb    Spare    (0x239B)   /* Not used */
3296
SFR_8BIT(USBOEPBCTX_3);                       /* Output Endpoint_3: X-byte count */
3297
SFR_8BIT(USBOEPBBAX_3);                       /* Output Endpoint_3: X-buffer base addr. */
3298
SFR_8BIT(USBOEPCNF_3);                        /* Output Endpoint_3: Configuration */
3299
SFR_8BIT(USBOEPSIZXY_2);                      /* Output Endpoint_2: X/Y-buffer size */
3300
SFR_8BIT(USBOEPBCTY_2);                       /* Output Endpoint_2: Y-byte count */
3301
SFR_8BIT(USBOEPBBAY_2);                       /* Output Endpoint_2: Y-buffer base addr. */
3302
//sfrb    Spare    (0x2394)   /* Not used */
3303
//sfrb    Spare    (0x2393)   /* Not used */
3304
SFR_8BIT(USBOEPBCTX_2);                       /* Output Endpoint_2: X-byte count */
3305
SFR_8BIT(USBOEPBBAX_2);                       /* Output Endpoint_2: X-buffer base addr. */
3306
SFR_8BIT(USBOEPCNF_2);                        /* Output Endpoint_2: Configuration */
3307
SFR_8BIT(USBOEPSIZXY_1);                      /* Output Endpoint_1: X/Y-buffer size */
3308
SFR_8BIT(USBOEPBCTY_1);                       /* Output Endpoint_1: Y-byte count */
3309
SFR_8BIT(USBOEPBBAY_1);                       /* Output Endpoint_1: Y-buffer base addr. */
3310
//sfrb    Spare    (0x238C)   /* Not used */
3311
//sfrb    Spare    (0x238B)   /* Not used */
3312
SFR_8BIT(USBOEPBCTX_1);                       /* Output Endpoint_1: X-byte count */
3313
SFR_8BIT(USBOEPBBAX_1);                       /* Output Endpoint_1: X-buffer base addr. */
3314
SFR_8BIT(USBOEPCNF_1);                        /* Output Endpoint_1: Configuration */
3315
SFR_8BIT(USBSUBLK);                           /* Setup Packet Block */
3316
SFR_8BIT(USBIEP0BUF);                         /* Input endpoint_0 buffer */
3317
SFR_8BIT(USBOEP0BUF);                         /* Output endpoint_0 buffer */
3318
SFR_8BIT(USBTOPBUFF);                         /* Top of buffer space */
3319
//         (1904 Bytes)               /* Buffer space */
3320
SFR_8BIT(USBSTABUFF);                         /* Start of buffer space */
3321
 
3322
/* USBIEPCNF_n Control Bits */
3323
/* USBOEPCNF_n Control Bits */
3324
//#define RESERVED       (0x0001)  /* USB -  */
3325
//#define RESERVED       (0x0001)  /* USB -  */
3326
#define DBUF                   (0x0010)       /* USB - Double Buffer Enable */
3327
//#define RESERVED       (0x0040)  /* USB -  */
3328
 
3329
/* USBIEPBCNT_n Control Bits */
3330
/* USBOEPBCNT_n Control Bits */
3331
#define CNT4                   (0x0010)       /* USB - Byte Count Bit 3 */
3332
#define CNT5                   (0x0020)       /* USB - Byte Count Bit 3 */
3333
#define CNT6                   (0x0040)       /* USB - Byte Count Bit 3 */
3334
/************************************************************
3335
* UNIFIED CLOCK SYSTEM
3336
************************************************************/
3337
#define __MSP430_HAS_UCS__                    /* Definition to show that Module is available */
3338
#define __MSP430_BASEADDRESS_UCS__ 0x0160
3339
 
3340
SFR_16BIT(UCSCTL0);                           /* UCS Control Register 0 */
3341
SFR_8BIT(UCSCTL0_L);                          /* UCS Control Register 0 */
3342
SFR_8BIT(UCSCTL0_H);                          /* UCS Control Register 0 */
3343
SFR_16BIT(UCSCTL1);                           /* UCS Control Register 1 */
3344
SFR_8BIT(UCSCTL1_L);                          /* UCS Control Register 1 */
3345
SFR_8BIT(UCSCTL1_H);                          /* UCS Control Register 1 */
3346
SFR_16BIT(UCSCTL2);                           /* UCS Control Register 2 */
3347
SFR_8BIT(UCSCTL2_L);                          /* UCS Control Register 2 */
3348
SFR_8BIT(UCSCTL2_H);                          /* UCS Control Register 2 */
3349
SFR_16BIT(UCSCTL3);                           /* UCS Control Register 3 */
3350
SFR_8BIT(UCSCTL3_L);                          /* UCS Control Register 3 */
3351
SFR_8BIT(UCSCTL3_H);                          /* UCS Control Register 3 */
3352
SFR_16BIT(UCSCTL4);                           /* UCS Control Register 4 */
3353
SFR_8BIT(UCSCTL4_L);                          /* UCS Control Register 4 */
3354
SFR_8BIT(UCSCTL4_H);                          /* UCS Control Register 4 */
3355
SFR_16BIT(UCSCTL5);                           /* UCS Control Register 5 */
3356
SFR_8BIT(UCSCTL5_L);                          /* UCS Control Register 5 */
3357
SFR_8BIT(UCSCTL5_H);                          /* UCS Control Register 5 */
3358
SFR_16BIT(UCSCTL6);                           /* UCS Control Register 6 */
3359
SFR_8BIT(UCSCTL6_L);                          /* UCS Control Register 6 */
3360
SFR_8BIT(UCSCTL6_H);                          /* UCS Control Register 6 */
3361
SFR_16BIT(UCSCTL7);                           /* UCS Control Register 7 */
3362
SFR_8BIT(UCSCTL7_L);                          /* UCS Control Register 7 */
3363
SFR_8BIT(UCSCTL7_H);                          /* UCS Control Register 7 */
3364
SFR_16BIT(UCSCTL8);                           /* UCS Control Register 8 */
3365
SFR_8BIT(UCSCTL8_L);                          /* UCS Control Register 8 */
3366
SFR_8BIT(UCSCTL8_H);                          /* UCS Control Register 8 */
3367
 
3368
/* UCSCTL0 Control Bits */
3369
//#define RESERVED            (0x0001)    /* RESERVED */
3370
//#define RESERVED            (0x0002)    /* RESERVED */
3371
//#define RESERVED            (0x0004)    /* RESERVED */
3372
#define MOD0                   (0x0008)       /* Modulation Bit Counter Bit : 0 */
3373
#define MOD1                   (0x0010)       /* Modulation Bit Counter Bit : 1 */
3374
#define MOD2                   (0x0020)       /* Modulation Bit Counter Bit : 2 */
3375
#define MOD3                   (0x0040)       /* Modulation Bit Counter Bit : 3 */
3376
#define MOD4                   (0x0080)       /* Modulation Bit Counter Bit : 4 */
3377
#define DCO0                   (0x0100)       /* DCO TAP Bit : 0 */
3378
#define DCO1                   (0x0200)       /* DCO TAP Bit : 1 */
3379
#define DCO2                   (0x0400)       /* DCO TAP Bit : 2 */
3380
#define DCO3                   (0x0800)       /* DCO TAP Bit : 3 */
3381
#define DCO4                   (0x1000)       /* DCO TAP Bit : 4 */
3382
//#define RESERVED            (0x2000)    /* RESERVED */
3383
//#define RESERVED            (0x4000)    /* RESERVED */
3384
//#define RESERVED            (0x8000)    /* RESERVED */
3385
 
3386
/* UCSCTL0 Control Bits */
3387
//#define RESERVED            (0x0001)    /* RESERVED */
3388
//#define RESERVED            (0x0002)    /* RESERVED */
3389
//#define RESERVED            (0x0004)    /* RESERVED */
3390
#define MOD0_L                 (0x0008)       /* Modulation Bit Counter Bit : 0 */
3391
#define MOD1_L                 (0x0010)       /* Modulation Bit Counter Bit : 1 */
3392
#define MOD2_L                 (0x0020)       /* Modulation Bit Counter Bit : 2 */
3393
#define MOD3_L                 (0x0040)       /* Modulation Bit Counter Bit : 3 */
3394
#define MOD4_L                 (0x0080)       /* Modulation Bit Counter Bit : 4 */
3395
//#define RESERVED            (0x2000)    /* RESERVED */
3396
//#define RESERVED            (0x4000)    /* RESERVED */
3397
//#define RESERVED            (0x8000)    /* RESERVED */
3398
 
3399
/* UCSCTL0 Control Bits */
3400
//#define RESERVED            (0x0001)    /* RESERVED */
3401
//#define RESERVED            (0x0002)    /* RESERVED */
3402
//#define RESERVED            (0x0004)    /* RESERVED */
3403
#define DCO0_H                 (0x0001)       /* DCO TAP Bit : 0 */
3404
#define DCO1_H                 (0x0002)       /* DCO TAP Bit : 1 */
3405
#define DCO2_H                 (0x0004)       /* DCO TAP Bit : 2 */
3406
#define DCO3_H                 (0x0008)       /* DCO TAP Bit : 3 */
3407
#define DCO4_H                 (0x0010)       /* DCO TAP Bit : 4 */
3408
//#define RESERVED            (0x2000)    /* RESERVED */
3409
//#define RESERVED            (0x4000)    /* RESERVED */
3410
//#define RESERVED            (0x8000)    /* RESERVED */
3411
 
3412
/* UCSCTL1 Control Bits */
3413
#define DISMOD                 (0x0001)       /* Disable Modulation */
3414
//#define RESERVED            (0x0002)    /* RESERVED */
3415
//#define RESERVED            (0x0004)    /* RESERVED */
3416
//#define RESERVED            (0x0008)    /* RESERVED */
3417
#define DCORSEL0               (0x0010)       /* DCO Freq. Range Select Bit : 0 */
3418
#define DCORSEL1               (0x0020)       /* DCO Freq. Range Select Bit : 1 */
3419
#define DCORSEL2               (0x0040)       /* DCO Freq. Range Select Bit : 2 */
3420
//#define RESERVED            (0x0080)    /* RESERVED */
3421
//#define RESERVED            (0x0100)    /* RESERVED */
3422
//#define RESERVED            (0x0200)    /* RESERVED */
3423
//#define RESERVED            (0x0400)    /* RESERVED */
3424
//#define RESERVED            (0x0800)    /* RESERVED */
3425
//#define RESERVED            (0x1000)    /* RESERVED */
3426
//#define RESERVED            (0x2000)    /* RESERVED */
3427
//#define RESERVED            (0x4000)    /* RESERVED */
3428
//#define RESERVED            (0x8000)    /* RESERVED */
3429
 
3430
/* UCSCTL1 Control Bits */
3431
#define DISMOD_L               (0x0001)       /* Disable Modulation */
3432
//#define RESERVED            (0x0002)    /* RESERVED */
3433
//#define RESERVED            (0x0004)    /* RESERVED */
3434
//#define RESERVED            (0x0008)    /* RESERVED */
3435
#define DCORSEL0_L             (0x0010)       /* DCO Freq. Range Select Bit : 0 */
3436
#define DCORSEL1_L             (0x0020)       /* DCO Freq. Range Select Bit : 1 */
3437
#define DCORSEL2_L             (0x0040)       /* DCO Freq. Range Select Bit : 2 */
3438
//#define RESERVED            (0x0080)    /* RESERVED */
3439
//#define RESERVED            (0x0100)    /* RESERVED */
3440
//#define RESERVED            (0x0200)    /* RESERVED */
3441
//#define RESERVED            (0x0400)    /* RESERVED */
3442
//#define RESERVED            (0x0800)    /* RESERVED */
3443
//#define RESERVED            (0x1000)    /* RESERVED */
3444
//#define RESERVED            (0x2000)    /* RESERVED */
3445
//#define RESERVED            (0x4000)    /* RESERVED */
3446
//#define RESERVED            (0x8000)    /* RESERVED */
3447
 
3448
/* UCSCTL1 Control Bits */
3449
//#define RESERVED            (0x0002)    /* RESERVED */
3450
//#define RESERVED            (0x0004)    /* RESERVED */
3451
//#define RESERVED            (0x0008)    /* RESERVED */
3452
//#define RESERVED            (0x0080)    /* RESERVED */
3453
//#define RESERVED            (0x0100)    /* RESERVED */
3454
//#define RESERVED            (0x0200)    /* RESERVED */
3455
//#define RESERVED            (0x0400)    /* RESERVED */
3456
//#define RESERVED            (0x0800)    /* RESERVED */
3457
//#define RESERVED            (0x1000)    /* RESERVED */
3458
//#define RESERVED            (0x2000)    /* RESERVED */
3459
//#define RESERVED            (0x4000)    /* RESERVED */
3460
//#define RESERVED            (0x8000)    /* RESERVED */
3461
 
3462
#define DCORSEL_0              (0x0000)       /* DCO RSEL 0 */
3463
#define DCORSEL_1              (0x0010)       /* DCO RSEL 1 */
3464
#define DCORSEL_2              (0x0020)       /* DCO RSEL 2 */
3465
#define DCORSEL_3              (0x0030)       /* DCO RSEL 3 */
3466
#define DCORSEL_4              (0x0040)       /* DCO RSEL 4 */
3467
#define DCORSEL_5              (0x0050)       /* DCO RSEL 5 */
3468
#define DCORSEL_6              (0x0060)       /* DCO RSEL 6 */
3469
#define DCORSEL_7              (0x0070)       /* DCO RSEL 7 */
3470
 
3471
/* UCSCTL2 Control Bits */
3472
#define FLLN0                  (0x0001)       /* FLL Multipier Bit : 0 */
3473
#define FLLN1                  (0x0002)       /* FLL Multipier Bit : 1 */
3474
#define FLLN2                  (0x0004)       /* FLL Multipier Bit : 2 */
3475
#define FLLN3                  (0x0008)       /* FLL Multipier Bit : 3 */
3476
#define FLLN4                  (0x0010)       /* FLL Multipier Bit : 4 */
3477
#define FLLN5                  (0x0020)       /* FLL Multipier Bit : 5 */
3478
#define FLLN6                  (0x0040)       /* FLL Multipier Bit : 6 */
3479
#define FLLN7                  (0x0080)       /* FLL Multipier Bit : 7 */
3480
#define FLLN8                  (0x0100)       /* FLL Multipier Bit : 8 */
3481
#define FLLN9                  (0x0200)       /* FLL Multipier Bit : 9 */
3482
//#define RESERVED            (0x0400)    /* RESERVED */
3483
//#define RESERVED            (0x0800)    /* RESERVED */
3484
#define FLLD0                  (0x1000)       /* Loop Divider Bit : 0 */
3485
#define FLLD1                  (0x2000)       /* Loop Divider Bit : 1 */
3486
#define FLLD2                  (0x4000)       /* Loop Divider Bit : 1 */
3487
//#define RESERVED            (0x8000)    /* RESERVED */
3488
 
3489
/* UCSCTL2 Control Bits */
3490
#define FLLN0_L                (0x0001)       /* FLL Multipier Bit : 0 */
3491
#define FLLN1_L                (0x0002)       /* FLL Multipier Bit : 1 */
3492
#define FLLN2_L                (0x0004)       /* FLL Multipier Bit : 2 */
3493
#define FLLN3_L                (0x0008)       /* FLL Multipier Bit : 3 */
3494
#define FLLN4_L                (0x0010)       /* FLL Multipier Bit : 4 */
3495
#define FLLN5_L                (0x0020)       /* FLL Multipier Bit : 5 */
3496
#define FLLN6_L                (0x0040)       /* FLL Multipier Bit : 6 */
3497
#define FLLN7_L                (0x0080)       /* FLL Multipier Bit : 7 */
3498
//#define RESERVED            (0x0400)    /* RESERVED */
3499
//#define RESERVED            (0x0800)    /* RESERVED */
3500
//#define RESERVED            (0x8000)    /* RESERVED */
3501
 
3502
/* UCSCTL2 Control Bits */
3503
#define FLLN8_H                (0x0001)       /* FLL Multipier Bit : 8 */
3504
#define FLLN9_H                (0x0002)       /* FLL Multipier Bit : 9 */
3505
//#define RESERVED            (0x0400)    /* RESERVED */
3506
//#define RESERVED            (0x0800)    /* RESERVED */
3507
#define FLLD0_H                (0x0010)       /* Loop Divider Bit : 0 */
3508
#define FLLD1_H                (0x0020)       /* Loop Divider Bit : 1 */
3509
#define FLLD2_H                (0x0040)       /* Loop Divider Bit : 1 */
3510
//#define RESERVED            (0x8000)    /* RESERVED */
3511
 
3512
#define FLLD_0                 (0x0000)       /* Multiply Selected Loop Freq. 1 */
3513
#define FLLD_1                 (0x1000)       /* Multiply Selected Loop Freq. 2 */
3514
#define FLLD_2                 (0x2000)       /* Multiply Selected Loop Freq. 4 */
3515
#define FLLD_3                 (0x3000)       /* Multiply Selected Loop Freq. 8 */
3516
#define FLLD_4                 (0x4000)       /* Multiply Selected Loop Freq. 16 */
3517
#define FLLD_5                 (0x5000)       /* Multiply Selected Loop Freq. 32 */
3518
#define FLLD_6                 (0x6000)       /* Multiply Selected Loop Freq. 32 */
3519
#define FLLD_7                 (0x7000)       /* Multiply Selected Loop Freq. 32 */
3520
#define FLLD__1                (0x0000)       /* Multiply Selected Loop Freq. By 1 */
3521
#define FLLD__2                (0x1000)       /* Multiply Selected Loop Freq. By 2 */
3522
#define FLLD__4                (0x2000)       /* Multiply Selected Loop Freq. By 4 */
3523
#define FLLD__8                (0x3000)       /* Multiply Selected Loop Freq. By 8 */
3524
#define FLLD__16               (0x4000)       /* Multiply Selected Loop Freq. By 16 */
3525
#define FLLD__32               (0x5000)       /* Multiply Selected Loop Freq. By 32 */
3526
 
3527
/* UCSCTL3 Control Bits */
3528
#define FLLREFDIV0             (0x0001)       /* Reference Divider Bit : 0 */
3529
#define FLLREFDIV1             (0x0002)       /* Reference Divider Bit : 1 */
3530
#define FLLREFDIV2             (0x0004)       /* Reference Divider Bit : 2 */
3531
//#define RESERVED            (0x0008)    /* RESERVED */
3532
#define SELREF0                (0x0010)       /* FLL Reference Clock Select Bit : 0 */
3533
#define SELREF1                (0x0020)       /* FLL Reference Clock Select Bit : 1 */
3534
#define SELREF2                (0x0040)       /* FLL Reference Clock Select Bit : 2 */
3535
//#define RESERVED            (0x0080)    /* RESERVED */
3536
//#define RESERVED            (0x0100)    /* RESERVED */
3537
//#define RESERVED            (0x0200)    /* RESERVED */
3538
//#define RESERVED            (0x0400)    /* RESERVED */
3539
//#define RESERVED            (0x0800)    /* RESERVED */
3540
//#define RESERVED            (0x1000)    /* RESERVED */
3541
//#define RESERVED            (0x2000)    /* RESERVED */
3542
//#define RESERVED            (0x4000)    /* RESERVED */
3543
//#define RESERVED            (0x8000)    /* RESERVED */
3544
 
3545
/* UCSCTL3 Control Bits */
3546
#define FLLREFDIV0_L           (0x0001)       /* Reference Divider Bit : 0 */
3547
#define FLLREFDIV1_L           (0x0002)       /* Reference Divider Bit : 1 */
3548
#define FLLREFDIV2_L           (0x0004)       /* Reference Divider Bit : 2 */
3549
//#define RESERVED            (0x0008)    /* RESERVED */
3550
#define SELREF0_L              (0x0010)       /* FLL Reference Clock Select Bit : 0 */
3551
#define SELREF1_L              (0x0020)       /* FLL Reference Clock Select Bit : 1 */
3552
#define SELREF2_L              (0x0040)       /* FLL Reference Clock Select Bit : 2 */
3553
//#define RESERVED            (0x0080)    /* RESERVED */
3554
//#define RESERVED            (0x0100)    /* RESERVED */
3555
//#define RESERVED            (0x0200)    /* RESERVED */
3556
//#define RESERVED            (0x0400)    /* RESERVED */
3557
//#define RESERVED            (0x0800)    /* RESERVED */
3558
//#define RESERVED            (0x1000)    /* RESERVED */
3559
//#define RESERVED            (0x2000)    /* RESERVED */
3560
//#define RESERVED            (0x4000)    /* RESERVED */
3561
//#define RESERVED            (0x8000)    /* RESERVED */
3562
 
3563
/* UCSCTL3 Control Bits */
3564
//#define RESERVED            (0x0008)    /* RESERVED */
3565
//#define RESERVED            (0x0080)    /* RESERVED */
3566
//#define RESERVED            (0x0100)    /* RESERVED */
3567
//#define RESERVED            (0x0200)    /* RESERVED */
3568
//#define RESERVED            (0x0400)    /* RESERVED */
3569
//#define RESERVED            (0x0800)    /* RESERVED */
3570
//#define RESERVED            (0x1000)    /* RESERVED */
3571
//#define RESERVED            (0x2000)    /* RESERVED */
3572
//#define RESERVED            (0x4000)    /* RESERVED */
3573
//#define RESERVED            (0x8000)    /* RESERVED */
3574
 
3575
#define FLLREFDIV_0            (0x0000)       /* Reference Divider: f(LFCLK)/1 */
3576
#define FLLREFDIV_1            (0x0001)       /* Reference Divider: f(LFCLK)/2 */
3577
#define FLLREFDIV_2            (0x0002)       /* Reference Divider: f(LFCLK)/4 */
3578
#define FLLREFDIV_3            (0x0003)       /* Reference Divider: f(LFCLK)/8 */
3579
#define FLLREFDIV_4            (0x0004)       /* Reference Divider: f(LFCLK)/12 */
3580
#define FLLREFDIV_5            (0x0005)       /* Reference Divider: f(LFCLK)/16 */
3581
#define FLLREFDIV_6            (0x0006)       /* Reference Divider: f(LFCLK)/16 */
3582
#define FLLREFDIV_7            (0x0007)       /* Reference Divider: f(LFCLK)/16 */
3583
#define FLLREFDIV__1           (0x0000)       /* Reference Divider: f(LFCLK)/1 */
3584
#define FLLREFDIV__2           (0x0001)       /* Reference Divider: f(LFCLK)/2 */
3585
#define FLLREFDIV__4           (0x0002)       /* Reference Divider: f(LFCLK)/4 */
3586
#define FLLREFDIV__8           (0x0003)       /* Reference Divider: f(LFCLK)/8 */
3587
#define FLLREFDIV__12          (0x0004)       /* Reference Divider: f(LFCLK)/12 */
3588
#define FLLREFDIV__16          (0x0005)       /* Reference Divider: f(LFCLK)/16 */
3589
#define SELREF_0               (0x0000)       /* FLL Reference Clock Select 0 */
3590
#define SELREF_1               (0x0010)       /* FLL Reference Clock Select 1 */
3591
#define SELREF_2               (0x0020)       /* FLL Reference Clock Select 2 */
3592
#define SELREF_3               (0x0030)       /* FLL Reference Clock Select 3 */
3593
#define SELREF_4               (0x0040)       /* FLL Reference Clock Select 4 */
3594
#define SELREF_5               (0x0050)       /* FLL Reference Clock Select 5 */
3595
#define SELREF_6               (0x0060)       /* FLL Reference Clock Select 6 */
3596
#define SELREF_7               (0x0070)       /* FLL Reference Clock Select 7 */
3597
#define SELREF__XT1CLK         (0x0000)       /* Multiply Selected Loop Freq. By XT1CLK */
3598
#define SELREF__REFOCLK        (0x0020)       /* Multiply Selected Loop Freq. By REFOCLK */
3599
#define SELREF__XT2CLK         (0x0050)       /* Multiply Selected Loop Freq. By XT2CLK */
3600
 
3601
/* UCSCTL4 Control Bits */
3602
#define SELM0                  (0x0001)       /* MCLK Source Select Bit: 0 */
3603
#define SELM1                  (0x0002)       /* MCLK Source Select Bit: 1 */
3604
#define SELM2                  (0x0004)       /* MCLK Source Select Bit: 2 */
3605
//#define RESERVED            (0x0008)    /* RESERVED */
3606
#define SELS0                  (0x0010)       /* SMCLK Source Select Bit: 0 */
3607
#define SELS1                  (0x0020)       /* SMCLK Source Select Bit: 1 */
3608
#define SELS2                  (0x0040)       /* SMCLK Source Select Bit: 2 */
3609
//#define RESERVED            (0x0080)    /* RESERVED */
3610
#define SELA0                  (0x0100)       /* ACLK Source Select Bit: 0 */
3611
#define SELA1                  (0x0200)       /* ACLK Source Select Bit: 1 */
3612
#define SELA2                  (0x0400)       /* ACLK Source Select Bit: 2 */
3613
//#define RESERVED            (0x0800)    /* RESERVED */
3614
//#define RESERVED            (0x1000)    /* RESERVED */
3615
//#define RESERVED            (0x2000)    /* RESERVED */
3616
//#define RESERVED            (0x4000)    /* RESERVED */
3617
//#define RESERVED            (0x8000)    /* RESERVED */
3618
 
3619
/* UCSCTL4 Control Bits */
3620
#define SELM0_L                (0x0001)       /* MCLK Source Select Bit: 0 */
3621
#define SELM1_L                (0x0002)       /* MCLK Source Select Bit: 1 */
3622
#define SELM2_L                (0x0004)       /* MCLK Source Select Bit: 2 */
3623
//#define RESERVED            (0x0008)    /* RESERVED */
3624
#define SELS0_L                (0x0010)       /* SMCLK Source Select Bit: 0 */
3625
#define SELS1_L                (0x0020)       /* SMCLK Source Select Bit: 1 */
3626
#define SELS2_L                (0x0040)       /* SMCLK Source Select Bit: 2 */
3627
//#define RESERVED            (0x0080)    /* RESERVED */
3628
//#define RESERVED            (0x0800)    /* RESERVED */
3629
//#define RESERVED            (0x1000)    /* RESERVED */
3630
//#define RESERVED            (0x2000)    /* RESERVED */
3631
//#define RESERVED            (0x4000)    /* RESERVED */
3632
//#define RESERVED            (0x8000)    /* RESERVED */
3633
 
3634
/* UCSCTL4 Control Bits */
3635
//#define RESERVED            (0x0008)    /* RESERVED */
3636
//#define RESERVED            (0x0080)    /* RESERVED */
3637
#define SELA0_H                (0x0001)       /* ACLK Source Select Bit: 0 */
3638
#define SELA1_H                (0x0002)       /* ACLK Source Select Bit: 1 */
3639
#define SELA2_H                (0x0004)       /* ACLK Source Select Bit: 2 */
3640
//#define RESERVED            (0x0800)    /* RESERVED */
3641
//#define RESERVED            (0x1000)    /* RESERVED */
3642
//#define RESERVED            (0x2000)    /* RESERVED */
3643
//#define RESERVED            (0x4000)    /* RESERVED */
3644
//#define RESERVED            (0x8000)    /* RESERVED */
3645
 
3646
#define SELM_0                 (0x0000)       /* MCLK Source Select 0 */
3647
#define SELM_1                 (0x0001)       /* MCLK Source Select 1 */
3648
#define SELM_2                 (0x0002)       /* MCLK Source Select 2 */
3649
#define SELM_3                 (0x0003)       /* MCLK Source Select 3 */
3650
#define SELM_4                 (0x0004)       /* MCLK Source Select 4 */
3651
#define SELM_5                 (0x0005)       /* MCLK Source Select 5 */
3652
#define SELM_6                 (0x0006)       /* MCLK Source Select 6 */
3653
#define SELM_7                 (0x0007)       /* MCLK Source Select 7 */
3654
#define SELM__XT1CLK           (0x0000)       /* MCLK Source Select XT1CLK */
3655
#define SELM__VLOCLK           (0x0001)       /* MCLK Source Select VLOCLK */
3656
#define SELM__REFOCLK          (0x0002)       /* MCLK Source Select REFOCLK */
3657
#define SELM__DCOCLK           (0x0003)       /* MCLK Source Select DCOCLK */
3658
#define SELM__DCOCLKDIV        (0x0004)       /* MCLK Source Select DCOCLKDIV */
3659
#define SELM__XT2CLK           (0x0005)       /* MCLK Source Select XT2CLK */
3660
 
3661
#define SELS_0                 (0x0000)       /* SMCLK Source Select 0 */
3662
#define SELS_1                 (0x0010)       /* SMCLK Source Select 1 */
3663
#define SELS_2                 (0x0020)       /* SMCLK Source Select 2 */
3664
#define SELS_3                 (0x0030)       /* SMCLK Source Select 3 */
3665
#define SELS_4                 (0x0040)       /* SMCLK Source Select 4 */
3666
#define SELS_5                 (0x0050)       /* SMCLK Source Select 5 */
3667
#define SELS_6                 (0x0060)       /* SMCLK Source Select 6 */
3668
#define SELS_7                 (0x0070)       /* SMCLK Source Select 7 */
3669
#define SELS__XT1CLK           (0x0000)       /* SMCLK Source Select XT1CLK */
3670
#define SELS__VLOCLK           (0x0010)       /* SMCLK Source Select VLOCLK */
3671
#define SELS__REFOCLK          (0x0020)       /* SMCLK Source Select REFOCLK */
3672
#define SELS__DCOCLK           (0x0030)       /* SMCLK Source Select DCOCLK */
3673
#define SELS__DCOCLKDIV        (0x0040)       /* SMCLK Source Select DCOCLKDIV */
3674
#define SELS__XT2CLK           (0x0050)       /* SMCLK Source Select XT2CLK */
3675
 
3676
#define SELA_0                 (0x0000)       /* ACLK Source Select 0 */
3677
#define SELA_1                 (0x0100)       /* ACLK Source Select 1 */
3678
#define SELA_2                 (0x0200)       /* ACLK Source Select 2 */
3679
#define SELA_3                 (0x0300)       /* ACLK Source Select 3 */
3680
#define SELA_4                 (0x0400)       /* ACLK Source Select 4 */
3681
#define SELA_5                 (0x0500)       /* ACLK Source Select 5 */
3682
#define SELA_6                 (0x0600)       /* ACLK Source Select 6 */
3683
#define SELA_7                 (0x0700)       /* ACLK Source Select 7 */
3684
#define SELA__XT1CLK           (0x0000)       /* ACLK Source Select XT1CLK */
3685
#define SELA__VLOCLK           (0x0100)       /* ACLK Source Select VLOCLK */
3686
#define SELA__REFOCLK          (0x0200)       /* ACLK Source Select REFOCLK */
3687
#define SELA__DCOCLK           (0x0300)       /* ACLK Source Select DCOCLK */
3688
#define SELA__DCOCLKDIV        (0x0400)       /* ACLK Source Select DCOCLKDIV */
3689
#define SELA__XT2CLK           (0x0500)       /* ACLK Source Select XT2CLK */
3690
 
3691
/* UCSCTL5 Control Bits */
3692
#define DIVM0                  (0x0001)       /* MCLK Divider Bit: 0 */
3693
#define DIVM1                  (0x0002)       /* MCLK Divider Bit: 1 */
3694
#define DIVM2                  (0x0004)       /* MCLK Divider Bit: 2 */
3695
//#define RESERVED            (0x0008)    /* RESERVED */
3696
#define DIVS0                  (0x0010)       /* SMCLK Divider Bit: 0 */
3697
#define DIVS1                  (0x0020)       /* SMCLK Divider Bit: 1 */
3698
#define DIVS2                  (0x0040)       /* SMCLK Divider Bit: 2 */
3699
//#define RESERVED            (0x0080)    /* RESERVED */
3700
#define DIVA0                  (0x0100)       /* ACLK Divider Bit: 0 */
3701
#define DIVA1                  (0x0200)       /* ACLK Divider Bit: 1 */
3702
#define DIVA2                  (0x0400)       /* ACLK Divider Bit: 2 */
3703
//#define RESERVED            (0x0800)    /* RESERVED */
3704
#define DIVPA0                 (0x1000)       /* ACLK from Pin Divider Bit: 0 */
3705
#define DIVPA1                 (0x2000)       /* ACLK from Pin Divider Bit: 1 */
3706
#define DIVPA2                 (0x4000)       /* ACLK from Pin Divider Bit: 2 */
3707
//#define RESERVED            (0x8000)    /* RESERVED */
3708
 
3709
/* UCSCTL5 Control Bits */
3710
#define DIVM0_L                (0x0001)       /* MCLK Divider Bit: 0 */
3711
#define DIVM1_L                (0x0002)       /* MCLK Divider Bit: 1 */
3712
#define DIVM2_L                (0x0004)       /* MCLK Divider Bit: 2 */
3713
//#define RESERVED            (0x0008)    /* RESERVED */
3714
#define DIVS0_L                (0x0010)       /* SMCLK Divider Bit: 0 */
3715
#define DIVS1_L                (0x0020)       /* SMCLK Divider Bit: 1 */
3716
#define DIVS2_L                (0x0040)       /* SMCLK Divider Bit: 2 */
3717
//#define RESERVED            (0x0080)    /* RESERVED */
3718
//#define RESERVED            (0x0800)    /* RESERVED */
3719
//#define RESERVED            (0x8000)    /* RESERVED */
3720
 
3721
/* UCSCTL5 Control Bits */
3722
//#define RESERVED            (0x0008)    /* RESERVED */
3723
//#define RESERVED            (0x0080)    /* RESERVED */
3724
#define DIVA0_H                (0x0001)       /* ACLK Divider Bit: 0 */
3725
#define DIVA1_H                (0x0002)       /* ACLK Divider Bit: 1 */
3726
#define DIVA2_H                (0x0004)       /* ACLK Divider Bit: 2 */
3727
//#define RESERVED            (0x0800)    /* RESERVED */
3728
#define DIVPA0_H               (0x0010)       /* ACLK from Pin Divider Bit: 0 */
3729
#define DIVPA1_H               (0x0020)       /* ACLK from Pin Divider Bit: 1 */
3730
#define DIVPA2_H               (0x0040)       /* ACLK from Pin Divider Bit: 2 */
3731
//#define RESERVED            (0x8000)    /* RESERVED */
3732
 
3733
#define DIVM_0                 (0x0000)       /* MCLK Source Divider 0 */
3734
#define DIVM_1                 (0x0001)       /* MCLK Source Divider 1 */
3735
#define DIVM_2                 (0x0002)       /* MCLK Source Divider 2 */
3736
#define DIVM_3                 (0x0003)       /* MCLK Source Divider 3 */
3737
#define DIVM_4                 (0x0004)       /* MCLK Source Divider 4 */
3738
#define DIVM_5                 (0x0005)       /* MCLK Source Divider 5 */
3739
#define DIVM_6                 (0x0006)       /* MCLK Source Divider 6 */
3740
#define DIVM_7                 (0x0007)       /* MCLK Source Divider 7 */
3741
#define DIVM__1                (0x0000)       /* MCLK Source Divider f(MCLK)/1 */
3742
#define DIVM__2                (0x0001)       /* MCLK Source Divider f(MCLK)/2 */
3743
#define DIVM__4                (0x0002)       /* MCLK Source Divider f(MCLK)/4 */
3744
#define DIVM__8                (0x0003)       /* MCLK Source Divider f(MCLK)/8 */
3745
#define DIVM__16               (0x0004)       /* MCLK Source Divider f(MCLK)/16 */
3746
#define DIVM__32               (0x0005)       /* MCLK Source Divider f(MCLK)/32 */
3747
 
3748
#define DIVS_0                 (0x0000)       /* SMCLK Source Divider 0 */
3749
#define DIVS_1                 (0x0010)       /* SMCLK Source Divider 1 */
3750
#define DIVS_2                 (0x0020)       /* SMCLK Source Divider 2 */
3751
#define DIVS_3                 (0x0030)       /* SMCLK Source Divider 3 */
3752
#define DIVS_4                 (0x0040)       /* SMCLK Source Divider 4 */
3753
#define DIVS_5                 (0x0050)       /* SMCLK Source Divider 5 */
3754
#define DIVS_6                 (0x0060)       /* SMCLK Source Divider 6 */
3755
#define DIVS_7                 (0x0070)       /* SMCLK Source Divider 7 */
3756
#define DIVS__1                (0x0000)       /* SMCLK Source Divider f(SMCLK)/1 */
3757
#define DIVS__2                (0x0010)       /* SMCLK Source Divider f(SMCLK)/2 */
3758
#define DIVS__4                (0x0020)       /* SMCLK Source Divider f(SMCLK)/4 */
3759
#define DIVS__8                (0x0030)       /* SMCLK Source Divider f(SMCLK)/8 */
3760
#define DIVS__16               (0x0040)       /* SMCLK Source Divider f(SMCLK)/16 */
3761
#define DIVS__32               (0x0050)       /* SMCLK Source Divider f(SMCLK)/32 */
3762
 
3763
#define DIVA_0                 (0x0000)       /* ACLK Source Divider 0 */
3764
#define DIVA_1                 (0x0100)       /* ACLK Source Divider 1 */
3765
#define DIVA_2                 (0x0200)       /* ACLK Source Divider 2 */
3766
#define DIVA_3                 (0x0300)       /* ACLK Source Divider 3 */
3767
#define DIVA_4                 (0x0400)       /* ACLK Source Divider 4 */
3768
#define DIVA_5                 (0x0500)       /* ACLK Source Divider 5 */
3769
#define DIVA_6                 (0x0600)       /* ACLK Source Divider 6 */
3770
#define DIVA_7                 (0x0700)       /* ACLK Source Divider 7 */
3771
#define DIVA__1                (0x0000)       /* ACLK Source Divider f(ACLK)/1 */
3772
#define DIVA__2                (0x0100)       /* ACLK Source Divider f(ACLK)/2 */
3773
#define DIVA__4                (0x0200)       /* ACLK Source Divider f(ACLK)/4 */
3774
#define DIVA__8                (0x0300)       /* ACLK Source Divider f(ACLK)/8 */
3775
#define DIVA__16               (0x0400)       /* ACLK Source Divider f(ACLK)/16 */
3776
#define DIVA__32               (0x0500)       /* ACLK Source Divider f(ACLK)/32 */
3777
 
3778
#define DIVPA_0                (0x0000)       /* ACLK from Pin Source Divider 0 */
3779
#define DIVPA_1                (0x1000)       /* ACLK from Pin Source Divider 1 */
3780
#define DIVPA_2                (0x2000)       /* ACLK from Pin Source Divider 2 */
3781
#define DIVPA_3                (0x3000)       /* ACLK from Pin Source Divider 3 */
3782
#define DIVPA_4                (0x4000)       /* ACLK from Pin Source Divider 4 */
3783
#define DIVPA_5                (0x5000)       /* ACLK from Pin Source Divider 5 */
3784
#define DIVPA_6                (0x6000)       /* ACLK from Pin Source Divider 6 */
3785
#define DIVPA_7                (0x7000)       /* ACLK from Pin Source Divider 7 */
3786
#define DIVPA__1               (0x0000)       /* ACLK from Pin Source Divider f(ACLK)/1 */
3787
#define DIVPA__2               (0x1000)       /* ACLK from Pin Source Divider f(ACLK)/2 */
3788
#define DIVPA__4               (0x2000)       /* ACLK from Pin Source Divider f(ACLK)/4 */
3789
#define DIVPA__8               (0x3000)       /* ACLK from Pin Source Divider f(ACLK)/8 */
3790
#define DIVPA__16              (0x4000)       /* ACLK from Pin Source Divider f(ACLK)/16 */
3791
#define DIVPA__32              (0x5000)       /* ACLK from Pin Source Divider f(ACLK)/32 */
3792
 
3793
/* UCSCTL6 Control Bits */
3794
#define XT1OFF                 (0x0001)       /* High Frequency Oscillator 1 (XT1) disable */
3795
#define SMCLKOFF               (0x0002)       /* SMCLK Off */
3796
#define XCAP0                  (0x0004)       /* XIN/XOUT Cap Bit: 0 */
3797
#define XCAP1                  (0x0008)       /* XIN/XOUT Cap Bit: 1 */
3798
#define XT1BYPASS              (0x0010)       /* XT1 bypass mode : 0: internal 1:sourced from external pin */
3799
#define XTS                    (0x0020)       /* 1: Selects high-freq. oscillator */
3800
#define XT1DRIVE0              (0x0040)       /* XT1 Drive Level mode Bit 0 */
3801
#define XT1DRIVE1              (0x0080)       /* XT1 Drive Level mode Bit 1 */
3802
#define XT2OFF                 (0x0100)       /* High Frequency Oscillator 2 (XT2) disable */
3803
//#define RESERVED            (0x0200)    /* RESERVED */
3804
//#define RESERVED            (0x0400)    /* RESERVED */
3805
//#define RESERVED            (0x0800)    /* RESERVED */
3806
#define XT2BYPASS              (0x1000)       /* XT2 bypass mode : 0: internal 1:sourced from external pin */
3807
//#define RESERVED            (0x2000)    /* RESERVED */
3808
#define XT2DRIVE0              (0x4000)       /* XT2 Drive Level mode Bit 0 */
3809
#define XT2DRIVE1              (0x8000)       /* XT2 Drive Level mode Bit 1 */
3810
 
3811
/* UCSCTL6 Control Bits */
3812
#define XT1OFF_L               (0x0001)       /* High Frequency Oscillator 1 (XT1) disable */
3813
#define SMCLKOFF_L             (0x0002)       /* SMCLK Off */
3814
#define XCAP0_L                (0x0004)       /* XIN/XOUT Cap Bit: 0 */
3815
#define XCAP1_L                (0x0008)       /* XIN/XOUT Cap Bit: 1 */
3816
#define XT1BYPASS_L            (0x0010)       /* XT1 bypass mode : 0: internal 1:sourced from external pin */
3817
#define XTS_L                  (0x0020)       /* 1: Selects high-freq. oscillator */
3818
#define XT1DRIVE0_L            (0x0040)       /* XT1 Drive Level mode Bit 0 */
3819
#define XT1DRIVE1_L            (0x0080)       /* XT1 Drive Level mode Bit 1 */
3820
//#define RESERVED            (0x0200)    /* RESERVED */
3821
//#define RESERVED            (0x0400)    /* RESERVED */
3822
//#define RESERVED            (0x0800)    /* RESERVED */
3823
//#define RESERVED            (0x2000)    /* RESERVED */
3824
 
3825
/* UCSCTL6 Control Bits */
3826
#define XT2OFF_H               (0x0001)       /* High Frequency Oscillator 2 (XT2) disable */
3827
//#define RESERVED            (0x0200)    /* RESERVED */
3828
//#define RESERVED            (0x0400)    /* RESERVED */
3829
//#define RESERVED            (0x0800)    /* RESERVED */
3830
#define XT2BYPASS_H            (0x0010)       /* XT2 bypass mode : 0: internal 1:sourced from external pin */
3831
//#define RESERVED            (0x2000)    /* RESERVED */
3832
#define XT2DRIVE0_H            (0x0040)       /* XT2 Drive Level mode Bit 0 */
3833
#define XT2DRIVE1_H            (0x0080)       /* XT2 Drive Level mode Bit 1 */
3834
 
3835
#define XCAP_0                 (0x0000)       /* XIN/XOUT Cap 0 */
3836
#define XCAP_1                 (0x0004)       /* XIN/XOUT Cap 1 */
3837
#define XCAP_2                 (0x0008)       /* XIN/XOUT Cap 2 */
3838
#define XCAP_3                 (0x000C)       /* XIN/XOUT Cap 3 */
3839
#define XT1DRIVE_0             (0x0000)       /* XT1 Drive Level mode: 0 */
3840
#define XT1DRIVE_1             (0x0040)       /* XT1 Drive Level mode: 1 */
3841
#define XT1DRIVE_2             (0x0080)       /* XT1 Drive Level mode: 2 */
3842
#define XT1DRIVE_3             (0x00C0)       /* XT1 Drive Level mode: 3 */
3843
#define XT2DRIVE_0             (0x0000)       /* XT2 Drive Level mode: 0 */
3844
#define XT2DRIVE_1             (0x4000)       /* XT2 Drive Level mode: 1 */
3845
#define XT2DRIVE_2             (0x8000)       /* XT2 Drive Level mode: 2 */
3846
#define XT2DRIVE_3             (0xC000)       /* XT2 Drive Level mode: 3 */
3847
 
3848
/* UCSCTL7 Control Bits */
3849
#define DCOFFG                 (0x0001)       /* DCO Fault Flag */
3850
#define XT1LFOFFG              (0x0002)       /* XT1 Low Frequency Oscillator Fault Flag */
3851
//#define RESERVED            (0x0004)    /* RESERVED */
3852
#define XT2OFFG                (0x0008)       /* High Frequency Oscillator 2 Fault Flag */
3853
//#define RESERVED            (0x0010)    /* RESERVED */
3854
//#define RESERVED            (0x0020)    /* RESERVED */
3855
//#define RESERVED            (0x0040)    /* RESERVED */
3856
//#define RESERVED            (0x0080)    /* RESERVED */
3857
//#define RESERVED            (0x0100)    /* RESERVED */
3858
//#define RESERVED            (0x0200)    /* RESERVED */
3859
//#define RESERVED            (0x0400)    /* RESERVED */
3860
//#define RESERVED            (0x0800)    /* RESERVED */
3861
//#define RESERVED            (0x1000)    /* RESERVED */
3862
//#define RESERVED            (0x2000)    /* RESERVED */
3863
//#define RESERVED            (0x4000)    /* RESERVED */
3864
//#define RESERVED            (0x8000)    /* RESERVED */
3865
 
3866
/* UCSCTL7 Control Bits */
3867
#define DCOFFG_L               (0x0001)       /* DCO Fault Flag */
3868
#define XT1LFOFFG_L            (0x0002)       /* XT1 Low Frequency Oscillator Fault Flag */
3869
//#define RESERVED            (0x0004)    /* RESERVED */
3870
#define XT2OFFG_L              (0x0008)       /* High Frequency Oscillator 2 Fault Flag */
3871
//#define RESERVED            (0x0010)    /* RESERVED */
3872
//#define RESERVED            (0x0020)    /* RESERVED */
3873
//#define RESERVED            (0x0040)    /* RESERVED */
3874
//#define RESERVED            (0x0080)    /* RESERVED */
3875
//#define RESERVED            (0x0100)    /* RESERVED */
3876
//#define RESERVED            (0x0200)    /* RESERVED */
3877
//#define RESERVED            (0x0400)    /* RESERVED */
3878
//#define RESERVED            (0x0800)    /* RESERVED */
3879
//#define RESERVED            (0x1000)    /* RESERVED */
3880
//#define RESERVED            (0x2000)    /* RESERVED */
3881
//#define RESERVED            (0x4000)    /* RESERVED */
3882
//#define RESERVED            (0x8000)    /* RESERVED */
3883
 
3884
/* UCSCTL7 Control Bits */
3885
//#define RESERVED            (0x0004)    /* RESERVED */
3886
//#define RESERVED            (0x0010)    /* RESERVED */
3887
//#define RESERVED            (0x0020)    /* RESERVED */
3888
//#define RESERVED            (0x0040)    /* RESERVED */
3889
//#define RESERVED            (0x0080)    /* RESERVED */
3890
//#define RESERVED            (0x0100)    /* RESERVED */
3891
//#define RESERVED            (0x0200)    /* RESERVED */
3892
//#define RESERVED            (0x0400)    /* RESERVED */
3893
//#define RESERVED            (0x0800)    /* RESERVED */
3894
//#define RESERVED            (0x1000)    /* RESERVED */
3895
//#define RESERVED            (0x2000)    /* RESERVED */
3896
//#define RESERVED            (0x4000)    /* RESERVED */
3897
//#define RESERVED            (0x8000)    /* RESERVED */
3898
 
3899
/* UCSCTL8 Control Bits */
3900
#define ACLKREQEN              (0x0001)       /* ACLK Clock Request Enable */
3901
#define MCLKREQEN              (0x0002)       /* MCLK Clock Request Enable */
3902
#define SMCLKREQEN             (0x0004)       /* SMCLK Clock Request Enable */
3903
#define MODOSCREQEN            (0x0008)       /* MODOSC Clock Request Enable */
3904
//#define RESERVED            (0x0010)    /* RESERVED */
3905
//#define RESERVED            (0x0020)    /* RESERVED */
3906
//#define RESERVED            (0x0040)    /* RESERVED */
3907
//#define RESERVED            (0x0080)    /* RESERVED */
3908
//#define RESERVED            (0x0100)    /* RESERVED */
3909
//#define RESERVED            (0x0200)    /* RESERVED */
3910
//#define RESERVED            (0x0400)    /* RESERVED */
3911
//#define RESERVED            (0x0800)    /* RESERVED */
3912
//#define RESERVED            (0x1000)    /* RESERVED */
3913
//#define RESERVED            (0x2000)    /* RESERVED */
3914
//#define RESERVED            (0x4000)    /* RESERVED */
3915
//#define RESERVED            (0x8000)    /* RESERVED */
3916
 
3917
/* UCSCTL8 Control Bits */
3918
#define ACLKREQEN_L            (0x0001)       /* ACLK Clock Request Enable */
3919
#define MCLKREQEN_L            (0x0002)       /* MCLK Clock Request Enable */
3920
#define SMCLKREQEN_L           (0x0004)       /* SMCLK Clock Request Enable */
3921
#define MODOSCREQEN_L          (0x0008)       /* MODOSC Clock Request Enable */
3922
//#define RESERVED            (0x0010)    /* RESERVED */
3923
//#define RESERVED            (0x0020)    /* RESERVED */
3924
//#define RESERVED            (0x0040)    /* RESERVED */
3925
//#define RESERVED            (0x0080)    /* RESERVED */
3926
//#define RESERVED            (0x0100)    /* RESERVED */
3927
//#define RESERVED            (0x0200)    /* RESERVED */
3928
//#define RESERVED            (0x0400)    /* RESERVED */
3929
//#define RESERVED            (0x0800)    /* RESERVED */
3930
//#define RESERVED            (0x1000)    /* RESERVED */
3931
//#define RESERVED            (0x2000)    /* RESERVED */
3932
//#define RESERVED            (0x4000)    /* RESERVED */
3933
//#define RESERVED            (0x8000)    /* RESERVED */
3934
 
3935
/* UCSCTL8 Control Bits */
3936
//#define RESERVED            (0x0010)    /* RESERVED */
3937
//#define RESERVED            (0x0020)    /* RESERVED */
3938
//#define RESERVED            (0x0040)    /* RESERVED */
3939
//#define RESERVED            (0x0080)    /* RESERVED */
3940
//#define RESERVED            (0x0100)    /* RESERVED */
3941
//#define RESERVED            (0x0200)    /* RESERVED */
3942
//#define RESERVED            (0x0400)    /* RESERVED */
3943
//#define RESERVED            (0x0800)    /* RESERVED */
3944
//#define RESERVED            (0x1000)    /* RESERVED */
3945
//#define RESERVED            (0x2000)    /* RESERVED */
3946
//#define RESERVED            (0x4000)    /* RESERVED */
3947
//#define RESERVED            (0x8000)    /* RESERVED */
3948
 
3949
/************************************************************
3950
* USCI A0
3951
************************************************************/
3952
#define __MSP430_HAS_USCI_A0__                /* Definition to show that Module is available */
3953
#define __MSP430_BASEADDRESS_USCI_A0__ 0x05C0
3954
 
3955
SFR_16BIT(UCA0CTLW0);                         /* USCI A0 Control Word Register 0 */
3956
SFR_8BIT(UCA0CTLW0_L);                        /* USCI A0 Control Word Register 0 */
3957
SFR_8BIT(UCA0CTLW0_H);                        /* USCI A0 Control Word Register 0 */
3958
#define UCA0CTL1               UCA0CTLW0_L    /* USCI A0 Control Register 1 */
3959
#define UCA0CTL0               UCA0CTLW0_H    /* USCI A0 Control Register 0 */
3960
SFR_16BIT(UCA0BRW);                           /* USCI A0 Baud Word Rate 0 */
3961
SFR_8BIT(UCA0BRW_L);                          /* USCI A0 Baud Word Rate 0 */
3962
SFR_8BIT(UCA0BRW_H);                          /* USCI A0 Baud Word Rate 0 */
3963
#define UCA0BR0                UCA0BRW_L      /* USCI A0 Baud Rate 0 */
3964
#define UCA0BR1                UCA0BRW_H      /* USCI A0 Baud Rate 1 */
3965
SFR_8BIT(UCA0MCTL);                           /* USCI A0 Modulation Control */
3966
SFR_8BIT(UCA0STAT);                           /* USCI A0 Status Register */
3967
SFR_8BIT(UCA0RXBUF);                          /* USCI A0 Receive Buffer */
3968
SFR_8BIT(UCA0TXBUF);                          /* USCI A0 Transmit Buffer */
3969
SFR_8BIT(UCA0ABCTL);                          /* USCI A0 LIN Control */
3970
SFR_16BIT(UCA0IRCTL);                         /* USCI A0 IrDA Transmit Control */
3971
SFR_8BIT(UCA0IRCTL_L);                        /* USCI A0 IrDA Transmit Control */
3972
SFR_8BIT(UCA0IRCTL_H);                        /* USCI A0 IrDA Transmit Control */
3973
#define UCA0IRTCTL             UCA0IRCTL_L    /* USCI A0 IrDA Transmit Control */
3974
#define UCA0IRRCTL             UCA0IRCTL_H    /* USCI A0 IrDA Receive Control */
3975
SFR_16BIT(UCA0ICTL);                          /* USCI A0 Interrupt Enable Register */
3976
SFR_8BIT(UCA0ICTL_L);                         /* USCI A0 Interrupt Enable Register */
3977
SFR_8BIT(UCA0ICTL_H);                         /* USCI A0 Interrupt Enable Register */
3978
#define UCA0IE                 UCA0ICTL_L     /* USCI A0 Interrupt Enable Register */
3979
#define UCA0IFG                UCA0ICTL_H     /* USCI A0 Interrupt Flags Register */
3980
SFR_16BIT(UCA0IV);                            /* USCI A0 Interrupt Vector Register */
3981
 
3982
 
3983
/************************************************************
3984
* USCI B0
3985
************************************************************/
3986
#define __MSP430_HAS_USCI_B0__                /* Definition to show that Module is available */
3987
#define __MSP430_BASEADDRESS_USCI_B0__ 0x05E0
3988
 
3989
 
3990
SFR_16BIT(UCB0CTLW0);                         /* USCI B0 Control Word Register 0 */
3991
SFR_8BIT(UCB0CTLW0_L);                        /* USCI B0 Control Word Register 0 */
3992
SFR_8BIT(UCB0CTLW0_H);                        /* USCI B0 Control Word Register 0 */
3993
#define UCB0CTL1               UCB0CTLW0_L    /* USCI B0 Control Register 1 */
3994
#define UCB0CTL0               UCB0CTLW0_H    /* USCI B0 Control Register 0 */
3995
SFR_16BIT(UCB0BRW);                           /* USCI B0 Baud Word Rate 0 */
3996
SFR_8BIT(UCB0BRW_L);                          /* USCI B0 Baud Word Rate 0 */
3997
SFR_8BIT(UCB0BRW_H);                          /* USCI B0 Baud Word Rate 0 */
3998
#define UCB0BR0                UCB0BRW_L      /* USCI B0 Baud Rate 0 */
3999
#define UCB0BR1                UCB0BRW_H      /* USCI B0 Baud Rate 1 */
4000
SFR_8BIT(UCB0STAT);                           /* USCI B0 Status Register */
4001
SFR_8BIT(UCB0RXBUF);                          /* USCI B0 Receive Buffer */
4002
SFR_8BIT(UCB0TXBUF);                          /* USCI B0 Transmit Buffer */
4003
SFR_16BIT(UCB0I2COA);                         /* USCI B0 I2C Own Address */
4004
SFR_8BIT(UCB0I2COA_L);                        /* USCI B0 I2C Own Address */
4005
SFR_8BIT(UCB0I2COA_H);                        /* USCI B0 I2C Own Address */
4006
SFR_16BIT(UCB0I2CSA);                         /* USCI B0 I2C Slave Address */
4007
SFR_8BIT(UCB0I2CSA_L);                        /* USCI B0 I2C Slave Address */
4008
SFR_8BIT(UCB0I2CSA_H);                        /* USCI B0 I2C Slave Address */
4009
SFR_16BIT(UCB0ICTL);                          /* USCI B0 Interrupt Enable Register */
4010
SFR_8BIT(UCB0ICTL_L);                         /* USCI B0 Interrupt Enable Register */
4011
SFR_8BIT(UCB0ICTL_H);                         /* USCI B0 Interrupt Enable Register */
4012
#define UCB0IE                 UCB0ICTL_L     /* USCI B0 Interrupt Enable Register */
4013
#define UCB0IFG                UCB0ICTL_H     /* USCI B0 Interrupt Flags Register */
4014
SFR_16BIT(UCB0IV);                            /* USCI B0 Interrupt Vector Register */
4015
 
4016
// UCAxCTL0 UART-Mode Control Bits
4017
#define UCPEN                  (0x80)         /* Async. Mode: Parity enable */
4018
#define UCPAR                  (0x40)         /* Async. Mode: Parity     0:odd / 1:even */
4019
#define UCMSB                  (0x20)         /* Async. Mode: MSB first  0:LSB / 1:MSB */
4020
#define UC7BIT                 (0x10)         /* Async. Mode: Data Bits  0:8-bits / 1:7-bits */
4021
#define UCSPB                  (0x08)         /* Async. Mode: Stop Bits  0:one / 1: two */
4022
#define UCMODE1                (0x04)         /* Async. Mode: USCI Mode 1 */
4023
#define UCMODE0                (0x02)         /* Async. Mode: USCI Mode 0 */
4024
#define UCSYNC                 (0x01)         /* Sync-Mode  0:UART-Mode / 1:SPI-Mode */
4025
 
4026
// UCxxCTL0 SPI-Mode Control Bits
4027
#define UCCKPH                 (0x80)         /* Sync. Mode: Clock Phase */
4028
#define UCCKPL                 (0x40)         /* Sync. Mode: Clock Polarity */
4029
#define UCMST                  (0x08)         /* Sync. Mode: Master Select */
4030
 
4031
// UCBxCTL0 I2C-Mode Control Bits
4032
#define UCA10                  (0x80)         /* 10-bit Address Mode */
4033
#define UCSLA10                (0x40)         /* 10-bit Slave Address Mode */
4034
#define UCMM                   (0x20)         /* Multi-Master Environment */
4035
//#define res               (0x10)    /* reserved */
4036
#define UCMODE_0               (0x00)         /* Sync. Mode: USCI Mode: 0 */
4037
#define UCMODE_1               (0x02)         /* Sync. Mode: USCI Mode: 1 */
4038
#define UCMODE_2               (0x04)         /* Sync. Mode: USCI Mode: 2 */
4039
#define UCMODE_3               (0x06)         /* Sync. Mode: USCI Mode: 3 */
4040
 
4041
// UCAxCTL1 UART-Mode Control Bits
4042
#define UCSSEL1                (0x80)         /* USCI 0 Clock Source Select 1 */
4043
#define UCSSEL0                (0x40)         /* USCI 0 Clock Source Select 0 */
4044
#define UCRXEIE                (0x20)         /* RX Error interrupt enable */
4045
#define UCBRKIE                (0x10)         /* Break interrupt enable */
4046
#define UCDORM                 (0x08)         /* Dormant (Sleep) Mode */
4047
#define UCTXADDR               (0x04)         /* Send next Data as Address */
4048
#define UCTXBRK                (0x02)         /* Send next Data as Break */
4049
#define UCSWRST                (0x01)         /* USCI Software Reset */
4050
 
4051
// UCxxCTL1 SPI-Mode Control Bits
4052
//#define res               (0x20)    /* reserved */
4053
//#define res               (0x10)    /* reserved */
4054
//#define res               (0x08)    /* reserved */
4055
//#define res               (0x04)    /* reserved */
4056
//#define res               (0x02)    /* reserved */
4057
 
4058
// UCBxCTL1 I2C-Mode Control Bits
4059
//#define res               (0x20)    /* reserved */
4060
#define UCTR                   (0x10)         /* Transmit/Receive Select/Flag */
4061
#define UCTXNACK               (0x08)         /* Transmit NACK */
4062
#define UCTXSTP                (0x04)         /* Transmit STOP */
4063
#define UCTXSTT                (0x02)         /* Transmit START */
4064
#define UCSSEL_0               (0x00)         /* USCI 0 Clock Source: 0 */
4065
#define UCSSEL_1               (0x40)         /* USCI 0 Clock Source: 1 */
4066
#define UCSSEL_2               (0x80)         /* USCI 0 Clock Source: 2 */
4067
#define UCSSEL_3               (0xC0)         /* USCI 0 Clock Source: 3 */
4068
#define UCSSEL__UCLK           (0x00)         /* USCI 0 Clock Source: UCLK */
4069
#define UCSSEL__ACLK           (0x40)         /* USCI 0 Clock Source: ACLK */
4070
#define UCSSEL__SMCLK          (0x80)         /* USCI 0 Clock Source: SMCLK */
4071
 
4072
/* UCAxMCTL Control Bits */
4073
#define UCBRF3                 (0x80)         /* USCI First Stage Modulation Select 3 */
4074
#define UCBRF2                 (0x40)         /* USCI First Stage Modulation Select 2 */
4075
#define UCBRF1                 (0x20)         /* USCI First Stage Modulation Select 1 */
4076
#define UCBRF0                 (0x10)         /* USCI First Stage Modulation Select 0 */
4077
#define UCBRS2                 (0x08)         /* USCI Second Stage Modulation Select 2 */
4078
#define UCBRS1                 (0x04)         /* USCI Second Stage Modulation Select 1 */
4079
#define UCBRS0                 (0x02)         /* USCI Second Stage Modulation Select 0 */
4080
#define UCOS16                 (0x01)         /* USCI 16-times Oversampling enable */
4081
 
4082
#define UCBRF_0                (0x00)         /* USCI First Stage Modulation: 0 */
4083
#define UCBRF_1                (0x10)         /* USCI First Stage Modulation: 1 */
4084
#define UCBRF_2                (0x20)         /* USCI First Stage Modulation: 2 */
4085
#define UCBRF_3                (0x30)         /* USCI First Stage Modulation: 3 */
4086
#define UCBRF_4                (0x40)         /* USCI First Stage Modulation: 4 */
4087
#define UCBRF_5                (0x50)         /* USCI First Stage Modulation: 5 */
4088
#define UCBRF_6                (0x60)         /* USCI First Stage Modulation: 6 */
4089
#define UCBRF_7                (0x70)         /* USCI First Stage Modulation: 7 */
4090
#define UCBRF_8                (0x80)         /* USCI First Stage Modulation: 8 */
4091
#define UCBRF_9                (0x90)         /* USCI First Stage Modulation: 9 */
4092
#define UCBRF_10               (0xA0)         /* USCI First Stage Modulation: A */
4093
#define UCBRF_11               (0xB0)         /* USCI First Stage Modulation: B */
4094
#define UCBRF_12               (0xC0)         /* USCI First Stage Modulation: C */
4095
#define UCBRF_13               (0xD0)         /* USCI First Stage Modulation: D */
4096
#define UCBRF_14               (0xE0)         /* USCI First Stage Modulation: E */
4097
#define UCBRF_15               (0xF0)         /* USCI First Stage Modulation: F */
4098
 
4099
#define UCBRS_0                (0x00)         /* USCI Second Stage Modulation: 0 */
4100
#define UCBRS_1                (0x02)         /* USCI Second Stage Modulation: 1 */
4101
#define UCBRS_2                (0x04)         /* USCI Second Stage Modulation: 2 */
4102
#define UCBRS_3                (0x06)         /* USCI Second Stage Modulation: 3 */
4103
#define UCBRS_4                (0x08)         /* USCI Second Stage Modulation: 4 */
4104
#define UCBRS_5                (0x0A)         /* USCI Second Stage Modulation: 5 */
4105
#define UCBRS_6                (0x0C)         /* USCI Second Stage Modulation: 6 */
4106
#define UCBRS_7                (0x0E)         /* USCI Second Stage Modulation: 7 */
4107
 
4108
/* UCAxSTAT Control Bits */
4109
#define UCLISTEN               (0x80)         /* USCI Listen mode */
4110
#define UCFE                   (0x40)         /* USCI Frame Error Flag */
4111
#define UCOE                   (0x20)         /* USCI Overrun Error Flag */
4112
#define UCPE                   (0x10)         /* USCI Parity Error Flag */
4113
#define UCBRK                  (0x08)         /* USCI Break received */
4114
#define UCRXERR                (0x04)         /* USCI RX Error Flag */
4115
#define UCADDR                 (0x02)         /* USCI Address received Flag */
4116
#define UCBUSY                 (0x01)         /* USCI Busy Flag */
4117
#define UCIDLE                 (0x02)         /* USCI Idle line detected Flag */
4118
 
4119
/* UCBxSTAT Control Bits */
4120
#define UCSCLLOW               (0x40)         /* SCL low */
4121
#define UCGC                   (0x20)         /* General Call address received Flag */
4122
#define UCBBUSY                (0x10)         /* Bus Busy Flag */
4123
 
4124
/* UCAxIRTCTL Control Bits */
4125
#define UCIRTXPL5              (0x80)         /* IRDA Transmit Pulse Length 5 */
4126
#define UCIRTXPL4              (0x40)         /* IRDA Transmit Pulse Length 4 */
4127
#define UCIRTXPL3              (0x20)         /* IRDA Transmit Pulse Length 3 */
4128
#define UCIRTXPL2              (0x10)         /* IRDA Transmit Pulse Length 2 */
4129
#define UCIRTXPL1              (0x08)         /* IRDA Transmit Pulse Length 1 */
4130
#define UCIRTXPL0              (0x04)         /* IRDA Transmit Pulse Length 0 */
4131
#define UCIRTXCLK              (0x02)         /* IRDA Transmit Pulse Clock Select */
4132
#define UCIREN                 (0x01)         /* IRDA Encoder/Decoder enable */
4133
 
4134
/* UCAxIRRCTL Control Bits */
4135
#define UCIRRXFL5              (0x80)         /* IRDA Receive Filter Length 5 */
4136
#define UCIRRXFL4              (0x40)         /* IRDA Receive Filter Length 4 */
4137
#define UCIRRXFL3              (0x20)         /* IRDA Receive Filter Length 3 */
4138
#define UCIRRXFL2              (0x10)         /* IRDA Receive Filter Length 2 */
4139
#define UCIRRXFL1              (0x08)         /* IRDA Receive Filter Length 1 */
4140
#define UCIRRXFL0              (0x04)         /* IRDA Receive Filter Length 0 */
4141
#define UCIRRXPL               (0x02)         /* IRDA Receive Input Polarity */
4142
#define UCIRRXFE               (0x01)         /* IRDA Receive Filter enable */
4143
 
4144
/* UCAxABCTL Control Bits */
4145
//#define res               (0x80)    /* reserved */
4146
//#define res               (0x40)    /* reserved */
4147
#define UCDELIM1               (0x20)         /* Break Sync Delimiter 1 */
4148
#define UCDELIM0               (0x10)         /* Break Sync Delimiter 0 */
4149
#define UCSTOE                 (0x08)         /* Sync-Field Timeout error */
4150
#define UCBTOE                 (0x04)         /* Break Timeout error */
4151
//#define res               (0x02)    /* reserved */
4152
#define UCABDEN                (0x01)         /* Auto Baud Rate detect enable */
4153
 
4154
/* UCBxI2COA Control Bits */
4155
#define UCGCEN                 (0x8000)       /* I2C General Call enable */
4156
#define UCOA9                  (0x0200)       /* I2C Own Address 9 */
4157
#define UCOA8                  (0x0100)       /* I2C Own Address 8 */
4158
#define UCOA7                  (0x0080)       /* I2C Own Address 7 */
4159
#define UCOA6                  (0x0040)       /* I2C Own Address 6 */
4160
#define UCOA5                  (0x0020)       /* I2C Own Address 5 */
4161
#define UCOA4                  (0x0010)       /* I2C Own Address 4 */
4162
#define UCOA3                  (0x0008)       /* I2C Own Address 3 */
4163
#define UCOA2                  (0x0004)       /* I2C Own Address 2 */
4164
#define UCOA1                  (0x0002)       /* I2C Own Address 1 */
4165
#define UCOA0                  (0x0001)       /* I2C Own Address 0 */
4166
 
4167
/* UCBxI2COA Control Bits */
4168
#define UCOA7_L                (0x0080)       /* I2C Own Address 7 */
4169
#define UCOA6_L                (0x0040)       /* I2C Own Address 6 */
4170
#define UCOA5_L                (0x0020)       /* I2C Own Address 5 */
4171
#define UCOA4_L                (0x0010)       /* I2C Own Address 4 */
4172
#define UCOA3_L                (0x0008)       /* I2C Own Address 3 */
4173
#define UCOA2_L                (0x0004)       /* I2C Own Address 2 */
4174
#define UCOA1_L                (0x0002)       /* I2C Own Address 1 */
4175
#define UCOA0_L                (0x0001)       /* I2C Own Address 0 */
4176
 
4177
/* UCBxI2COA Control Bits */
4178
#define UCGCEN_H               (0x0080)       /* I2C General Call enable */
4179
#define UCOA9_H                (0x0002)       /* I2C Own Address 9 */
4180
#define UCOA8_H                (0x0001)       /* I2C Own Address 8 */
4181
 
4182
/* UCBxI2CSA Control Bits */
4183
#define UCSA9                  (0x0200)       /* I2C Slave Address 9 */
4184
#define UCSA8                  (0x0100)       /* I2C Slave Address 8 */
4185
#define UCSA7                  (0x0080)       /* I2C Slave Address 7 */
4186
#define UCSA6                  (0x0040)       /* I2C Slave Address 6 */
4187
#define UCSA5                  (0x0020)       /* I2C Slave Address 5 */
4188
#define UCSA4                  (0x0010)       /* I2C Slave Address 4 */
4189
#define UCSA3                  (0x0008)       /* I2C Slave Address 3 */
4190
#define UCSA2                  (0x0004)       /* I2C Slave Address 2 */
4191
#define UCSA1                  (0x0002)       /* I2C Slave Address 1 */
4192
#define UCSA0                  (0x0001)       /* I2C Slave Address 0 */
4193
 
4194
/* UCBxI2CSA Control Bits */
4195
#define UCSA7_L                (0x0080)       /* I2C Slave Address 7 */
4196
#define UCSA6_L                (0x0040)       /* I2C Slave Address 6 */
4197
#define UCSA5_L                (0x0020)       /* I2C Slave Address 5 */
4198
#define UCSA4_L                (0x0010)       /* I2C Slave Address 4 */
4199
#define UCSA3_L                (0x0008)       /* I2C Slave Address 3 */
4200
#define UCSA2_L                (0x0004)       /* I2C Slave Address 2 */
4201
#define UCSA1_L                (0x0002)       /* I2C Slave Address 1 */
4202
#define UCSA0_L                (0x0001)       /* I2C Slave Address 0 */
4203
 
4204
/* UCBxI2CSA Control Bits */
4205
#define UCSA9_H                (0x0002)       /* I2C Slave Address 9 */
4206
#define UCSA8_H                (0x0001)       /* I2C Slave Address 8 */
4207
 
4208
/* UCAxIE Control Bits */
4209
#define UCTXIE                 (0x0002)       /* USCI Transmit Interrupt Enable */
4210
#define UCRXIE                 (0x0001)       /* USCI Receive Interrupt Enable */
4211
 
4212
/* UCBxIE Control Bits */
4213
#define UCNACKIE               (0x0020)       /* NACK Condition interrupt enable */
4214
#define UCALIE                 (0x0010)       /* Arbitration Lost interrupt enable */
4215
#define UCSTPIE                (0x0008)       /* STOP Condition interrupt enable */
4216
#define UCSTTIE                (0x0004)       /* START Condition interrupt enable */
4217
#define UCTXIE                 (0x0002)       /* USCI Transmit Interrupt Enable */
4218
#define UCRXIE                 (0x0001)       /* USCI Receive Interrupt Enable */
4219
 
4220
/* UCAxIFG Control Bits */
4221
#define UCTXIFG                (0x0002)       /* USCI Transmit Interrupt Flag */
4222
#define UCRXIFG                (0x0001)       /* USCI Receive Interrupt Flag */
4223
 
4224
/* UCBxIFG Control Bits */
4225
#define UCNACKIFG              (0x0020)       /* NAK Condition interrupt Flag */
4226
#define UCALIFG                (0x0010)       /* Arbitration Lost interrupt Flag */
4227
#define UCSTPIFG               (0x0008)       /* STOP Condition interrupt Flag */
4228
#define UCSTTIFG               (0x0004)       /* START Condition interrupt Flag */
4229
#define UCTXIFG                (0x0002)       /* USCI Transmit Interrupt Flag */
4230
#define UCRXIFG                (0x0001)       /* USCI Receive Interrupt Flag */
4231
 
4232
/* USCI Definitions */
4233
#define USCI_NONE              (0x0000)       /* No Interrupt pending */
4234
#define USCI_UCRXIFG           (0x0002)       /* USCI UCRXIFG */
4235
#define USCI_UCTXIFG           (0x0004)       /* USCI UCTXIFG */
4236
#define USCI_I2C_UCALIFG       (0x0002)       /* USCI I2C Mode: UCALIFG */
4237
#define USCI_I2C_UCNACKIFG     (0x0004)       /* USCI I2C Mode: UCNACKIFG */
4238
#define USCI_I2C_UCSTTIFG      (0x0006)       /* USCI I2C Mode: UCSTTIFG*/
4239
#define USCI_I2C_UCSTPIFG      (0x0008)       /* USCI I2C Mode: UCSTPIFG*/
4240
#define USCI_I2C_UCRXIFG       (0x000A)       /* USCI I2C Mode: UCRXIFG */
4241
#define USCI_I2C_UCTXIFG       (0x000C)       /* USCI I2C Mode: UCTXIFG */
4242
 
4243
/************************************************************
4244
* USCI A1
4245
************************************************************/
4246
#define __MSP430_HAS_USCI_A1__                /* Definition to show that Module is available */
4247
#define __MSP430_BASEADDRESS_USCI_A1__ 0x0600
4248
 
4249
SFR_16BIT(UCA1CTLW0);                         /* USCI A1 Control Word Register 0 */
4250
SFR_8BIT(UCA1CTLW0_L);                        /* USCI A1 Control Word Register 0 */
4251
SFR_8BIT(UCA1CTLW0_H);                        /* USCI A1 Control Word Register 0 */
4252
#define UCA1CTL1               UCA1CTLW0_L    /* USCI A1 Control Register 1 */
4253
#define UCA1CTL0               UCA1CTLW0_H    /* USCI A1 Control Register 0 */
4254
SFR_16BIT(UCA1BRW);                           /* USCI A1 Baud Word Rate 0 */
4255
SFR_8BIT(UCA1BRW_L);                          /* USCI A1 Baud Word Rate 0 */
4256
SFR_8BIT(UCA1BRW_H);                          /* USCI A1 Baud Word Rate 0 */
4257
#define UCA1BR0                UCA1BRW_L      /* USCI A1 Baud Rate 0 */
4258
#define UCA1BR1                UCA1BRW_H      /* USCI A1 Baud Rate 1 */
4259
SFR_8BIT(UCA1MCTL);                           /* USCI A1 Modulation Control */
4260
SFR_8BIT(UCA1STAT);                           /* USCI A1 Status Register */
4261
SFR_8BIT(UCA1RXBUF);                          /* USCI A1 Receive Buffer */
4262
SFR_8BIT(UCA1TXBUF);                          /* USCI A1 Transmit Buffer */
4263
SFR_8BIT(UCA1ABCTL);                          /* USCI A1 LIN Control */
4264
SFR_16BIT(UCA1IRCTL);                         /* USCI A1 IrDA Transmit Control */
4265
SFR_8BIT(UCA1IRCTL_L);                        /* USCI A1 IrDA Transmit Control */
4266
SFR_8BIT(UCA1IRCTL_H);                        /* USCI A1 IrDA Transmit Control */
4267
#define UCA1IRTCTL             UCA1IRCTL_L    /* USCI A1 IrDA Transmit Control */
4268
#define UCA1IRRCTL             UCA1IRCTL_H    /* USCI A1 IrDA Receive Control */
4269
SFR_16BIT(UCA1ICTL);                          /* USCI A1 Interrupt Enable Register */
4270
SFR_8BIT(UCA1ICTL_L);                         /* USCI A1 Interrupt Enable Register */
4271
SFR_8BIT(UCA1ICTL_H);                         /* USCI A1 Interrupt Enable Register */
4272
#define UCA1IE                 UCA1ICTL_L     /* USCI A1 Interrupt Enable Register */
4273
#define UCA1IFG                UCA1ICTL_H     /* USCI A1 Interrupt Flags Register */
4274
SFR_16BIT(UCA1IV);                            /* USCI A1 Interrupt Vector Register */
4275
 
4276
 
4277
/************************************************************
4278
* USCI B1
4279
************************************************************/
4280
#define __MSP430_HAS_USCI_B1__                /* Definition to show that Module is available */
4281
#define __MSP430_BASEADDRESS_USCI_B1__ 0x0620
4282
 
4283
 
4284
SFR_16BIT(UCB1CTLW0);                         /* USCI B1 Control Word Register 0 */
4285
SFR_8BIT(UCB1CTLW0_L);                        /* USCI B1 Control Word Register 0 */
4286
SFR_8BIT(UCB1CTLW0_H);                        /* USCI B1 Control Word Register 0 */
4287
#define UCB1CTL1               UCB1CTLW0_L    /* USCI B1 Control Register 1 */
4288
#define UCB1CTL0               UCB1CTLW0_H    /* USCI B1 Control Register 0 */
4289
SFR_16BIT(UCB1BRW);                           /* USCI B1 Baud Word Rate 0 */
4290
SFR_8BIT(UCB1BRW_L);                          /* USCI B1 Baud Word Rate 0 */
4291
SFR_8BIT(UCB1BRW_H);                          /* USCI B1 Baud Word Rate 0 */
4292
#define UCB1BR0                UCB1BRW_L      /* USCI B1 Baud Rate 0 */
4293
#define UCB1BR1                UCB1BRW_H      /* USCI B1 Baud Rate 1 */
4294
SFR_8BIT(UCB1STAT);                           /* USCI B1 Status Register */
4295
SFR_8BIT(UCB1RXBUF);                          /* USCI B1 Receive Buffer */
4296
SFR_8BIT(UCB1TXBUF);                          /* USCI B1 Transmit Buffer */
4297
SFR_16BIT(UCB1I2COA);                         /* USCI B1 I2C Own Address */
4298
SFR_8BIT(UCB1I2COA_L);                        /* USCI B1 I2C Own Address */
4299
SFR_8BIT(UCB1I2COA_H);                        /* USCI B1 I2C Own Address */
4300
SFR_16BIT(UCB1I2CSA);                         /* USCI B1 I2C Slave Address */
4301
SFR_8BIT(UCB1I2CSA_L);                        /* USCI B1 I2C Slave Address */
4302
SFR_8BIT(UCB1I2CSA_H);                        /* USCI B1 I2C Slave Address */
4303
SFR_16BIT(UCB1ICTL);                          /* USCI B1 Interrupt Enable Register */
4304
SFR_8BIT(UCB1ICTL_L);                         /* USCI B1 Interrupt Enable Register */
4305
SFR_8BIT(UCB1ICTL_H);                         /* USCI B1 Interrupt Enable Register */
4306
#define UCB1IE                 UCB1ICTL_L     /* USCI B1 Interrupt Enable Register */
4307
#define UCB1IFG                UCB1ICTL_H     /* USCI B1 Interrupt Flags Register */
4308
SFR_16BIT(UCB1IV);                            /* USCI B1 Interrupt Vector Register */
4309
 
4310
/************************************************************
4311
* WATCHDOG TIMER A
4312
************************************************************/
4313
#define __MSP430_HAS_WDT_A__                  /* Definition to show that Module is available */
4314
#define __MSP430_BASEADDRESS_WDT_A__ 0x0150
4315
 
4316
SFR_16BIT(WDTCTL);                            /* Watchdog Timer Control */
4317
SFR_8BIT(WDTCTL_L);                           /* Watchdog Timer Control */
4318
SFR_8BIT(WDTCTL_H);                           /* Watchdog Timer Control */
4319
/* The bit names have been prefixed with "WDT" */
4320
/* WDTCTL Control Bits */
4321
#define WDTIS0                 (0x0001)       /* WDT - Timer Interval Select 0 */
4322
#define WDTIS1                 (0x0002)       /* WDT - Timer Interval Select 1 */
4323
#define WDTIS2                 (0x0004)       /* WDT - Timer Interval Select 2 */
4324
#define WDTCNTCL               (0x0008)       /* WDT - Timer Clear */
4325
#define WDTTMSEL               (0x0010)       /* WDT - Timer Mode Select */
4326
#define WDTSSEL0               (0x0020)       /* WDT - Timer Clock Source Select 0 */
4327
#define WDTSSEL1               (0x0040)       /* WDT - Timer Clock Source Select 1 */
4328
#define WDTHOLD                (0x0080)       /* WDT - Timer hold */
4329
 
4330
/* WDTCTL Control Bits */
4331
#define WDTIS0_L               (0x0001)       /* WDT - Timer Interval Select 0 */
4332
#define WDTIS1_L               (0x0002)       /* WDT - Timer Interval Select 1 */
4333
#define WDTIS2_L               (0x0004)       /* WDT - Timer Interval Select 2 */
4334
#define WDTCNTCL_L             (0x0008)       /* WDT - Timer Clear */
4335
#define WDTTMSEL_L             (0x0010)       /* WDT - Timer Mode Select */
4336
#define WDTSSEL0_L             (0x0020)       /* WDT - Timer Clock Source Select 0 */
4337
#define WDTSSEL1_L             (0x0040)       /* WDT - Timer Clock Source Select 1 */
4338
#define WDTHOLD_L              (0x0080)       /* WDT - Timer hold */
4339
 
4340
/* WDTCTL Control Bits */
4341
 
4342
#define WDTPW                  (0x5A00)
4343
 
4344
#define WDTIS_0                (0*0x0001u)    /* WDT - Timer Interval Select: /2G */
4345
#define WDTIS_1                (1*0x0001u)    /* WDT - Timer Interval Select: /128M */
4346
#define WDTIS_2                (2*0x0001u)    /* WDT - Timer Interval Select: /8192k */
4347
#define WDTIS_3                (3*0x0001u)    /* WDT - Timer Interval Select: /512k */
4348
#define WDTIS_4                (4*0x0001u)    /* WDT - Timer Interval Select: /32k */
4349
#define WDTIS_5                (5*0x0001u)    /* WDT - Timer Interval Select: /8192 */
4350
#define WDTIS_6                (6*0x0001u)    /* WDT - Timer Interval Select: /512 */
4351
#define WDTIS_7                (7*0x0001u)    /* WDT - Timer Interval Select: /64 */
4352
#define WDTIS__2G              (0*0x0001u)    /* WDT - Timer Interval Select: /2G */
4353
#define WDTIS__128M            (1*0x0001u)    /* WDT - Timer Interval Select: /128M */
4354
#define WDTIS__8192K           (2*0x0001u)    /* WDT - Timer Interval Select: /8192k */
4355
#define WDTIS__512K            (3*0x0001u)    /* WDT - Timer Interval Select: /512k */
4356
#define WDTIS__32K             (4*0x0001u)    /* WDT - Timer Interval Select: /32k */
4357
#define WDTIS__8192            (5*0x0001u)    /* WDT - Timer Interval Select: /8192 */
4358
#define WDTIS__512             (6*0x0001u)    /* WDT - Timer Interval Select: /512 */
4359
#define WDTIS__64              (7*0x0001u)    /* WDT - Timer Interval Select: /64 */
4360
 
4361
#define WDTSSEL_0              (0*0x0020u)    /* WDT - Timer Clock Source Select: SMCLK */
4362
#define WDTSSEL_1              (1*0x0020u)    /* WDT - Timer Clock Source Select: ACLK */
4363
#define WDTSSEL_2              (2*0x0020u)    /* WDT - Timer Clock Source Select: VLO_CLK */
4364
#define WDTSSEL_3              (3*0x0020u)    /* WDT - Timer Clock Source Select: reserved */
4365
#define WDTSSEL__SMCLK         (0*0x0020u)    /* WDT - Timer Clock Source Select: SMCLK */
4366
#define WDTSSEL__ACLK          (1*0x0020u)    /* WDT - Timer Clock Source Select: ACLK */
4367
#define WDTSSEL__VLO           (2*0x0020u)    /* WDT - Timer Clock Source Select: VLO_CLK */
4368
 
4369
/* WDT-interval times [1ms] coded with Bits 0-2 */
4370
/* WDT is clocked by fSMCLK (assumed 1MHz) */
4371
#define WDT_MDLY_32         (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2)                         /* 32ms interval (default) */
4372
#define WDT_MDLY_8          (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTIS0)                  /* 8ms     " */
4373
#define WDT_MDLY_0_5        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTIS1)                  /* 0.5ms   " */
4374
#define WDT_MDLY_0_064      (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTIS1+WDTIS0)           /* 0.064ms " */
4375
/* WDT is clocked by fACLK (assumed 32KHz) */
4376
#define WDT_ADLY_1000       (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0)                /* 1000ms  " */
4377
#define WDT_ADLY_250        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0+WDTIS0)         /* 250ms   " */
4378
#define WDT_ADLY_16         (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0+WDTIS1)         /* 16ms    " */
4379
#define WDT_ADLY_1_9        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0+WDTIS1+WDTIS0)  /* 1.9ms   " */
4380
/* Watchdog mode -> reset after expired time */
4381
/* WDT is clocked by fSMCLK (assumed 1MHz) */
4382
#define WDT_MRST_32         (WDTPW+WDTCNTCL+WDTIS2)                                  /* 32ms interval (default) */
4383
#define WDT_MRST_8          (WDTPW+WDTCNTCL+WDTIS2+WDTIS0)                           /* 8ms     " */
4384
#define WDT_MRST_0_5        (WDTPW+WDTCNTCL+WDTIS2+WDTIS1)                           /* 0.5ms   " */
4385
#define WDT_MRST_0_064      (WDTPW+WDTCNTCL+WDTIS2+WDTIS1+WDTIS0)                    /* 0.064ms " */
4386
/* WDT is clocked by fACLK (assumed 32KHz) */
4387
#define WDT_ARST_1000       (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2)                         /* 1000ms  " */
4388
#define WDT_ARST_250        (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2+WDTIS0)                  /* 250ms   " */
4389
#define WDT_ARST_16         (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2+WDTIS1)                  /* 16ms    " */
4390
#define WDT_ARST_1_9        (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2+WDTIS1+WDTIS0)           /* 1.9ms   " */
4391
 
4392
 
4393
/************************************************************
4394
* TLV Descriptors
4395
************************************************************/
4396
#define __MSP430_HAS_TLV__                    /* Definition to show that Module is available */
4397
 
4398
#define TLV_START              (0x1A08)       /* Start Address of the TLV structure */
4399
#define TLV_END                (0x1AFF)       /* End Address of the TLV structure */
4400
 
4401
#define TLV_LDTAG              (0x01)         /*  Legacy descriptor (1xx, 2xx, 4xx families) */
4402
#define TLV_PDTAG              (0x02)         /*  Peripheral discovery descriptor */
4403
#define TLV_Reserved3          (0x03)         /*  Future usage */
4404
#define TLV_Reserved4          (0x04)         /*  Future usage */
4405
#define TLV_BLANK              (0x05)         /*  Blank descriptor */
4406
#define TLV_Reserved6          (0x06)         /*  Future usage */
4407
#define TLV_Reserved7          (0x07)         /*  Serial Number */
4408
#define TLV_DIERECORD          (0x08)         /*  Die Record  */
4409
#define TLV_ADCCAL             (0x11)         /*  ADC12 calibration */
4410
#define TLV_ADC12CAL           (0x11)         /*  ADC12 calibration */
4411
#define TLV_ADC10CAL           (0x13)         /*  ADC10 calibration */
4412
#define TLV_REFCAL             (0x12)         /*  REF calibration */
4413
#define TLV_TAGEXT             (0xFE)         /*  Tag extender */
4414
#define TLV_TAGEND             (0xFF)         //  Tag End of Table
4415
 
4416
/************************************************************
4417
* Interrupt Vectors (offset from 0xFF80)
4418
************************************************************/
4419
 
4420
#pragma diag_suppress 1107
4421
#define VECTOR_NAME(name)             name##_ptr
4422
#define EMIT_PRAGMA(x)                _Pragma(#x)
4423
#define CREATE_VECTOR(name)           void * const VECTOR_NAME(name) = (void *)(long)&name
4424
#define PLACE_VECTOR(vector,section)  EMIT_PRAGMA(DATA_SECTION(vector,section))
4425
#define PLACE_INTERRUPT(func)         EMIT_PRAGMA(CODE_SECTION(func,".text:_isr"))
4426
#define ISR_VECTOR(func,offset)       CREATE_VECTOR(func); \
4427
                                      PLACE_VECTOR(VECTOR_NAME(func), offset) \
4428
                                      PLACE_INTERRUPT(func)
4429
 
4430
 
4431
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4432
#define RTC_VECTOR              ".int41"                    /* 0xFFD2 RTC */
4433
#else
4434
#define RTC_VECTOR              (41 * 1u)                    /* 0xFFD2 RTC */
4435
/*#define RTC_ISR(func)           ISR_VECTOR(func, ".int41")  */ /* 0xFFD2 RTC */ /* CCE V2 Style */
4436
#endif
4437
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4438
#define PORT2_VECTOR            ".int42"                    /* 0xFFD4 Port 2 */
4439
#else
4440
#define PORT2_VECTOR            (42 * 1u)                    /* 0xFFD4 Port 2 */
4441
/*#define PORT2_ISR(func)         ISR_VECTOR(func, ".int42")  */ /* 0xFFD4 Port 2 */ /* CCE V2 Style */
4442
#endif
4443
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4444
#define TIMER2_A1_VECTOR        ".int43"                    /* 0xFFD6 Timer0_A5 CC1-4, TA */
4445
#else
4446
#define TIMER2_A1_VECTOR        (43 * 1u)                    /* 0xFFD6 Timer0_A5 CC1-4, TA */
4447
/*#define TIMER2_A1_ISR(func)     ISR_VECTOR(func, ".int43")  */ /* 0xFFD6 Timer0_A5 CC1-4, TA */ /* CCE V2 Style */
4448
#endif
4449
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4450
#define TIMER2_A0_VECTOR        ".int44"                    /* 0xFFD8 Timer0_A5 CC0 */
4451
#else
4452
#define TIMER2_A0_VECTOR        (44 * 1u)                    /* 0xFFD8 Timer0_A5 CC0 */
4453
/*#define TIMER2_A0_ISR(func)     ISR_VECTOR(func, ".int44")  */ /* 0xFFD8 Timer0_A5 CC0 */ /* CCE V2 Style */
4454
#endif
4455
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4456
#define USCI_B1_VECTOR          ".int45"                    /* 0xFFDA USCI B1 Receive/Transmit */
4457
#else
4458
#define USCI_B1_VECTOR          (45 * 1u)                    /* 0xFFDA USCI B1 Receive/Transmit */
4459
/*#define USCI_B1_ISR(func)       ISR_VECTOR(func, ".int45")  */ /* 0xFFDA USCI B1 Receive/Transmit */ /* CCE V2 Style */
4460
#endif
4461
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4462
#define USCI_A1_VECTOR          ".int46"                    /* 0xFFDC USCI A1 Receive/Transmit */
4463
#else
4464
#define USCI_A1_VECTOR          (46 * 1u)                    /* 0xFFDC USCI A1 Receive/Transmit */
4465
/*#define USCI_A1_ISR(func)       ISR_VECTOR(func, ".int46")  */ /* 0xFFDC USCI A1 Receive/Transmit */ /* CCE V2 Style */
4466
#endif
4467
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4468
#define PORT1_VECTOR            ".int47"                    /* 0xFFDE Port 1 */
4469
#else
4470
#define PORT1_VECTOR            (47 * 1u)                    /* 0xFFDE Port 1 */
4471
/*#define PORT1_ISR(func)         ISR_VECTOR(func, ".int47")  */ /* 0xFFDE Port 1 */ /* CCE V2 Style */
4472
#endif
4473
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4474
#define TIMER1_A1_VECTOR        ".int48"                    /* 0xFFE0 Timer1_A3 CC1-2, TA1 */
4475
#else
4476
#define TIMER1_A1_VECTOR        (48 * 1u)                    /* 0xFFE0 Timer1_A3 CC1-2, TA1 */
4477
/*#define TIMER1_A1_ISR(func)     ISR_VECTOR(func, ".int48")  */ /* 0xFFE0 Timer1_A3 CC1-2, TA1 */ /* CCE V2 Style */
4478
#endif
4479
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4480
#define TIMER1_A0_VECTOR        ".int49"                    /* 0xFFE2 Timer1_A3 CC0 */
4481
#else
4482
#define TIMER1_A0_VECTOR        (49 * 1u)                    /* 0xFFE2 Timer1_A3 CC0 */
4483
/*#define TIMER1_A0_ISR(func)     ISR_VECTOR(func, ".int49")  */ /* 0xFFE2 Timer1_A3 CC0 */ /* CCE V2 Style */
4484
#endif
4485
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4486
#define DMA_VECTOR              ".int50"                    /* 0xFFE4 DMA */
4487
#else
4488
#define DMA_VECTOR              (50 * 1u)                    /* 0xFFE4 DMA */
4489
/*#define DMA_ISR(func)           ISR_VECTOR(func, ".int50")  */ /* 0xFFE4 DMA */ /* CCE V2 Style */
4490
#endif
4491
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4492
#define USB_UBM_VECTOR          ".int51"                    /* 0xFFE6 USB Timer / cable event / USB reset */
4493
#else
4494
#define USB_UBM_VECTOR          (51 * 1u)                    /* 0xFFE6 USB Timer / cable event / USB reset */
4495
/*#define USB_UBM_ISR(func)       ISR_VECTOR(func, ".int51")  */ /* 0xFFE6 USB Timer / cable event / USB reset */ /* CCE V2 Style */
4496
#endif
4497
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4498
#define TIMER0_A1_VECTOR        ".int52"                    /* 0xFFE8 Timer0_A5 CC1-4, TA */
4499
#else
4500
#define TIMER0_A1_VECTOR        (52 * 1u)                    /* 0xFFE8 Timer0_A5 CC1-4, TA */
4501
/*#define TIMER0_A1_ISR(func)     ISR_VECTOR(func, ".int52")  */ /* 0xFFE8 Timer0_A5 CC1-4, TA */ /* CCE V2 Style */
4502
#endif
4503
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4504
#define TIMER0_A0_VECTOR        ".int53"                    /* 0xFFEA Timer0_A5 CC0 */
4505
#else
4506
#define TIMER0_A0_VECTOR        (53 * 1u)                    /* 0xFFEA Timer0_A5 CC0 */
4507
/*#define TIMER0_A0_ISR(func)     ISR_VECTOR(func, ".int53")  */ /* 0xFFEA Timer0_A5 CC0 */ /* CCE V2 Style */
4508
#endif
4509
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4510
#define USCI_B0_VECTOR          ".int55"                    /* 0xFFEE USCI B0 Receive/Transmit */
4511
#else
4512
#define USCI_B0_VECTOR          (55 * 1u)                    /* 0xFFEE USCI B0 Receive/Transmit */
4513
/*#define USCI_B0_ISR(func)       ISR_VECTOR(func, ".int55")  */ /* 0xFFEE USCI B0 Receive/Transmit */ /* CCE V2 Style */
4514
#endif
4515
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4516
#define USCI_A0_VECTOR          ".int56"                    /* 0xFFF0 USCI A0 Receive/Transmit */
4517
#else
4518
#define USCI_A0_VECTOR          (56 * 1u)                    /* 0xFFF0 USCI A0 Receive/Transmit */
4519
/*#define USCI_A0_ISR(func)       ISR_VECTOR(func, ".int56")  */ /* 0xFFF0 USCI A0 Receive/Transmit */ /* CCE V2 Style */
4520
#endif
4521
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4522
#define WDT_VECTOR              ".int57"                    /* 0xFFF2 Watchdog Timer */
4523
#else
4524
#define WDT_VECTOR              (57 * 1u)                    /* 0xFFF2 Watchdog Timer */
4525
/*#define WDT_ISR(func)           ISR_VECTOR(func, ".int57")  */ /* 0xFFF2 Watchdog Timer */ /* CCE V2 Style */
4526
#endif
4527
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4528
#define TIMER0_B1_VECTOR        ".int58"                    /* 0xFFF4 Timer0_B7 CC1-6, TB */
4529
#else
4530
#define TIMER0_B1_VECTOR        (58 * 1u)                    /* 0xFFF4 Timer0_B7 CC1-6, TB */
4531
/*#define TIMER0_B1_ISR(func)     ISR_VECTOR(func, ".int58")  */ /* 0xFFF4 Timer0_B7 CC1-6, TB */ /* CCE V2 Style */
4532
#endif
4533
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4534
#define TIMER0_B0_VECTOR        ".int59"                    /* 0xFFF6 Timer0_B7 CC0 */
4535
#else
4536
#define TIMER0_B0_VECTOR        (59 * 1u)                    /* 0xFFF6 Timer0_B7 CC0 */
4537
/*#define TIMER0_B0_ISR(func)     ISR_VECTOR(func, ".int59")  */ /* 0xFFF6 Timer0_B7 CC0 */ /* CCE V2 Style */
4538
#endif
4539
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4540
#define COMP_B_VECTOR           ".int60"                    /* 0xFFF8 Comparator B */
4541
#else
4542
#define COMP_B_VECTOR           (60 * 1u)                    /* 0xFFF8 Comparator B */
4543
/*#define COMP_B_ISR(func)        ISR_VECTOR(func, ".int60")  */ /* 0xFFF8 Comparator B */ /* CCE V2 Style */
4544
#endif
4545
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4546
#define UNMI_VECTOR             ".int61"                    /* 0xFFFA User Non-maskable */
4547
#else
4548
#define UNMI_VECTOR             (61 * 1u)                    /* 0xFFFA User Non-maskable */
4549
/*#define UNMI_ISR(func)          ISR_VECTOR(func, ".int61")  */ /* 0xFFFA User Non-maskable */ /* CCE V2 Style */
4550
#endif
4551
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4552
#define SYSNMI_VECTOR           ".int62"                    /* 0xFFFC System Non-maskable */
4553
#else
4554
#define SYSNMI_VECTOR           (62 * 1u)                    /* 0xFFFC System Non-maskable */
4555
/*#define SYSNMI_ISR(func)        ISR_VECTOR(func, ".int62")  */ /* 0xFFFC System Non-maskable */ /* CCE V2 Style */
4556
#endif
4557
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4558
#define RESET_VECTOR            ".reset"                    /* 0xFFFE Reset [Highest Priority] */
4559
#else
4560
#define RESET_VECTOR            (63 * 1u)                    /* 0xFFFE Reset [Highest Priority] */
4561
/*#define RESET_ISR(func)         ISR_VECTOR(func, ".int63")  */ /* 0xFFFE Reset [Highest Priority] */ /* CCE V2 Style */
4562
#endif
4563
 
4564
/************************************************************
4565
* End of Modules
4566
************************************************************/
4567
 
4568
#ifdef __cplusplus
4569
}
4570
#endif /* extern "C" */
4571
 
4572
#endif /* #ifndef __msp430x551x */
4573