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
* MSP430x54x devices.
14
*
15
* Texas Instruments, Version 1.12
16
*
17
* Rev. 0.0, Setup
18
* Rev. 0.1, updated PMM (now contains already new definitions with swapped IFG flags for SVSHIFG/SVSLIFG
19
* Rev. 0.2, updated USCI/I2C Flags (UCBxIFG not used correctly)
20
* Rev. 0.3, changed RTCEVIFG to RTCTEVIFG / changed RTIV to RTCIV
21
* Rev. 0.4, added definitions for Interrupt Vectors xxIV
22
* Rev. 0.5, changed 'void __data20 * volatile' definition
23
* Rev. 1.0, fixed wrong bit definitions in FLLCTL7
24
* Rev. 1.1, fixed wrong definitions for some PxDS addresses
25
* Rev. 1.2, fixed wrong base address for RTC
26
* Rev. 1.3, fixed SYSRSTIV Definitions
27
* Rev. 1.4, removed some unused Definitions for PMM
28
* Rev. 1.5, changed Definitions for TimerB to TimerB0
29
*           added USCI word and RTxPS Definitions
30
* Rev. 1.6, changed ADC12PDIF0 to ADC12PDIV
31
*           added PMMLPM5IFG
32
* Rev. 1.7, removed definitions for FLL unlock feature
33
* Rev. 1.8, added TLV definitions
34
* Rev. 1.9, added some more DMA Trigger definitions
35
* Rev. 1.10, clean up of Flash section
36
* Rev. 1.11, Changed access type of DMAxSZ registers to word only
37
* Rev. 1.12  Changed access type of TimerA/B registers to word only
38
*
39
********************************************************************/
40
 
41
#ifndef __msp430x54x
42
#define __msp430x54x
43
 
44
#ifdef __cplusplus
45
extern "C" {
46
#endif
47
 
48
 
49
/*----------------------------------------------------------------------------*/
50
/* PERIPHERAL FILE MAP                                                        */
51
/*----------------------------------------------------------------------------*/
52
 
53
/* External references resolved by a device-specific linker command file */
54
#define SFR_8BIT(address)   extern volatile unsigned char address
55
#define SFR_16BIT(address)  extern volatile unsigned int address
56
//#define SFR_20BIT(address)  extern volatile unsigned int address
57
typedef void (* __SFR_FARPTR)();
58
#define SFR_20BIT(address) extern __SFR_FARPTR address
59
#define SFR_32BIT(address)  extern volatile unsigned long address
60
 
61
 
62
 
63
/************************************************************
64
* STANDARD BITS
65
************************************************************/
66
 
67
#define BIT0                   (0x0001)
68
#define BIT1                   (0x0002)
69
#define BIT2                   (0x0004)
70
#define BIT3                   (0x0008)
71
#define BIT4                   (0x0010)
72
#define BIT5                   (0x0020)
73
#define BIT6                   (0x0040)
74
#define BIT7                   (0x0080)
75
#define BIT8                   (0x0100)
76
#define BIT9                   (0x0200)
77
#define BITA                   (0x0400)
78
#define BITB                   (0x0800)
79
#define BITC                   (0x1000)
80
#define BITD                   (0x2000)
81
#define BITE                   (0x4000)
82
#define BITF                   (0x8000)
83
 
84
/************************************************************
85
* STATUS REGISTER BITS
86
************************************************************/
87
 
88
#define C                      (0x0001)
89
#define Z                      (0x0002)
90
#define N                      (0x0004)
91
#define V                      (0x0100)
92
#define GIE                    (0x0008)
93
#define CPUOFF                 (0x0010)
94
#define OSCOFF                 (0x0020)
95
#define SCG0                   (0x0040)
96
#define SCG1                   (0x0080)
97
 
98
/* Low Power Modes coded with Bits 4-7 in SR */
99
 
100
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
101
#define LPM0                   (CPUOFF)
102
#define LPM1                   (SCG0+CPUOFF)
103
#define LPM2                   (SCG1+CPUOFF)
104
#define LPM3                   (SCG1+SCG0+CPUOFF)
105
#define LPM4                   (SCG1+SCG0+OSCOFF+CPUOFF)
106
/* End #defines for assembler */
107
 
108
#else /* Begin #defines for C */
109
#define LPM0_bits              (CPUOFF)
110
#define LPM1_bits              (SCG0+CPUOFF)
111
#define LPM2_bits              (SCG1+CPUOFF)
112
#define LPM3_bits              (SCG1+SCG0+CPUOFF)
113
#define LPM4_bits              (SCG1+SCG0+OSCOFF+CPUOFF)
114
 
115
#include "in430.h"
116
 
117
#define LPM0         _bis_SR_register(LPM0_bits)         /* Enter Low Power Mode 0 */
118
#define LPM0_EXIT    _bic_SR_register_on_exit(LPM0_bits) /* Exit Low Power Mode 0 */
119
#define LPM1         _bis_SR_register(LPM1_bits)         /* Enter Low Power Mode 1 */
120
#define LPM1_EXIT    _bic_SR_register_on_exit(LPM1_bits) /* Exit Low Power Mode 1 */
121
#define LPM2         _bis_SR_register(LPM2_bits)         /* Enter Low Power Mode 2 */
122
#define LPM2_EXIT    _bic_SR_register_on_exit(LPM2_bits) /* Exit Low Power Mode 2 */
123
#define LPM3         _bis_SR_register(LPM3_bits)         /* Enter Low Power Mode 3 */
124
#define LPM3_EXIT    _bic_SR_register_on_exit(LPM3_bits) /* Exit Low Power Mode 3 */
125
#define LPM4         _bis_SR_register(LPM4_bits)         /* Enter Low Power Mode 4 */
126
#define LPM4_EXIT    _bic_SR_register_on_exit(LPM4_bits) /* Exit Low Power Mode 4 */
127
#endif /* End #defines for C */
128
 
129
/************************************************************
130
* CPU
131
************************************************************/
132
#define __MSP430_HAS_MSP430XV2_CPU__                /* Definition to show that it has MSP430XV2 CPU */
133
 
134
/************************************************************
135
* PERIPHERAL FILE MAP
136
************************************************************/
137
 
138
/************************************************************
139
* ADC12 PLUS
140
************************************************************/
141
#define __MSP430_HAS_ADC12_PLUS__                /* Definition to show that Module is available */
142
#define __MSP430_BASEADDRESS_ADC12_PLUS__ 0x0700
143
 
144
SFR_16BIT(ADC12CTL0);                         /* ADC12+ Control 0 */
145
SFR_8BIT(ADC12CTL0_L);                        /* ADC12+ Control 0 */
146
SFR_8BIT(ADC12CTL0_H);                        /* ADC12+ Control 0 */
147
SFR_16BIT(ADC12CTL1);                         /* ADC12+ Control 1 */
148
SFR_8BIT(ADC12CTL1_L);                        /* ADC12+ Control 1 */
149
SFR_8BIT(ADC12CTL1_H);                        /* ADC12+ Control 1 */
150
SFR_16BIT(ADC12CTL2);                         /* ADC12+ Control 2 */
151
SFR_8BIT(ADC12CTL2_L);                        /* ADC12+ Control 2 */
152
SFR_8BIT(ADC12CTL2_H);                        /* ADC12+ Control 2 */
153
SFR_16BIT(ADC12IFG);                          /* ADC12+ Interrupt Flag */
154
SFR_8BIT(ADC12IFG_L);                         /* ADC12+ Interrupt Flag */
155
SFR_8BIT(ADC12IFG_H);                         /* ADC12+ Interrupt Flag */
156
SFR_16BIT(ADC12IE);                           /* ADC12+ Interrupt Enable */
157
SFR_8BIT(ADC12IE_L);                          /* ADC12+ Interrupt Enable */
158
SFR_8BIT(ADC12IE_H);                          /* ADC12+ Interrupt Enable */
159
SFR_16BIT(ADC12IV);                           /* ADC12+ Interrupt Vector Word */
160
SFR_8BIT(ADC12IV_L);                          /* ADC12+ Interrupt Vector Word */
161
SFR_8BIT(ADC12IV_H);                          /* ADC12+ Interrupt Vector Word */
162
 
163
SFR_16BIT(ADC12MEM0);                         /* ADC12 Conversion Memory 0 */
164
SFR_8BIT(ADC12MEM0_L);                        /* ADC12 Conversion Memory 0 */
165
SFR_8BIT(ADC12MEM0_H);                        /* ADC12 Conversion Memory 0 */
166
SFR_16BIT(ADC12MEM1);                         /* ADC12 Conversion Memory 1 */
167
SFR_8BIT(ADC12MEM1_L);                        /* ADC12 Conversion Memory 1 */
168
SFR_8BIT(ADC12MEM1_H);                        /* ADC12 Conversion Memory 1 */
169
SFR_16BIT(ADC12MEM2);                         /* ADC12 Conversion Memory 2 */
170
SFR_8BIT(ADC12MEM2_L);                        /* ADC12 Conversion Memory 2 */
171
SFR_8BIT(ADC12MEM2_H);                        /* ADC12 Conversion Memory 2 */
172
SFR_16BIT(ADC12MEM3);                         /* ADC12 Conversion Memory 3 */
173
SFR_8BIT(ADC12MEM3_L);                        /* ADC12 Conversion Memory 3 */
174
SFR_8BIT(ADC12MEM3_H);                        /* ADC12 Conversion Memory 3 */
175
SFR_16BIT(ADC12MEM4);                         /* ADC12 Conversion Memory 4 */
176
SFR_8BIT(ADC12MEM4_L);                        /* ADC12 Conversion Memory 4 */
177
SFR_8BIT(ADC12MEM4_H);                        /* ADC12 Conversion Memory 4 */
178
SFR_16BIT(ADC12MEM5);                         /* ADC12 Conversion Memory 5 */
179
SFR_8BIT(ADC12MEM5_L);                        /* ADC12 Conversion Memory 5 */
180
SFR_8BIT(ADC12MEM5_H);                        /* ADC12 Conversion Memory 5 */
181
SFR_16BIT(ADC12MEM6);                         /* ADC12 Conversion Memory 6 */
182
SFR_8BIT(ADC12MEM6_L);                        /* ADC12 Conversion Memory 6 */
183
SFR_8BIT(ADC12MEM6_H);                        /* ADC12 Conversion Memory 6 */
184
SFR_16BIT(ADC12MEM7);                         /* ADC12 Conversion Memory 7 */
185
SFR_8BIT(ADC12MEM7_L);                        /* ADC12 Conversion Memory 7 */
186
SFR_8BIT(ADC12MEM7_H);                        /* ADC12 Conversion Memory 7 */
187
SFR_16BIT(ADC12MEM8);                         /* ADC12 Conversion Memory 8 */
188
SFR_8BIT(ADC12MEM8_L);                        /* ADC12 Conversion Memory 8 */
189
SFR_8BIT(ADC12MEM8_H);                        /* ADC12 Conversion Memory 8 */
190
SFR_16BIT(ADC12MEM9);                         /* ADC12 Conversion Memory 9 */
191
SFR_8BIT(ADC12MEM9_L);                        /* ADC12 Conversion Memory 9 */
192
SFR_8BIT(ADC12MEM9_H);                        /* ADC12 Conversion Memory 9 */
193
SFR_16BIT(ADC12MEM10);                        /* ADC12 Conversion Memory 10 */
194
SFR_8BIT(ADC12MEM10_L);                       /* ADC12 Conversion Memory 10 */
195
SFR_8BIT(ADC12MEM10_H);                       /* ADC12 Conversion Memory 10 */
196
SFR_16BIT(ADC12MEM11);                        /* ADC12 Conversion Memory 11 */
197
SFR_8BIT(ADC12MEM11_L);                       /* ADC12 Conversion Memory 11 */
198
SFR_8BIT(ADC12MEM11_H);                       /* ADC12 Conversion Memory 11 */
199
SFR_16BIT(ADC12MEM12);                        /* ADC12 Conversion Memory 12 */
200
SFR_8BIT(ADC12MEM12_L);                       /* ADC12 Conversion Memory 12 */
201
SFR_8BIT(ADC12MEM12_H);                       /* ADC12 Conversion Memory 12 */
202
SFR_16BIT(ADC12MEM13);                        /* ADC12 Conversion Memory 13 */
203
SFR_8BIT(ADC12MEM13_L);                       /* ADC12 Conversion Memory 13 */
204
SFR_8BIT(ADC12MEM13_H);                       /* ADC12 Conversion Memory 13 */
205
SFR_16BIT(ADC12MEM14);                        /* ADC12 Conversion Memory 14 */
206
SFR_8BIT(ADC12MEM14_L);                       /* ADC12 Conversion Memory 14 */
207
SFR_8BIT(ADC12MEM14_H);                       /* ADC12 Conversion Memory 14 */
208
SFR_16BIT(ADC12MEM15);                        /* ADC12 Conversion Memory 15 */
209
SFR_8BIT(ADC12MEM15_L);                       /* ADC12 Conversion Memory 15 */
210
SFR_8BIT(ADC12MEM15_H);                       /* ADC12 Conversion Memory 15 */
211
#define ADC12MEM_              ADC12MEM       /* ADC12 Conversion Memory */
212
#ifdef __ASM_HEADER__
213
#define ADC12MEM               ADC12MEM0      /* ADC12 Conversion Memory (for assembler) */
214
#else
215
#define ADC12MEM               ((int*)        &ADC12MEM0) /* ADC12 Conversion Memory (for C) */
216
#endif
217
 
218
SFR_8BIT(ADC12MCTL0);                         /* ADC12 Memory Control 0 */
219
SFR_8BIT(ADC12MCTL1);                         /* ADC12 Memory Control 1 */
220
SFR_8BIT(ADC12MCTL2);                         /* ADC12 Memory Control 2 */
221
SFR_8BIT(ADC12MCTL3);                         /* ADC12 Memory Control 3 */
222
SFR_8BIT(ADC12MCTL4);                         /* ADC12 Memory Control 4 */
223
SFR_8BIT(ADC12MCTL5);                         /* ADC12 Memory Control 5 */
224
SFR_8BIT(ADC12MCTL6);                         /* ADC12 Memory Control 6 */
225
SFR_8BIT(ADC12MCTL7);                         /* ADC12 Memory Control 7 */
226
SFR_8BIT(ADC12MCTL8);                         /* ADC12 Memory Control 8 */
227
SFR_8BIT(ADC12MCTL9);                         /* ADC12 Memory Control 9 */
228
SFR_8BIT(ADC12MCTL10);                        /* ADC12 Memory Control 10 */
229
SFR_8BIT(ADC12MCTL11);                        /* ADC12 Memory Control 11 */
230
SFR_8BIT(ADC12MCTL12);                        /* ADC12 Memory Control 12 */
231
SFR_8BIT(ADC12MCTL13);                        /* ADC12 Memory Control 13 */
232
SFR_8BIT(ADC12MCTL14);                        /* ADC12 Memory Control 14 */
233
SFR_8BIT(ADC12MCTL15);                        /* ADC12 Memory Control 15 */
234
#define ADC12MCTL_             ADC12MCTL      /* ADC12 Memory Control */
235
#ifdef __ASM_HEADER__
236
#define ADC12MCTL              ADC12MCTL0     /* ADC12 Memory Control (for assembler) */
237
#else
238
#define ADC12MCTL              ((char*)       &ADC12MCTL0) /* ADC12 Memory Control (for C) */
239
#endif
240
 
241
/* ADC12CTL0 Control Bits */
242
#define ADC12SC                (0x0001)       /* ADC12 Start Conversion */
243
#define ADC12ENC               (0x0002)       /* ADC12 Enable Conversion */
244
#define ADC12TOVIE             (0x0004)       /* ADC12 Timer Overflow interrupt enable */
245
#define ADC12OVIE              (0x0008)       /* ADC12 Overflow interrupt enable */
246
#define ADC12ON                (0x0010)       /* ADC12 On/enable */
247
#define ADC12REFON             (0x0020)       /* ADC12 Reference on */
248
#define ADC12REF2_5V           (0x0040)       /* ADC12 Ref 0:1.5V / 1:2.5V */
249
#define ADC12MSC               (0x0080)       /* ADC12 Multiple SampleConversion */
250
#define ADC12SHT00             (0x0100)       /* ADC12 Sample Hold 0 Select Bit: 0 */
251
#define ADC12SHT01             (0x0200)       /* ADC12 Sample Hold 0 Select Bit: 1 */
252
#define ADC12SHT02             (0x0400)       /* ADC12 Sample Hold 0 Select Bit: 2 */
253
#define ADC12SHT03             (0x0800)       /* ADC12 Sample Hold 0 Select Bit: 3 */
254
#define ADC12SHT10             (0x1000)       /* ADC12 Sample Hold 1 Select Bit: 0 */
255
#define ADC12SHT11             (0x2000)       /* ADC12 Sample Hold 1 Select Bit: 1 */
256
#define ADC12SHT12             (0x4000)       /* ADC12 Sample Hold 1 Select Bit: 2 */
257
#define ADC12SHT13             (0x8000)       /* ADC12 Sample Hold 1 Select Bit: 3 */
258
 
259
/* ADC12CTL0 Control Bits */
260
#define ADC12SC_L              (0x0001)       /* ADC12 Start Conversion */
261
#define ADC12ENC_L             (0x0002)       /* ADC12 Enable Conversion */
262
#define ADC12TOVIE_L           (0x0004)       /* ADC12 Timer Overflow interrupt enable */
263
#define ADC12OVIE_L            (0x0008)       /* ADC12 Overflow interrupt enable */
264
#define ADC12ON_L              (0x0010)       /* ADC12 On/enable */
265
#define ADC12REFON_L           (0x0020)       /* ADC12 Reference on */
266
#define ADC12REF2_5V_L         (0x0040)       /* ADC12 Ref 0:1.5V / 1:2.5V */
267
#define ADC12MSC_L             (0x0080)       /* ADC12 Multiple SampleConversion */
268
 
269
/* ADC12CTL0 Control Bits */
270
#define ADC12SHT00_H           (0x0001)       /* ADC12 Sample Hold 0 Select Bit: 0 */
271
#define ADC12SHT01_H           (0x0002)       /* ADC12 Sample Hold 0 Select Bit: 1 */
272
#define ADC12SHT02_H           (0x0004)       /* ADC12 Sample Hold 0 Select Bit: 2 */
273
#define ADC12SHT03_H           (0x0008)       /* ADC12 Sample Hold 0 Select Bit: 3 */
274
#define ADC12SHT10_H           (0x0010)       /* ADC12 Sample Hold 1 Select Bit: 0 */
275
#define ADC12SHT11_H           (0x0020)       /* ADC12 Sample Hold 1 Select Bit: 1 */
276
#define ADC12SHT12_H           (0x0040)       /* ADC12 Sample Hold 1 Select Bit: 2 */
277
#define ADC12SHT13_H           (0x0080)       /* ADC12 Sample Hold 1 Select Bit: 3 */
278
 
279
#define ADC12SHT0_0            (0*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 0 */
280
#define ADC12SHT0_1            (1*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 1 */
281
#define ADC12SHT0_2            (2*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 2 */
282
#define ADC12SHT0_3            (3*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 3 */
283
#define ADC12SHT0_4            (4*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 4 */
284
#define ADC12SHT0_5            (5*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 5 */
285
#define ADC12SHT0_6            (6*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 6 */
286
#define ADC12SHT0_7            (7*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 7 */
287
#define ADC12SHT0_8            (8*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 8 */
288
#define ADC12SHT0_9            (9*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 9 */
289
#define ADC12SHT0_10           (10*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 10 */
290
#define ADC12SHT0_11           (11*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 11 */
291
#define ADC12SHT0_12           (12*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 12 */
292
#define ADC12SHT0_13           (13*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 13 */
293
#define ADC12SHT0_14           (14*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 14 */
294
#define ADC12SHT0_15           (15*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 15 */
295
 
296
#define ADC12SHT1_0            (0*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 0 */
297
#define ADC12SHT1_1            (1*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 1 */
298
#define ADC12SHT1_2            (2*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 2 */
299
#define ADC12SHT1_3            (3*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 3 */
300
#define ADC12SHT1_4            (4*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 4 */
301
#define ADC12SHT1_5            (5*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 5 */
302
#define ADC12SHT1_6            (6*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 6 */
303
#define ADC12SHT1_7            (7*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 7 */
304
#define ADC12SHT1_8            (8*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 8 */
305
#define ADC12SHT1_9            (9*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 9 */
306
#define ADC12SHT1_10           (10*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 10 */
307
#define ADC12SHT1_11           (11*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 11 */
308
#define ADC12SHT1_12           (12*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 12 */
309
#define ADC12SHT1_13           (13*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 13 */
310
#define ADC12SHT1_14           (14*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 14 */
311
#define ADC12SHT1_15           (15*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 15 */
312
 
313
/* ADC12CTL1 Control Bits */
314
#define ADC12BUSY              (0x0001)       /* ADC12 Busy */
315
#define ADC12CONSEQ0           (0x0002)       /* ADC12 Conversion Sequence Select Bit: 0 */
316
#define ADC12CONSEQ1           (0x0004)       /* ADC12 Conversion Sequence Select Bit: 1 */
317
#define ADC12SSEL0             (0x0008)       /* ADC12 Clock Source Select Bit: 0 */
318
#define ADC12SSEL1             (0x0010)       /* ADC12 Clock Source Select Bit: 1 */
319
#define ADC12DIV0              (0x0020)       /* ADC12 Clock Divider Select Bit: 0 */
320
#define ADC12DIV1              (0x0040)       /* ADC12 Clock Divider Select Bit: 1 */
321
#define ADC12DIV2              (0x0080)       /* ADC12 Clock Divider Select Bit: 2 */
322
#define ADC12ISSH              (0x0100)       /* ADC12 Invert Sample Hold Signal */
323
#define ADC12SHP               (0x0200)       /* ADC12 Sample/Hold Pulse Mode */
324
#define ADC12SHS0              (0x0400)       /* ADC12 Sample/Hold Source Bit: 0 */
325
#define ADC12SHS1              (0x0800)       /* ADC12 Sample/Hold Source Bit: 1 */
326
#define ADC12CSTARTADD0        (0x1000)       /* ADC12 Conversion Start Address Bit: 0 */
327
#define ADC12CSTARTADD1        (0x2000)       /* ADC12 Conversion Start Address Bit: 1 */
328
#define ADC12CSTARTADD2        (0x4000)       /* ADC12 Conversion Start Address Bit: 2 */
329
#define ADC12CSTARTADD3        (0x8000)       /* ADC12 Conversion Start Address Bit: 3 */
330
 
331
/* ADC12CTL1 Control Bits */
332
#define ADC12BUSY_L            (0x0001)       /* ADC12 Busy */
333
#define ADC12CONSEQ0_L         (0x0002)       /* ADC12 Conversion Sequence Select Bit: 0 */
334
#define ADC12CONSEQ1_L         (0x0004)       /* ADC12 Conversion Sequence Select Bit: 1 */
335
#define ADC12SSEL0_L           (0x0008)       /* ADC12 Clock Source Select Bit: 0 */
336
#define ADC12SSEL1_L           (0x0010)       /* ADC12 Clock Source Select Bit: 1 */
337
#define ADC12DIV0_L            (0x0020)       /* ADC12 Clock Divider Select Bit: 0 */
338
#define ADC12DIV1_L            (0x0040)       /* ADC12 Clock Divider Select Bit: 1 */
339
#define ADC12DIV2_L            (0x0080)       /* ADC12 Clock Divider Select Bit: 2 */
340
 
341
/* ADC12CTL1 Control Bits */
342
#define ADC12ISSH_H            (0x0001)       /* ADC12 Invert Sample Hold Signal */
343
#define ADC12SHP_H             (0x0002)       /* ADC12 Sample/Hold Pulse Mode */
344
#define ADC12SHS0_H            (0x0004)       /* ADC12 Sample/Hold Source Bit: 0 */
345
#define ADC12SHS1_H            (0x0008)       /* ADC12 Sample/Hold Source Bit: 1 */
346
#define ADC12CSTARTADD0_H      (0x0010)       /* ADC12 Conversion Start Address Bit: 0 */
347
#define ADC12CSTARTADD1_H      (0x0020)       /* ADC12 Conversion Start Address Bit: 1 */
348
#define ADC12CSTARTADD2_H      (0x0040)       /* ADC12 Conversion Start Address Bit: 2 */
349
#define ADC12CSTARTADD3_H      (0x0080)       /* ADC12 Conversion Start Address Bit: 3 */
350
 
351
#define ADC12CONSEQ_0          (0*2u)         /* ADC12 Conversion Sequence Select: 0 */
352
#define ADC12CONSEQ_1          (1*2u)         /* ADC12 Conversion Sequence Select: 1 */
353
#define ADC12CONSEQ_2          (2*2u)         /* ADC12 Conversion Sequence Select: 2 */
354
#define ADC12CONSEQ_3          (3*2u)         /* ADC12 Conversion Sequence Select: 3 */
355
 
356
#define ADC12SSEL_0            (0*8u)         /* ADC12 Clock Source Select: 0 */
357
#define ADC12SSEL_1            (1*8u)         /* ADC12 Clock Source Select: 1 */
358
#define ADC12SSEL_2            (2*8u)         /* ADC12 Clock Source Select: 2 */
359
#define ADC12SSEL_3            (3*8u)         /* ADC12 Clock Source Select: 3 */
360
 
361
#define ADC12DIV_0             (0*0x20u)      /* ADC12 Clock Divider Select: 0 */
362
#define ADC12DIV_1             (1*0x20u)      /* ADC12 Clock Divider Select: 1 */
363
#define ADC12DIV_2             (2*0x20u)      /* ADC12 Clock Divider Select: 2 */
364
#define ADC12DIV_3             (3*0x20u)      /* ADC12 Clock Divider Select: 3 */
365
#define ADC12DIV_4             (4*0x20u)      /* ADC12 Clock Divider Select: 4 */
366
#define ADC12DIV_5             (5*0x20u)      /* ADC12 Clock Divider Select: 5 */
367
#define ADC12DIV_6             (6*0x20u)      /* ADC12 Clock Divider Select: 6 */
368
#define ADC12DIV_7             (7*0x20u)      /* ADC12 Clock Divider Select: 7 */
369
 
370
#define ADC12SHS_0             (0*0x400u)     /* ADC12 Sample/Hold Source: 0 */
371
#define ADC12SHS_1             (1*0x400u)     /* ADC12 Sample/Hold Source: 1 */
372
#define ADC12SHS_2             (2*0x400u)     /* ADC12 Sample/Hold Source: 2 */
373
#define ADC12SHS_3             (3*0x400u)     /* ADC12 Sample/Hold Source: 3 */
374
 
375
#define ADC12CSTARTADD_0       (0*0x1000u)    /* ADC12 Conversion Start Address: 0 */
376
#define ADC12CSTARTADD_1       (1*0x1000u)    /* ADC12 Conversion Start Address: 1 */
377
#define ADC12CSTARTADD_2       (2*0x1000u)    /* ADC12 Conversion Start Address: 2 */
378
#define ADC12CSTARTADD_3       (3*0x1000u)    /* ADC12 Conversion Start Address: 3 */
379
#define ADC12CSTARTADD_4       (4*0x1000u)    /* ADC12 Conversion Start Address: 4 */
380
#define ADC12CSTARTADD_5       (5*0x1000u)    /* ADC12 Conversion Start Address: 5 */
381
#define ADC12CSTARTADD_6       (6*0x1000u)    /* ADC12 Conversion Start Address: 6 */
382
#define ADC12CSTARTADD_7       (7*0x1000u)    /* ADC12 Conversion Start Address: 7 */
383
#define ADC12CSTARTADD_8       (8*0x1000u)    /* ADC12 Conversion Start Address: 8 */
384
#define ADC12CSTARTADD_9       (9*0x1000u)    /* ADC12 Conversion Start Address: 9 */
385
#define ADC12CSTARTADD_10      (10*0x1000u)   /* ADC12 Conversion Start Address: 10 */
386
#define ADC12CSTARTADD_11      (11*0x1000u)   /* ADC12 Conversion Start Address: 11 */
387
#define ADC12CSTARTADD_12      (12*0x1000u)   /* ADC12 Conversion Start Address: 12 */
388
#define ADC12CSTARTADD_13      (13*0x1000u)   /* ADC12 Conversion Start Address: 13 */
389
#define ADC12CSTARTADD_14      (14*0x1000u)   /* ADC12 Conversion Start Address: 14 */
390
#define ADC12CSTARTADD_15      (15*0x1000u)   /* ADC12 Conversion Start Address: 15 */
391
 
392
/* ADC12CTL2 Control Bits */
393
#define ADC12REFBURST          (0x0001)       /* ADC12+ Reference Burst */
394
#define ADC12REFOUT            (0x0002)       /* ADC12+ Reference Out */
395
#define ADC12SR                (0x0004)       /* ADC12+ Sampling Rate */
396
#define ADC12DF                (0x0008)       /* ADC12+ Data Format */
397
#define ADC12RES0              (0x0010)       /* ADC12+ Resolution Bit: 0 */
398
#define ADC12RES1              (0x0020)       /* ADC12+ Resolution Bit: 1 */
399
#define ADC12TCOFF             (0x0080)       /* ADC12+ Temperature Sensor Off */
400
#define ADC12PDIV              (0x0100)       /* ADC12+ predivider 0:/1   1:/4 */
401
 
402
/* ADC12CTL2 Control Bits */
403
#define ADC12REFBURST_L        (0x0001)       /* ADC12+ Reference Burst */
404
#define ADC12REFOUT_L          (0x0002)       /* ADC12+ Reference Out */
405
#define ADC12SR_L              (0x0004)       /* ADC12+ Sampling Rate */
406
#define ADC12DF_L              (0x0008)       /* ADC12+ Data Format */
407
#define ADC12RES0_L            (0x0010)       /* ADC12+ Resolution Bit: 0 */
408
#define ADC12RES1_L            (0x0020)       /* ADC12+ Resolution Bit: 1 */
409
#define ADC12TCOFF_L           (0x0080)       /* ADC12+ Temperature Sensor Off */
410
 
411
/* ADC12CTL2 Control Bits */
412
#define ADC12PDIV_H            (0x0001)       /* ADC12+ predivider 0:/1   1:/4 */
413
 
414
#define ADC12RES_0             (0x0000)       /* ADC12+ Resolution : 8 Bit */
415
#define ADC12RES_1             (0x0010)       /* ADC12+ Resolution : 10 Bit */
416
#define ADC12RES_2             (0x0020)       /* ADC12+ Resolution : 12 Bit */
417
#define ADC12RES_3             (0x0030)       /* ADC12+ Resolution : reserved */
418
 
419
/* ADC12MCTLx Control Bits */
420
#define ADC12INCH0             (0x0001)       /* ADC12 Input Channel Select Bit 0 */
421
#define ADC12INCH1             (0x0002)       /* ADC12 Input Channel Select Bit 1 */
422
#define ADC12INCH2             (0x0004)       /* ADC12 Input Channel Select Bit 2 */
423
#define ADC12INCH3             (0x0008)       /* ADC12 Input Channel Select Bit 3 */
424
#define ADC12SREF0             (0x0010)       /* ADC12 Select Reference Bit 0 */
425
#define ADC12SREF1             (0x0020)       /* ADC12 Select Reference Bit 1 */
426
#define ADC12SREF2             (0x0040)       /* ADC12 Select Reference Bit 2 */
427
#define ADC12EOS               (0x0080)       /* ADC12 End of Sequence */
428
 
429
#define ADC12INCH_0            (0x0000)       /* ADC12 Input Channel 0 */
430
#define ADC12INCH_1            (0x0001)       /* ADC12 Input Channel 1 */
431
#define ADC12INCH_2            (0x0002)       /* ADC12 Input Channel 2 */
432
#define ADC12INCH_3            (0x0003)       /* ADC12 Input Channel 3 */
433
#define ADC12INCH_4            (0x0004)       /* ADC12 Input Channel 4 */
434
#define ADC12INCH_5            (0x0005)       /* ADC12 Input Channel 5 */
435
#define ADC12INCH_6            (0x0006)       /* ADC12 Input Channel 6 */
436
#define ADC12INCH_7            (0x0007)       /* ADC12 Input Channel 7 */
437
#define ADC12INCH_8            (0x0008)       /* ADC12 Input Channel 8 */
438
#define ADC12INCH_9            (0x0009)       /* ADC12 Input Channel 9 */
439
#define ADC12INCH_10           (0x000A)       /* ADC12 Input Channel 10 */
440
#define ADC12INCH_11           (0x000B)       /* ADC12 Input Channel 11 */
441
#define ADC12INCH_12           (0x000C)       /* ADC12 Input Channel 12 */
442
#define ADC12INCH_13           (0x000D)       /* ADC12 Input Channel 13 */
443
#define ADC12INCH_14           (0x000E)       /* ADC12 Input Channel 14 */
444
#define ADC12INCH_15           (0x000F)       /* ADC12 Input Channel 15 */
445
 
446
#define ADC12SREF_0            (0*0x10u)      /* ADC12 Select Reference 0 */
447
#define ADC12SREF_1            (1*0x10u)      /* ADC12 Select Reference 1 */
448
#define ADC12SREF_2            (2*0x10u)      /* ADC12 Select Reference 2 */
449
#define ADC12SREF_3            (3*0x10u)      /* ADC12 Select Reference 3 */
450
#define ADC12SREF_4            (4*0x10u)      /* ADC12 Select Reference 4 */
451
#define ADC12SREF_5            (5*0x10u)      /* ADC12 Select Reference 5 */
452
#define ADC12SREF_6            (6*0x10u)      /* ADC12 Select Reference 6 */
453
#define ADC12SREF_7            (7*0x10u)      /* ADC12 Select Reference 7 */
454
 
455
#define ADC12IE0               (0x0001)       /* ADC12 Memory 0      Interrupt Enable */
456
#define ADC12IE1               (0x0002)       /* ADC12 Memory 1      Interrupt Enable */
457
#define ADC12IE2               (0x0004)       /* ADC12 Memory 2      Interrupt Enable */
458
#define ADC12IE3               (0x0008)       /* ADC12 Memory 3      Interrupt Enable */
459
#define ADC12IE4               (0x0010)       /* ADC12 Memory 4      Interrupt Enable */
460
#define ADC12IE5               (0x0020)       /* ADC12 Memory 5      Interrupt Enable */
461
#define ADC12IE6               (0x0040)       /* ADC12 Memory 6      Interrupt Enable */
462
#define ADC12IE7               (0x0080)       /* ADC12 Memory 7      Interrupt Enable */
463
#define ADC12IE8               (0x0100)       /* ADC12 Memory 8      Interrupt Enable */
464
#define ADC12IE9               (0x0200)       /* ADC12 Memory 9      Interrupt Enable */
465
#define ADC12IE10              (0x0400)       /* ADC12 Memory 10      Interrupt Enable */
466
#define ADC12IE11              (0x0800)       /* ADC12 Memory 11      Interrupt Enable */
467
#define ADC12IE12              (0x1000)       /* ADC12 Memory 12      Interrupt Enable */
468
#define ADC12IE13              (0x2000)       /* ADC12 Memory 13      Interrupt Enable */
469
#define ADC12IE14              (0x4000)       /* ADC12 Memory 14      Interrupt Enable */
470
#define ADC12IE15              (0x8000)       /* ADC12 Memory 15      Interrupt Enable */
471
 
472
#define ADC12IE0_L             (0x0001)       /* ADC12 Memory 0      Interrupt Enable */
473
#define ADC12IE1_L             (0x0002)       /* ADC12 Memory 1      Interrupt Enable */
474
#define ADC12IE2_L             (0x0004)       /* ADC12 Memory 2      Interrupt Enable */
475
#define ADC12IE3_L             (0x0008)       /* ADC12 Memory 3      Interrupt Enable */
476
#define ADC12IE4_L             (0x0010)       /* ADC12 Memory 4      Interrupt Enable */
477
#define ADC12IE5_L             (0x0020)       /* ADC12 Memory 5      Interrupt Enable */
478
#define ADC12IE6_L             (0x0040)       /* ADC12 Memory 6      Interrupt Enable */
479
#define ADC12IE7_L             (0x0080)       /* ADC12 Memory 7      Interrupt Enable */
480
 
481
#define ADC12IE8_H             (0x0001)       /* ADC12 Memory 8      Interrupt Enable */
482
#define ADC12IE9_H             (0x0002)       /* ADC12 Memory 9      Interrupt Enable */
483
#define ADC12IE10_H            (0x0004)       /* ADC12 Memory 10      Interrupt Enable */
484
#define ADC12IE11_H            (0x0008)       /* ADC12 Memory 11      Interrupt Enable */
485
#define ADC12IE12_H            (0x0010)       /* ADC12 Memory 12      Interrupt Enable */
486
#define ADC12IE13_H            (0x0020)       /* ADC12 Memory 13      Interrupt Enable */
487
#define ADC12IE14_H            (0x0040)       /* ADC12 Memory 14      Interrupt Enable */
488
#define ADC12IE15_H            (0x0080)       /* ADC12 Memory 15      Interrupt Enable */
489
 
490
#define ADC12IFG0              (0x0001)       /* ADC12 Memory 0      Interrupt Flag */
491
#define ADC12IFG1              (0x0002)       /* ADC12 Memory 1      Interrupt Flag */
492
#define ADC12IFG2              (0x0004)       /* ADC12 Memory 2      Interrupt Flag */
493
#define ADC12IFG3              (0x0008)       /* ADC12 Memory 3      Interrupt Flag */
494
#define ADC12IFG4              (0x0010)       /* ADC12 Memory 4      Interrupt Flag */
495
#define ADC12IFG5              (0x0020)       /* ADC12 Memory 5      Interrupt Flag */
496
#define ADC12IFG6              (0x0040)       /* ADC12 Memory 6      Interrupt Flag */
497
#define ADC12IFG7              (0x0080)       /* ADC12 Memory 7      Interrupt Flag */
498
#define ADC12IFG8              (0x0100)       /* ADC12 Memory 8      Interrupt Flag */
499
#define ADC12IFG9              (0x0200)       /* ADC12 Memory 9      Interrupt Flag */
500
#define ADC12IFG10             (0x0400)       /* ADC12 Memory 10      Interrupt Flag */
501
#define ADC12IFG11             (0x0800)       /* ADC12 Memory 11      Interrupt Flag */
502
#define ADC12IFG12             (0x1000)       /* ADC12 Memory 12      Interrupt Flag */
503
#define ADC12IFG13             (0x2000)       /* ADC12 Memory 13      Interrupt Flag */
504
#define ADC12IFG14             (0x4000)       /* ADC12 Memory 14      Interrupt Flag */
505
#define ADC12IFG15             (0x8000)       /* ADC12 Memory 15      Interrupt Flag */
506
 
507
#define ADC12IFG0_L            (0x0001)       /* ADC12 Memory 0      Interrupt Flag */
508
#define ADC12IFG1_L            (0x0002)       /* ADC12 Memory 1      Interrupt Flag */
509
#define ADC12IFG2_L            (0x0004)       /* ADC12 Memory 2      Interrupt Flag */
510
#define ADC12IFG3_L            (0x0008)       /* ADC12 Memory 3      Interrupt Flag */
511
#define ADC12IFG4_L            (0x0010)       /* ADC12 Memory 4      Interrupt Flag */
512
#define ADC12IFG5_L            (0x0020)       /* ADC12 Memory 5      Interrupt Flag */
513
#define ADC12IFG6_L            (0x0040)       /* ADC12 Memory 6      Interrupt Flag */
514
#define ADC12IFG7_L            (0x0080)       /* ADC12 Memory 7      Interrupt Flag */
515
 
516
#define ADC12IFG8_H            (0x0001)       /* ADC12 Memory 8      Interrupt Flag */
517
#define ADC12IFG9_H            (0x0002)       /* ADC12 Memory 9      Interrupt Flag */
518
#define ADC12IFG10_H           (0x0004)       /* ADC12 Memory 10      Interrupt Flag */
519
#define ADC12IFG11_H           (0x0008)       /* ADC12 Memory 11      Interrupt Flag */
520
#define ADC12IFG12_H           (0x0010)       /* ADC12 Memory 12      Interrupt Flag */
521
#define ADC12IFG13_H           (0x0020)       /* ADC12 Memory 13      Interrupt Flag */
522
#define ADC12IFG14_H           (0x0040)       /* ADC12 Memory 14      Interrupt Flag */
523
#define ADC12IFG15_H           (0x0080)       /* ADC12 Memory 15      Interrupt Flag */
524
 
525
/* ADC12IV Definitions */
526
#define ADC12IV_NONE           (0x0000)       /* No Interrupt pending */
527
#define ADC12IV_ADC12OVIFG     (0x0002)       /* ADC12OVIFG */
528
#define ADC12IV_ADC12TOVIFG    (0x0004)       /* ADC12TOVIFG */
529
#define ADC12IV_ADC12IFG0      (0x0006)       /* ADC12IFG0 */
530
#define ADC12IV_ADC12IFG1      (0x0008)       /* ADC12IFG1 */
531
#define ADC12IV_ADC12IFG2      (0x000A)       /* ADC12IFG2 */
532
#define ADC12IV_ADC12IFG3      (0x000C)       /* ADC12IFG3 */
533
#define ADC12IV_ADC12IFG4      (0x000E)       /* ADC12IFG4 */
534
#define ADC12IV_ADC12IFG5      (0x0010)       /* ADC12IFG5 */
535
#define ADC12IV_ADC12IFG6      (0x0012)       /* ADC12IFG6 */
536
#define ADC12IV_ADC12IFG7      (0x0014)       /* ADC12IFG7 */
537
#define ADC12IV_ADC12IFG8      (0x0016)       /* ADC12IFG8 */
538
#define ADC12IV_ADC12IFG9      (0x0018)       /* ADC12IFG9 */
539
#define ADC12IV_ADC12IFG10     (0x001A)       /* ADC12IFG10 */
540
#define ADC12IV_ADC12IFG11     (0x001C)       /* ADC12IFG11 */
541
#define ADC12IV_ADC12IFG12     (0x001E)       /* ADC12IFG12 */
542
#define ADC12IV_ADC12IFG13     (0x0020)       /* ADC12IFG13 */
543
#define ADC12IV_ADC12IFG14     (0x0022)       /* ADC12IFG14 */
544
#define ADC12IV_ADC12IFG15     (0x0024)       /* ADC12IFG15 */
545
 
546
/*************************************************************
547
* CRC Module
548
*************************************************************/
549
#define __MSP430_HAS_CRC__                    /* Definition to show that Module is available */
550
#define __MSP430_BASEADDRESS_CRC__ 0x0150
551
 
552
SFR_16BIT(CRCDI);                             /* CRC Data In Register */
553
SFR_8BIT(CRCDI_L);                            /* CRC Data In Register */
554
SFR_8BIT(CRCDI_H);                            /* CRC Data In Register */
555
SFR_16BIT(CRCINIRES);                         /* CRC Initialisation Register and Result Register*/
556
SFR_8BIT(CRCINIRES_L);                        /* CRC Initialisation Register and Result Register*/
557
SFR_8BIT(CRCINIRES_H);                        /* CRC Initialisation Register and Result Register*/
558
 
559
/************************************************************
560
* DMA_X
561
************************************************************/
562
#define __MSP430_HAS_DMAX_3__                 /* Definition to show that Module is available */
563
#define __MSP430_BASEADDRESS_DMAX_3__ 0x0500
564
 
565
SFR_16BIT(DMACTL0);                           /* DMA Module Control 0 */
566
SFR_8BIT(DMACTL0_L);                          /* DMA Module Control 0 */
567
SFR_8BIT(DMACTL0_H);                          /* DMA Module Control 0 */
568
SFR_16BIT(DMACTL1);                           /* DMA Module Control 1 */
569
SFR_8BIT(DMACTL1_L);                          /* DMA Module Control 1 */
570
SFR_8BIT(DMACTL1_H);                          /* DMA Module Control 1 */
571
SFR_16BIT(DMACTL2);                           /* DMA Module Control 2 */
572
SFR_8BIT(DMACTL2_L);                          /* DMA Module Control 2 */
573
SFR_8BIT(DMACTL2_H);                          /* DMA Module Control 2 */
574
SFR_16BIT(DMACTL3);                           /* DMA Module Control 3 */
575
SFR_8BIT(DMACTL3_L);                          /* DMA Module Control 3 */
576
SFR_8BIT(DMACTL3_H);                          /* DMA Module Control 3 */
577
SFR_16BIT(DMACTL4);                           /* DMA Module Control 4 */
578
SFR_8BIT(DMACTL4_L);                          /* DMA Module Control 4 */
579
SFR_8BIT(DMACTL4_H);                          /* DMA Module Control 4 */
580
SFR_16BIT(DMAIV);                             /* DMA Interrupt Vector Word */
581
SFR_8BIT(DMAIV_L);                            /* DMA Interrupt Vector Word */
582
SFR_8BIT(DMAIV_H);                            /* DMA Interrupt Vector Word */
583
 
584
SFR_16BIT(DMA0CTL);                           /* DMA Channel 0 Control */
585
SFR_8BIT(DMA0CTL_L);                          /* DMA Channel 0 Control */
586
SFR_8BIT(DMA0CTL_H);                          /* DMA Channel 0 Control */
587
SFR_20BIT(DMA0SA);                            /* DMA Channel 0 Source Address */
588
SFR_16BIT(DMA0SAL);                           /* DMA Channel 0 Source Address */
589
SFR_20BIT(DMA0DA);                            /* DMA Channel 0 Destination Address */
590
SFR_16BIT(DMA0DAL);                           /* DMA Channel 0 Destination Address */
591
SFR_16BIT(DMA0SZ);                            /* DMA Channel 0 Transfer Size */
592
 
593
SFR_16BIT(DMA1CTL);                           /* DMA Channel 1 Control */
594
SFR_8BIT(DMA1CTL_L);                          /* DMA Channel 1 Control */
595
SFR_8BIT(DMA1CTL_H);                          /* DMA Channel 1 Control */
596
SFR_20BIT(DMA1SA);                            /* DMA Channel 1 Source Address */
597
SFR_16BIT(DMA1SAL);                           /* DMA Channel 1 Source Address */
598
SFR_20BIT(DMA1DA);                            /* DMA Channel 1 Destination Address */
599
SFR_16BIT(DMA1DAL);                           /* DMA Channel 1 Destination Address */
600
SFR_16BIT(DMA1SZ);                            /* DMA Channel 1 Transfer Size */
601
 
602
SFR_16BIT(DMA2CTL);                           /* DMA Channel 2 Control */
603
SFR_8BIT(DMA2CTL_L);                          /* DMA Channel 2 Control */
604
SFR_8BIT(DMA2CTL_H);                          /* DMA Channel 2 Control */
605
SFR_20BIT(DMA2SA);                            /* DMA Channel 2 Source Address */
606
SFR_16BIT(DMA2SAL);                           /* DMA Channel 2 Source Address */
607
SFR_20BIT(DMA2DA);                            /* DMA Channel 2 Destination Address */
608
SFR_16BIT(DMA2DAL);                           /* DMA Channel 2 Destination Address */
609
SFR_16BIT(DMA2SZ);                            /* DMA Channel 2 Transfer Size */
610
 
611
/* DMACTL0 Control Bits */
612
#define DMA0TSEL0              (0x0001)       /* DMA channel 0 transfer select bit 0 */
613
#define DMA0TSEL1              (0x0002)       /* DMA channel 0 transfer select bit 1 */
614
#define DMA0TSEL2              (0x0004)       /* DMA channel 0 transfer select bit 2 */
615
#define DMA0TSEL3              (0x0008)       /* DMA channel 0 transfer select bit 3 */
616
#define DMA0TSEL4              (0x0010)       /* DMA channel 0 transfer select bit 4 */
617
#define DMA1TSEL0              (0x0100)       /* DMA channel 1 transfer select bit 0 */
618
#define DMA1TSEL1              (0x0200)       /* DMA channel 1 transfer select bit 1 */
619
#define DMA1TSEL2              (0x0400)       /* DMA channel 1 transfer select bit 2 */
620
#define DMA1TSEL3              (0x0800)       /* DMA channel 1 transfer select bit 3 */
621
#define DMA1TSEL4              (0x1000)       /* DMA channel 1 transfer select bit 4 */
622
 
623
/* DMACTL0 Control Bits */
624
#define DMA0TSEL0_L            (0x0001)       /* DMA channel 0 transfer select bit 0 */
625
#define DMA0TSEL1_L            (0x0002)       /* DMA channel 0 transfer select bit 1 */
626
#define DMA0TSEL2_L            (0x0004)       /* DMA channel 0 transfer select bit 2 */
627
#define DMA0TSEL3_L            (0x0008)       /* DMA channel 0 transfer select bit 3 */
628
#define DMA0TSEL4_L            (0x0010)       /* DMA channel 0 transfer select bit 4 */
629
 
630
/* DMACTL0 Control Bits */
631
#define DMA1TSEL0_H            (0x0001)       /* DMA channel 1 transfer select bit 0 */
632
#define DMA1TSEL1_H            (0x0002)       /* DMA channel 1 transfer select bit 1 */
633
#define DMA1TSEL2_H            (0x0004)       /* DMA channel 1 transfer select bit 2 */
634
#define DMA1TSEL3_H            (0x0008)       /* DMA channel 1 transfer select bit 3 */
635
#define DMA1TSEL4_H            (0x0010)       /* DMA channel 1 transfer select bit 4 */
636
 
637
/* DMACTL01 Control Bits */
638
#define DMA2TSEL0              (0x0001)       /* DMA channel 2 transfer select bit 0 */
639
#define DMA2TSEL1              (0x0002)       /* DMA channel 2 transfer select bit 1 */
640
#define DMA2TSEL2              (0x0004)       /* DMA channel 2 transfer select bit 2 */
641
#define DMA2TSEL3              (0x0008)       /* DMA channel 2 transfer select bit 3 */
642
#define DMA2TSEL4              (0x0010)       /* DMA channel 2 transfer select bit 4 */
643
 
644
/* DMACTL01 Control Bits */
645
#define DMA2TSEL0_L            (0x0001)       /* DMA channel 2 transfer select bit 0 */
646
#define DMA2TSEL1_L            (0x0002)       /* DMA channel 2 transfer select bit 1 */
647
#define DMA2TSEL2_L            (0x0004)       /* DMA channel 2 transfer select bit 2 */
648
#define DMA2TSEL3_L            (0x0008)       /* DMA channel 2 transfer select bit 3 */
649
#define DMA2TSEL4_L            (0x0010)       /* DMA channel 2 transfer select bit 4 */
650
 
651
/* DMACTL01 Control Bits */
652
 
653
/* DMACTL4 Control Bits */
654
#define ENNMI                  (0x0001)       /* Enable NMI interruption of DMA */
655
#define ROUNDROBIN             (0x0002)       /* Round-Robin DMA channel priorities */
656
#define DMARMWDIS              (0x0004)       /* Inhibited DMA transfers during read-modify-write CPU operations */
657
 
658
/* DMACTL4 Control Bits */
659
#define ENNMI_L                (0x0001)       /* Enable NMI interruption of DMA */
660
#define ROUNDROBIN_L           (0x0002)       /* Round-Robin DMA channel priorities */
661
#define DMARMWDIS_L            (0x0004)       /* Inhibited DMA transfers during read-modify-write CPU operations */
662
 
663
/* DMACTL4 Control Bits */
664
 
665
/* DMAxCTL Control Bits */
666
#define DMAREQ                 (0x0001)       /* Initiate DMA transfer with DMATSEL */
667
#define DMAABORT               (0x0002)       /* DMA transfer aborted by NMI */
668
#define DMAIE                  (0x0004)       /* DMA interrupt enable */
669
#define DMAIFG                 (0x0008)       /* DMA interrupt flag */
670
#define DMAEN                  (0x0010)       /* DMA enable */
671
#define DMALEVEL               (0x0020)       /* DMA level sensitive trigger select */
672
#define DMASRCBYTE             (0x0040)       /* DMA source byte */
673
#define DMADSTBYTE             (0x0080)       /* DMA destination byte */
674
#define DMASRCINCR0            (0x0100)       /* DMA source increment bit 0 */
675
#define DMASRCINCR1            (0x0200)       /* DMA source increment bit 1 */
676
#define DMADSTINCR0            (0x0400)       /* DMA destination increment bit 0 */
677
#define DMADSTINCR1            (0x0800)       /* DMA destination increment bit 1 */
678
#define DMADT0                 (0x1000)       /* DMA transfer mode bit 0 */
679
#define DMADT1                 (0x2000)       /* DMA transfer mode bit 1 */
680
#define DMADT2                 (0x4000)       /* DMA transfer mode bit 2 */
681
 
682
/* DMAxCTL Control Bits */
683
#define DMAREQ_L               (0x0001)       /* Initiate DMA transfer with DMATSEL */
684
#define DMAABORT_L             (0x0002)       /* DMA transfer aborted by NMI */
685
#define DMAIE_L                (0x0004)       /* DMA interrupt enable */
686
#define DMAIFG_L               (0x0008)       /* DMA interrupt flag */
687
#define DMAEN_L                (0x0010)       /* DMA enable */
688
#define DMALEVEL_L             (0x0020)       /* DMA level sensitive trigger select */
689
#define DMASRCBYTE_L           (0x0040)       /* DMA source byte */
690
#define DMADSTBYTE_L           (0x0080)       /* DMA destination byte */
691
 
692
/* DMAxCTL Control Bits */
693
#define DMASRCINCR0_H          (0x0001)       /* DMA source increment bit 0 */
694
#define DMASRCINCR1_H          (0x0002)       /* DMA source increment bit 1 */
695
#define DMADSTINCR0_H          (0x0004)       /* DMA destination increment bit 0 */
696
#define DMADSTINCR1_H          (0x0008)       /* DMA destination increment bit 1 */
697
#define DMADT0_H               (0x0010)       /* DMA transfer mode bit 0 */
698
#define DMADT1_H               (0x0020)       /* DMA transfer mode bit 1 */
699
#define DMADT2_H               (0x0040)       /* DMA transfer mode bit 2 */
700
 
701
#define DMASWDW                (0*0x0040u)    /* DMA transfer: source word to destination word */
702
#define DMASBDW                (1*0x0040u)    /* DMA transfer: source byte to destination word */
703
#define DMASWDB                (2*0x0040u)    /* DMA transfer: source word to destination byte */
704
#define DMASBDB                (3*0x0040u)    /* DMA transfer: source byte to destination byte */
705
 
706
#define DMASRCINCR_0           (0*0x0100u)    /* DMA source increment 0: source address unchanged */
707
#define DMASRCINCR_1           (1*0x0100u)    /* DMA source increment 1: source address unchanged */
708
#define DMASRCINCR_2           (2*0x0100u)    /* DMA source increment 2: source address decremented */
709
#define DMASRCINCR_3           (3*0x0100u)    /* DMA source increment 3: source address incremented */
710
 
711
#define DMADSTINCR_0           (0*0x0400u)    /* DMA destination increment 0: destination address unchanged */
712
#define DMADSTINCR_1           (1*0x0400u)    /* DMA destination increment 1: destination address unchanged */
713
#define DMADSTINCR_2           (2*0x0400u)    /* DMA destination increment 2: destination address decremented */
714
#define DMADSTINCR_3           (3*0x0400u)    /* DMA destination increment 3: destination address incremented */
715
 
716
#define DMADT_0                (0*0x1000u)    /* DMA transfer mode 0: Single transfer */
717
#define DMADT_1                (1*0x1000u)    /* DMA transfer mode 1: Block transfer */
718
#define DMADT_2                (2*0x1000u)    /* DMA transfer mode 2: Burst-Block transfer */
719
#define DMADT_3                (3*0x1000u)    /* DMA transfer mode 3: Burst-Block transfer */
720
#define DMADT_4                (4*0x1000u)    /* DMA transfer mode 4: Repeated Single transfer */
721
#define DMADT_5                (5*0x1000u)    /* DMA transfer mode 5: Repeated Block transfer */
722
#define DMADT_6                (6*0x1000u)    /* DMA transfer mode 6: Repeated Burst-Block transfer */
723
#define DMADT_7                (7*0x1000u)    /* DMA transfer mode 7: Repeated Burst-Block transfer */
724
 
725
/* DMAIV Definitions */
726
#define DMAIV_NONE             (0x0000)       /* No Interrupt pending */
727
#define DMAIV_DMA0IFG          (0x0002)       /* DMA0IFG*/
728
#define DMAIV_DMA1IFG          (0x0004)       /* DMA1IFG*/
729
#define DMAIV_DMA2IFG          (0x0006)       /* DMA2IFG*/
730
 
731
#define DMA0TSEL_0             (0*0x0001u)    /* DMA channel 0 transfer select 0:  DMA_REQ (sw) */
732
#define DMA0TSEL_1             (1*0x0001u)    /* DMA channel 0 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
733
#define DMA0TSEL_2             (2*0x0001u)    /* DMA channel 0 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
734
#define DMA0TSEL_3             (3*0x0001u)    /* DMA channel 0 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
735
#define DMA0TSEL_4             (4*0x0001u)    /* DMA channel 0 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
736
#define DMA0TSEL_5             (5*0x0001u)    /* DMA channel 0 transfer select 5:  TimerB (TB0CCR0.IFG) */
737
#define DMA0TSEL_6             (6*0x0001u)    /* DMA channel 0 transfer select 6:  TimerB (TB0CCR2.IFG) */
738
#define DMA0TSEL_7             (7*0x0001u)    /* DMA channel 0 transfer select 7:  Reserved */
739
#define DMA0TSEL_8             (8*0x0001u)    /* DMA channel 0 transfer select 8:  Reserved */
740
#define DMA0TSEL_9             (9*0x0001u)    /* DMA channel 0 transfer select 9:  Reserved */
741
#define DMA0TSEL_10            (10*0x0001u)   /* DMA channel 0 transfer select 10: Reserved */
742
#define DMA0TSEL_11            (11*0x0001u)   /* DMA channel 0 transfer select 11: Reserved */
743
#define DMA0TSEL_12            (12*0x0001u)   /* DMA channel 0 transfer select 12: Reserved */
744
#define DMA0TSEL_13            (13*0x0001u)   /* DMA channel 0 transfer select 13: Reserved */
745
#define DMA0TSEL_14            (14*0x0001u)   /* DMA channel 0 transfer select 14: Reserved */
746
#define DMA0TSEL_15            (15*0x0001u)   /* DMA channel 0 transfer select 15: Reserved */
747
#define DMA0TSEL_16            (16*0x0001u)   /* DMA channel 0 transfer select 16: USCIA0 receive */
748
#define DMA0TSEL_17            (17*0x0001u)   /* DMA channel 0 transfer select 17: USCIA0 transmit */
749
#define DMA0TSEL_18            (18*0x0001u)   /* DMA channel 0 transfer select 18: USCIB0 receive */
750
#define DMA0TSEL_19            (19*0x0001u)   /* DMA channel 0 transfer select 19: USCIB0 transmit */
751
#define DMA0TSEL_20            (20*0x0001u)   /* DMA channel 0 transfer select 20: USCIA1 receive */
752
#define DMA0TSEL_21            (21*0x0001u)   /* DMA channel 0 transfer select 21: USCIA1 transmit */
753
#define DMA0TSEL_22            (22*0x0001u)   /* DMA channel 0 transfer select 22: USCIB1 receive */
754
#define DMA0TSEL_23            (23*0x0001u)   /* DMA channel 0 transfer select 23: USCIB1 transmit */
755
#define DMA0TSEL_24            (24*0x0001u)   /* DMA channel 0 transfer select 24: ADC12IFGx */
756
#define DMA0TSEL_25            (25*0x0001u)   /* DMA channel 0 transfer select 25: Reserved */
757
#define DMA0TSEL_26            (26*0x0001u)   /* DMA channel 0 transfer select 26: Reserved */
758
#define DMA0TSEL_27            (27*0x0001u)   /* DMA channel 0 transfer select 27: Reserved */
759
#define DMA0TSEL_28            (28*0x0001u)   /* DMA channel 0 transfer select 28: Reserved */
760
#define DMA0TSEL_29            (29*0x0001u)   /* DMA channel 0 transfer select 29: Multiplier ready */
761
#define DMA0TSEL_30            (30*0x0001u)   /* DMA channel 0 transfer select 30: previous DMA channel DMA2IFG */
762
#define DMA0TSEL_31            (31*0x0001u)   /* DMA channel 0 transfer select 31: ext. Trigger (DMAE0) */
763
 
764
#define DMA1TSEL_0             (0*0x0100u)    /* DMA channel 1 transfer select 0:  DMA_REQ (sw) */
765
#define DMA1TSEL_1             (1*0x0100u)    /* DMA channel 1 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
766
#define DMA1TSEL_2             (2*0x0100u)    /* DMA channel 1 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
767
#define DMA1TSEL_3             (3*0x0100u)    /* DMA channel 1 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
768
#define DMA1TSEL_4             (4*0x0100u)    /* DMA channel 1 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
769
#define DMA1TSEL_5             (5*0x0100u)    /* DMA channel 1 transfer select 5:  TimerB (TB0CCR0.IFG) */
770
#define DMA1TSEL_6             (6*0x0100u)    /* DMA channel 1 transfer select 6:  TimerB (TB0CCR2.IFG) */
771
#define DMA1TSEL_7             (7*0x0100u)    /* DMA channel 1 transfer select 7:  Reserved */
772
#define DMA1TSEL_8             (8*0x0100u)    /* DMA channel 1 transfer select 8:  Reserved */
773
#define DMA1TSEL_9             (9*0x0100u)    /* DMA channel 1 transfer select 9:  Reserved */
774
#define DMA1TSEL_10            (10*0x0100u)   /* DMA channel 1 transfer select 10: Reserved */
775
#define DMA1TSEL_11            (11*0x0100u)   /* DMA channel 1 transfer select 11: Reserved */
776
#define DMA1TSEL_12            (12*0x0100u)   /* DMA channel 1 transfer select 12: Reserved */
777
#define DMA1TSEL_13            (13*0x0100u)   /* DMA channel 1 transfer select 13: Reserved */
778
#define DMA1TSEL_14            (14*0x0100u)   /* DMA channel 1 transfer select 14: Reserved */
779
#define DMA1TSEL_15            (15*0x0100u)   /* DMA channel 1 transfer select 15: Reserved */
780
#define DMA1TSEL_16            (16*0x0100u)   /* DMA channel 1 transfer select 16: USCIA0 receive */
781
#define DMA1TSEL_17            (17*0x0100u)   /* DMA channel 1 transfer select 17: USCIA0 transmit */
782
#define DMA1TSEL_18            (18*0x0100u)   /* DMA channel 1 transfer select 18: USCIB0 receive */
783
#define DMA1TSEL_19            (19*0x0100u)   /* DMA channel 1 transfer select 19: USCIB0 transmit */
784
#define DMA1TSEL_20            (20*0x0100u)   /* DMA channel 1 transfer select 20: USCIA1 receive */
785
#define DMA1TSEL_21            (21*0x0100u)   /* DMA channel 1 transfer select 21: USCIA1 transmit */
786
#define DMA1TSEL_22            (22*0x0100u)   /* DMA channel 1 transfer select 22: USCIB1 receive */
787
#define DMA1TSEL_23            (23*0x0100u)   /* DMA channel 1 transfer select 23: USCIB1 transmit */
788
#define DMA1TSEL_24            (24*0x0100u)   /* DMA channel 1 transfer select 24: ADC12IFGx */
789
#define DMA1TSEL_25            (25*0x0100u)   /* DMA channel 1 transfer select 25: Reserved */
790
#define DMA1TSEL_26            (26*0x0100u)   /* DMA channel 1 transfer select 26: Reserved */
791
#define DMA1TSEL_27            (27*0x0100u)   /* DMA channel 1 transfer select 27: Reserved */
792
#define DMA1TSEL_28            (28*0x0100u)   /* DMA channel 1 transfer select 28: Reserved */
793
#define DMA1TSEL_29            (29*0x0100u)   /* DMA channel 1 transfer select 29: Multiplier ready */
794
#define DMA1TSEL_30            (30*0x0100u)   /* DMA channel 1 transfer select 30: previous DMA channel DMA0IFG */
795
#define DMA1TSEL_31            (31*0x0100u)   /* DMA channel 1 transfer select 31: ext. Trigger (DMAE0) */
796
 
797
#define DMA2TSEL_0             (0*0x0001u)    /* DMA channel 2 transfer select 0:  DMA_REQ (sw) */
798
#define DMA2TSEL_1             (1*0x0001u)    /* DMA channel 2 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
799
#define DMA2TSEL_2             (2*0x0001u)    /* DMA channel 2 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
800
#define DMA2TSEL_3             (3*0x0001u)    /* DMA channel 2 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
801
#define DMA2TSEL_4             (4*0x0001u)    /* DMA channel 2 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
802
#define DMA2TSEL_5             (5*0x0001u)    /* DMA channel 2 transfer select 5:  TimerB (TB0CCR0.IFG) */
803
#define DMA2TSEL_6             (6*0x0001u)    /* DMA channel 2 transfer select 6:  TimerB (TB0CCR2.IFG) */
804
#define DMA2TSEL_7             (7*0x0001u)    /* DMA channel 2 transfer select 7:  Reserved */
805
#define DMA2TSEL_8             (8*0x0001u)    /* DMA channel 2 transfer select 8:  Reserved */
806
#define DMA2TSEL_9             (9*0x0001u)    /* DMA channel 2 transfer select 9:  Reserved */
807
#define DMA2TSEL_10            (10*0x0001u)   /* DMA channel 2 transfer select 10: Reserved */
808
#define DMA2TSEL_11            (11*0x0001u)   /* DMA channel 2 transfer select 11: Reserved */
809
#define DMA2TSEL_12            (12*0x0001u)   /* DMA channel 2 transfer select 12: Reserved */
810
#define DMA2TSEL_13            (13*0x0001u)   /* DMA channel 2 transfer select 13: Reserved */
811
#define DMA2TSEL_14            (14*0x0001u)   /* DMA channel 2 transfer select 14: Reserved */
812
#define DMA2TSEL_15            (15*0x0001u)   /* DMA channel 2 transfer select 15: Reserved */
813
#define DMA2TSEL_16            (16*0x0001u)   /* DMA channel 2 transfer select 16: USCIA0 receive */
814
#define DMA2TSEL_17            (17*0x0001u)   /* DMA channel 2 transfer select 17: USCIA0 transmit */
815
#define DMA2TSEL_18            (18*0x0001u)   /* DMA channel 2 transfer select 18: USCIB0 receive */
816
#define DMA2TSEL_19            (19*0x0001u)   /* DMA channel 2 transfer select 19: USCIB0 transmit */
817
#define DMA2TSEL_20            (20*0x0001u)   /* DMA channel 2 transfer select 20: USCIA1 receive */
818
#define DMA2TSEL_21            (21*0x0001u)   /* DMA channel 2 transfer select 21: USCIA1 transmit */
819
#define DMA2TSEL_22            (22*0x0001u)   /* DMA channel 2 transfer select 22: USCIB1 receive */
820
#define DMA2TSEL_23            (23*0x0001u)   /* DMA channel 2 transfer select 23: USCIB1 transmit */
821
#define DMA2TSEL_24            (24*0x0001u)   /* DMA channel 2 transfer select 24: ADC12IFGx */
822
#define DMA2TSEL_25            (25*0x0001u)   /* DMA channel 2 transfer select 25: Reserved */
823
#define DMA2TSEL_26            (26*0x0001u)   /* DMA channel 2 transfer select 26: Reserved */
824
#define DMA2TSEL_27            (27*0x0001u)   /* DMA channel 2 transfer select 27: Reserved */
825
#define DMA2TSEL_28            (28*0x0001u)   /* DMA channel 2 transfer select 28: Reserved */
826
#define DMA2TSEL_29            (29*0x0001u)   /* DMA channel 2 transfer select 29: Multiplier ready */
827
#define DMA2TSEL_30            (30*0x0001u)   /* DMA channel 2 transfer select 30: previous DMA channel DMA1IFG */
828
#define DMA2TSEL_31            (31*0x0001u)   /* DMA channel 2 transfer select 31: ext. Trigger (DMAE0) */
829
 
830
#define DMA0TSEL__DMA_REQ      (0*0x0001u)    /* DMA channel 0 transfer select 0:  DMA_REQ (sw) */
831
#define DMA0TSEL__TA0CCR0      (1*0x0001u)    /* DMA channel 0 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
832
#define DMA0TSEL__TA0CCR2      (2*0x0001u)    /* DMA channel 0 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
833
#define DMA0TSEL__TA1CCR0      (3*0x0001u)    /* DMA channel 0 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
834
#define DMA0TSEL__TA1CCR2      (4*0x0001u)    /* DMA channel 0 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
835
#define DMA0TSEL__TB0CCR0      (5*0x0001u)    /* DMA channel 0 transfer select 5:  TimerB (TB0CCR0.IFG) */
836
#define DMA0TSEL__TB0CCR2      (6*0x0001u)    /* DMA channel 0 transfer select 6:  TimerB (TB0CCR2.IFG) */
837
#define DMA0TSEL__RES7         (7*0x0001u)    /* DMA channel 0 transfer select 7:  Reserved */
838
#define DMA0TSEL__RES8         (8*0x0001u)    /* DMA channel 0 transfer select 8:  Reserved */
839
#define DMA0TSEL__RES9         (9*0x0001u)    /* DMA channel 0 transfer select 9:  Reserved */
840
#define DMA0TSEL__RES10        (10*0x0001u)   /* DMA channel 0 transfer select 10: Reserved */
841
#define DMA0TSEL__RES11        (11*0x0001u)   /* DMA channel 0 transfer select 11: Reserved */
842
#define DMA0TSEL__RES12        (12*0x0001u)   /* DMA channel 0 transfer select 12: Reserved */
843
#define DMA0TSEL__RES13        (13*0x0001u)   /* DMA channel 0 transfer select 13: Reserved */
844
#define DMA0TSEL__RES14        (14*0x0001u)   /* DMA channel 0 transfer select 14: Reserved */
845
#define DMA0TSEL__RES15        (15*0x0001u)   /* DMA channel 0 transfer select 15: Reserved */
846
#define DMA0TSEL__USCIA0RX     (16*0x0001u)   /* DMA channel 0 transfer select 16: USCIA0 receive */
847
#define DMA0TSEL__USCIA0TX     (17*0x0001u)   /* DMA channel 0 transfer select 17: USCIA0 transmit */
848
#define DMA0TSEL__USCIB0RX     (18*0x0001u)   /* DMA channel 0 transfer select 18: USCIB0 receive */
849
#define DMA0TSEL__USCIB0TX     (19*0x0001u)   /* DMA channel 0 transfer select 19: USCIB0 transmit */
850
#define DMA0TSEL__USCIA1RX     (20*0x0001u)   /* DMA channel 0 transfer select 20: USCIA1 receive */
851
#define DMA0TSEL__USCIA1TX     (21*0x0001u)   /* DMA channel 0 transfer select 21: USCIA1 transmit */
852
#define DMA0TSEL__USCIB1RX     (22*0x0001u)   /* DMA channel 0 transfer select 22: USCIB1 receive */
853
#define DMA0TSEL__USCIB1TX     (23*0x0001u)   /* DMA channel 0 transfer select 23: USCIB1 transmit */
854
#define DMA0TSEL__ADC12IFG     (24*0x0001u)   /* DMA channel 0 transfer select 24: ADC12IFGx */
855
#define DMA0TSEL__RES25        (25*0x0001u)   /* DMA channel 0 transfer select 25: Reserved */
856
#define DMA0TSEL__RES26        (26*0x0001u)   /* DMA channel 0 transfer select 26: Reserved */
857
#define DMA0TSEL__RES27        (27*0x0001u)   /* DMA channel 0 transfer select 27: Reserved */
858
#define DMA0TSEL__RES28        (28*0x0001u)   /* DMA channel 0 transfer select 28: Reserved */
859
#define DMA0TSEL__MPY          (29*0x0001u)   /* DMA channel 0 transfer select 29: Multiplier ready */
860
#define DMA0TSEL__DMA2IFG      (30*0x0001u)   /* DMA channel 0 transfer select 30: previous DMA channel DMA2IFG */
861
#define DMA0TSEL__DMAE0        (31*0x0001u)   /* DMA channel 0 transfer select 31: ext. Trigger (DMAE0) */
862
 
863
#define DMA1TSEL__DMA_REQ      (0*0x0100u)    /* DMA channel 1 transfer select 0:  DMA_REQ (sw) */
864
#define DMA1TSEL__TA0CCR0      (1*0x0100u)    /* DMA channel 1 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
865
#define DMA1TSEL__TA0CCR2      (2*0x0100u)    /* DMA channel 1 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
866
#define DMA1TSEL__TA1CCR0      (3*0x0100u)    /* DMA channel 1 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
867
#define DMA1TSEL__TA1CCR2      (4*0x0100u)    /* DMA channel 1 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
868
#define DMA1TSEL__TB0CCR0      (5*0x0100u)    /* DMA channel 1 transfer select 5:  TimerB (TB0CCR0.IFG) */
869
#define DMA1TSEL__TB0CCR2      (6*0x0100u)    /* DMA channel 1 transfer select 6:  TimerB (TB0CCR2.IFG) */
870
#define DMA1TSEL__RES7         (7*0x0100u)    /* DMA channel 1 transfer select 7:  Reserved */
871
#define DMA1TSEL__RES8         (8*0x0100u)    /* DMA channel 1 transfer select 8:  Reserved */
872
#define DMA1TSEL__RES9         (9*0x0100u)    /* DMA channel 1 transfer select 9:  Reserved */
873
#define DMA1TSEL__RES10        (10*0x0100u)   /* DMA channel 1 transfer select 10: Reserved */
874
#define DMA1TSEL__RES11        (11*0x0100u)   /* DMA channel 1 transfer select 11: Reserved */
875
#define DMA1TSEL__RES12        (12*0x0100u)   /* DMA channel 1 transfer select 12: Reserved */
876
#define DMA1TSEL__RES13        (13*0x0100u)   /* DMA channel 1 transfer select 13: Reserved */
877
#define DMA1TSEL__RES14        (14*0x0100u)   /* DMA channel 1 transfer select 14: Reserved */
878
#define DMA1TSEL__RES15        (15*0x0100u)   /* DMA channel 1 transfer select 15: Reserved */
879
#define DMA1TSEL__USCIA0RX     (16*0x0100u)   /* DMA channel 1 transfer select 16: USCIA0 receive */
880
#define DMA1TSEL__USCIA0TX     (17*0x0100u)   /* DMA channel 1 transfer select 17: USCIA0 transmit */
881
#define DMA1TSEL__USCIB0RX     (18*0x0100u)   /* DMA channel 1 transfer select 18: USCIB0 receive */
882
#define DMA1TSEL__USCIB0TX     (19*0x0100u)   /* DMA channel 1 transfer select 19: USCIB0 transmit */
883
#define DMA1TSEL__USCIA1RX     (20*0x0100u)   /* DMA channel 1 transfer select 20: USCIA1 receive */
884
#define DMA1TSEL__USCIA1TX     (21*0x0100u)   /* DMA channel 1 transfer select 21: USCIA1 transmit */
885
#define DMA1TSEL__USCIB1RX     (22*0x0100u)   /* DMA channel 1 transfer select 22: USCIB1 receive */
886
#define DMA1TSEL__USCIB1TX     (23*0x0100u)   /* DMA channel 1 transfer select 23: USCIB1 transmit */
887
#define DMA1TSEL__ADC12IFG     (24*0x0100u)   /* DMA channel 1 transfer select 24: ADC12IFGx */
888
#define DMA1TSEL__RES25        (25*0x0100u)   /* DMA channel 1 transfer select 25: Reserved */
889
#define DMA1TSEL__RES26        (26*0x0100u)   /* DMA channel 1 transfer select 26: Reserved */
890
#define DMA1TSEL__RES27        (27*0x0100u)   /* DMA channel 1 transfer select 27: Reserved */
891
#define DMA1TSEL__RES28        (28*0x0100u)   /* DMA channel 1 transfer select 28: Reserved */
892
#define DMA1TSEL__MPY          (29*0x0100u)   /* DMA channel 1 transfer select 29: Multiplier ready */
893
#define DMA1TSEL__DMA0IFG      (30*0x0100u)   /* DMA channel 1 transfer select 30: previous DMA channel DMA0IFG */
894
#define DMA1TSEL__DMAE0        (31*0x0100u)   /* DMA channel 1 transfer select 31: ext. Trigger (DMAE0) */
895
 
896
#define DMA2TSEL__DMA_REQ      (0*0x0001u)    /* DMA channel 2 transfer select 0:  DMA_REQ (sw) */
897
#define DMA2TSEL__TA0CCR0      (1*0x0001u)    /* DMA channel 2 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
898
#define DMA2TSEL__TA0CCR2      (2*0x0001u)    /* DMA channel 2 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
899
#define DMA2TSEL__TA1CCR0      (3*0x0001u)    /* DMA channel 2 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
900
#define DMA2TSEL__TA1CCR2      (4*0x0001u)    /* DMA channel 2 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
901
#define DMA2TSEL__TB0CCR0      (5*0x0001u)    /* DMA channel 2 transfer select 5:  TimerB (TB0CCR0.IFG) */
902
#define DMA2TSEL__TB0CCR2      (6*0x0001u)    /* DMA channel 2 transfer select 6:  TimerB (TB0CCR2.IFG) */
903
#define DMA2TSEL__RES7         (7*0x0001u)    /* DMA channel 2 transfer select 7:  Reserved */
904
#define DMA2TSEL__RES8         (8*0x0001u)    /* DMA channel 2 transfer select 8:  Reserved */
905
#define DMA2TSEL__RES9         (9*0x0001u)    /* DMA channel 2 transfer select 9:  Reserved */
906
#define DMA2TSEL__RES10        (10*0x0001u)   /* DMA channel 2 transfer select 10: Reserved */
907
#define DMA2TSEL__RES11        (11*0x0001u)   /* DMA channel 2 transfer select 11: Reserved */
908
#define DMA2TSEL__RES12        (12*0x0001u)   /* DMA channel 2 transfer select 12: Reserved */
909
#define DMA2TSEL__RES13        (13*0x0001u)   /* DMA channel 2 transfer select 13: Reserved */
910
#define DMA2TSEL__RES14        (14*0x0001u)   /* DMA channel 2 transfer select 14: Reserved */
911
#define DMA2TSEL__RES15        (15*0x0001u)   /* DMA channel 2 transfer select 15: Reserved */
912
#define DMA2TSEL__USCIA0RX     (16*0x0001u)   /* DMA channel 2 transfer select 16: USCIA0 receive */
913
#define DMA2TSEL__USCIA0TX     (17*0x0001u)   /* DMA channel 2 transfer select 17: USCIA0 transmit */
914
#define DMA2TSEL__USCIB0RX     (18*0x0001u)   /* DMA channel 2 transfer select 18: USCIB0 receive */
915
#define DMA2TSEL__USCIB0TX     (19*0x0001u)   /* DMA channel 2 transfer select 19: USCIB0 transmit */
916
#define DMA2TSEL__USCIA1RX     (20*0x0001u)   /* DMA channel 2 transfer select 20: USCIA1 receive */
917
#define DMA2TSEL__USCIA1TX     (21*0x0001u)   /* DMA channel 2 transfer select 21: USCIA1 transmit */
918
#define DMA2TSEL__USCIB1RX     (22*0x0001u)   /* DMA channel 2 transfer select 22: USCIB1 receive */
919
#define DMA2TSEL__USCIB1TX     (23*0x0001u)   /* DMA channel 2 transfer select 23: USCIB1 transmit */
920
#define DMA2TSEL__ADC12IFG     (24*0x0001u)   /* DMA channel 2 transfer select 24: ADC12IFGx */
921
#define DMA2TSEL__RES25        (25*0x0001u)   /* DMA channel 2 transfer select 25: Reserved */
922
#define DMA2TSEL__RES26        (26*0x0001u)   /* DMA channel 2 transfer select 26: Reserved */
923
#define DMA2TSEL__RES27        (27*0x0001u)   /* DMA channel 2 transfer select 27: Reserved */
924
#define DMA2TSEL__RES28        (28*0x0001u)   /* DMA channel 2 transfer select 28: Reserved */
925
#define DMA2TSEL__MPY          (29*0x0001u)   /* DMA channel 2 transfer select 29: Multiplier ready */
926
#define DMA2TSEL__DMA1IFG      (30*0x0001u)   /* DMA channel 2 transfer select 30: previous DMA channel DMA1IFG */
927
#define DMA2TSEL__DMAE0        (31*0x0001u)   /* DMA channel 2 transfer select 31: ext. Trigger (DMAE0) */
928
 
929
/*************************************************************
930
* Flash Memory
931
*************************************************************/
932
#define __MSP430_HAS_FLASH__                  /* Definition to show that Module is available */
933
#define __MSP430_BASEADDRESS_FLASH__ 0x0140
934
 
935
SFR_16BIT(FCTL1);                             /* FLASH Control 1 */
936
SFR_8BIT(FCTL1_L);                            /* FLASH Control 1 */
937
SFR_8BIT(FCTL1_H);                            /* FLASH Control 1 */
938
//sfrbw    FCTL2               (0x0142)  /* FLASH Control 2 */
939
SFR_16BIT(FCTL3);                             /* FLASH Control 3 */
940
SFR_8BIT(FCTL3_L);                            /* FLASH Control 3 */
941
SFR_8BIT(FCTL3_H);                            /* FLASH Control 3 */
942
SFR_16BIT(FCTL4);                             /* FLASH Control 4 */
943
SFR_8BIT(FCTL4_L);                            /* FLASH Control 4 */
944
SFR_8BIT(FCTL4_H);                            /* FLASH Control 4 */
945
 
946
#define FRPW                   (0x9600)       /* Flash password returned by read */
947
#define FWPW                   (0xA500)       /* Flash password for write */
948
#define FXPW                   (0x3300)       /* for use with XOR instruction */
949
#define FRKEY                  (0x9600)       /* (legacy definition) Flash key returned by read */
950
#define FWKEY                  (0xA500)       /* (legacy definition) Flash key for write */
951
#define FXKEY                  (0x3300)       /* (legacy definition) for use with XOR instruction */
952
 
953
/* FCTL1 Control Bits */
954
//#define RESERVED            (0x0001)  /* Reserved */
955
#define ERASE                  (0x0002)       /* Enable bit for Flash segment erase */
956
#define MERAS                  (0x0004)       /* Enable bit for Flash mass erase */
957
//#define RESERVED            (0x0008)  /* Reserved */
958
//#define RESERVED            (0x0010)  /* Reserved */
959
#define SWRT                   (0x0020)       /* Smart Write enable */
960
#define WRT                    (0x0040)       /* Enable bit for Flash write */
961
#define BLKWRT                 (0x0080)       /* Enable bit for Flash segment write */
962
 
963
/* FCTL1 Control Bits */
964
//#define RESERVED            (0x0001)  /* Reserved */
965
#define ERASE_L                (0x0002)       /* Enable bit for Flash segment erase */
966
#define MERAS_L                (0x0004)       /* Enable bit for Flash mass erase */
967
//#define RESERVED            (0x0008)  /* Reserved */
968
//#define RESERVED            (0x0010)  /* Reserved */
969
#define SWRT_L                 (0x0020)       /* Smart Write enable */
970
#define WRT_L                  (0x0040)       /* Enable bit for Flash write */
971
#define BLKWRT_L               (0x0080)       /* Enable bit for Flash segment write */
972
 
973
/* FCTL1 Control Bits */
974
//#define RESERVED            (0x0001)  /* Reserved */
975
//#define RESERVED            (0x0008)  /* Reserved */
976
//#define RESERVED            (0x0010)  /* Reserved */
977
 
978
/* FCTL3 Control Bits */
979
#define BUSY                   (0x0001)       /* Flash busy: 1 */
980
#define KEYV                   (0x0002)       /* Flash Key violation flag */
981
#define ACCVIFG                (0x0004)       /* Flash Access violation flag */
982
#define WAIT                   (0x0008)       /* Wait flag for segment write */
983
#define LOCK                   (0x0010)       /* Lock bit: 1 - Flash is locked (read only) */
984
#define EMEX                   (0x0020)       /* Flash Emergency Exit */
985
#define LOCKA                  (0x0040)       /* Segment A Lock bit: read = 1 - Segment is locked (read only) */
986
//#define RESERVED            (0x0080)  /* Reserved */
987
 
988
/* FCTL3 Control Bits */
989
#define BUSY_L                 (0x0001)       /* Flash busy: 1 */
990
#define KEYV_L                 (0x0002)       /* Flash Key violation flag */
991
#define ACCVIFG_L              (0x0004)       /* Flash Access violation flag */
992
#define WAIT_L                 (0x0008)       /* Wait flag for segment write */
993
#define LOCK_L                 (0x0010)       /* Lock bit: 1 - Flash is locked (read only) */
994
#define EMEX_L                 (0x0020)       /* Flash Emergency Exit */
995
#define LOCKA_L                (0x0040)       /* Segment A Lock bit: read = 1 - Segment is locked (read only) */
996
//#define RESERVED            (0x0080)  /* Reserved */
997
 
998
/* FCTL3 Control Bits */
999
//#define RESERVED            (0x0080)  /* Reserved */
1000
 
1001
/* FCTL4 Control Bits */
1002
#define VPE                    (0x0001)       /* Voltage Changed during Program Error Flag */
1003
#define MGR0                   (0x0010)       /* Marginal read 0 mode. */
1004
#define MGR1                   (0x0020)       /* Marginal read 1 mode. */
1005
#define LOCKINFO               (0x0080)       /* Lock INFO Memory bit: read = 1 - Segment is locked (read only) */
1006
 
1007
/* FCTL4 Control Bits */
1008
#define VPE_L                  (0x0001)       /* Voltage Changed during Program Error Flag */
1009
#define MGR0_L                 (0x0010)       /* Marginal read 0 mode. */
1010
#define MGR1_L                 (0x0020)       /* Marginal read 1 mode. */
1011
#define LOCKINFO_L             (0x0080)       /* Lock INFO Memory bit: read = 1 - Segment is locked (read only) */
1012
 
1013
/* FCTL4 Control Bits */
1014
 
1015
/************************************************************
1016
* HARDWARE MULTIPLIER 32Bit
1017
************************************************************/
1018
#define __MSP430_HAS_MPY32__                  /* Definition to show that Module is available */
1019
#define __MSP430_BASEADDRESS_MPY32__ 0x04C0
1020
 
1021
SFR_16BIT(MPY);                               /* Multiply Unsigned/Operand 1 */
1022
SFR_8BIT(MPY_L);                              /* Multiply Unsigned/Operand 1 */
1023
SFR_8BIT(MPY_H);                              /* Multiply Unsigned/Operand 1 */
1024
SFR_16BIT(MPYS);                              /* Multiply Signed/Operand 1 */
1025
SFR_8BIT(MPYS_L);                             /* Multiply Signed/Operand 1 */
1026
SFR_8BIT(MPYS_H);                             /* Multiply Signed/Operand 1 */
1027
SFR_16BIT(MAC);                               /* Multiply Unsigned and Accumulate/Operand 1 */
1028
SFR_8BIT(MAC_L);                              /* Multiply Unsigned and Accumulate/Operand 1 */
1029
SFR_8BIT(MAC_H);                              /* Multiply Unsigned and Accumulate/Operand 1 */
1030
SFR_16BIT(MACS);                              /* Multiply Signed and Accumulate/Operand 1 */
1031
SFR_8BIT(MACS_L);                             /* Multiply Signed and Accumulate/Operand 1 */
1032
SFR_8BIT(MACS_H);                             /* Multiply Signed and Accumulate/Operand 1 */
1033
SFR_16BIT(OP2);                               /* Operand 2 */
1034
SFR_8BIT(OP2_L);                              /* Operand 2 */
1035
SFR_8BIT(OP2_H);                              /* Operand 2 */
1036
SFR_16BIT(RESLO);                             /* Result Low Word */
1037
SFR_8BIT(RESLO_L);                            /* Result Low Word */
1038
SFR_8BIT(RESLO_H);                            /* Result Low Word */
1039
SFR_16BIT(RESHI);                             /* Result High Word */
1040
SFR_8BIT(RESHI_L);                            /* Result High Word */
1041
SFR_8BIT(RESHI_H);                            /* Result High Word */
1042
SFR_16BIT(SUMEXT);                            /* Sum Extend */
1043
SFR_8BIT(SUMEXT_L);                           /* Sum Extend */
1044
SFR_8BIT(SUMEXT_H);                           /* Sum Extend */
1045
 
1046
SFR_16BIT(MPY32L);                            /* 32-bit operand 1 - multiply - low word */
1047
SFR_8BIT(MPY32L_L);                           /* 32-bit operand 1 - multiply - low word */
1048
SFR_8BIT(MPY32L_H);                           /* 32-bit operand 1 - multiply - low word */
1049
SFR_16BIT(MPY32H);                            /* 32-bit operand 1 - multiply - high word */
1050
SFR_8BIT(MPY32H_L);                           /* 32-bit operand 1 - multiply - high word */
1051
SFR_8BIT(MPY32H_H);                           /* 32-bit operand 1 - multiply - high word */
1052
SFR_16BIT(MPYS32L);                           /* 32-bit operand 1 - signed multiply - low word */
1053
SFR_8BIT(MPYS32L_L);                          /* 32-bit operand 1 - signed multiply - low word */
1054
SFR_8BIT(MPYS32L_H);                          /* 32-bit operand 1 - signed multiply - low word */
1055
SFR_16BIT(MPYS32H);                           /* 32-bit operand 1 - signed multiply - high word */
1056
SFR_8BIT(MPYS32H_L);                          /* 32-bit operand 1 - signed multiply - high word */
1057
SFR_8BIT(MPYS32H_H);                          /* 32-bit operand 1 - signed multiply - high word */
1058
SFR_16BIT(MAC32L);                            /* 32-bit operand 1 - multiply accumulate - low word */
1059
SFR_8BIT(MAC32L_L);                           /* 32-bit operand 1 - multiply accumulate - low word */
1060
SFR_8BIT(MAC32L_H);                           /* 32-bit operand 1 - multiply accumulate - low word */
1061
SFR_16BIT(MAC32H);                            /* 32-bit operand 1 - multiply accumulate - high word */
1062
SFR_8BIT(MAC32H_L);                           /* 32-bit operand 1 - multiply accumulate - high word */
1063
SFR_8BIT(MAC32H_H);                           /* 32-bit operand 1 - multiply accumulate - high word */
1064
SFR_16BIT(MACS32L);                           /* 32-bit operand 1 - signed multiply accumulate - low word */
1065
SFR_8BIT(MACS32L_L);                          /* 32-bit operand 1 - signed multiply accumulate - low word */
1066
SFR_8BIT(MACS32L_H);                          /* 32-bit operand 1 - signed multiply accumulate - low word */
1067
SFR_16BIT(MACS32H);                           /* 32-bit operand 1 - signed multiply accumulate - high word */
1068
SFR_8BIT(MACS32H_L);                          /* 32-bit operand 1 - signed multiply accumulate - high word */
1069
SFR_8BIT(MACS32H_H);                          /* 32-bit operand 1 - signed multiply accumulate - high word */
1070
SFR_16BIT(OP2L);                              /* 32-bit operand 2 - low word */
1071
SFR_8BIT(OP2L_L);                             /* 32-bit operand 2 - low word */
1072
SFR_8BIT(OP2L_H);                             /* 32-bit operand 2 - low word */
1073
SFR_16BIT(OP2H);                              /* 32-bit operand 2 - high word */
1074
SFR_8BIT(OP2H_L);                             /* 32-bit operand 2 - high word */
1075
SFR_8BIT(OP2H_H);                             /* 32-bit operand 2 - high word */
1076
SFR_16BIT(RES0);                              /* 32x32-bit result 0 - least significant word */
1077
SFR_8BIT(RES0_L);                             /* 32x32-bit result 0 - least significant word */
1078
SFR_8BIT(RES0_H);                             /* 32x32-bit result 0 - least significant word */
1079
SFR_16BIT(RES1);                              /* 32x32-bit result 1 */
1080
SFR_8BIT(RES1_L);                             /* 32x32-bit result 1 */
1081
SFR_8BIT(RES1_H);                             /* 32x32-bit result 1 */
1082
SFR_16BIT(RES2);                              /* 32x32-bit result 2 */
1083
SFR_8BIT(RES2_L);                             /* 32x32-bit result 2 */
1084
SFR_8BIT(RES2_H);                             /* 32x32-bit result 2 */
1085
SFR_16BIT(RES3);                              /* 32x32-bit result 3 - most significant word */
1086
SFR_8BIT(RES3_L);                             /* 32x32-bit result 3 - most significant word */
1087
SFR_8BIT(RES3_H);                             /* 32x32-bit result 3 - most significant word */
1088
SFR_16BIT(MPY32CTL0);                         /* MPY32 Control Register 0 */
1089
SFR_8BIT(MPY32CTL0_L);                        /* MPY32 Control Register 0 */
1090
SFR_8BIT(MPY32CTL0_H);                        /* MPY32 Control Register 0 */
1091
 
1092
#define MPY_B                  MPY_L          /* Multiply Unsigned/Operand 1 (Byte Access) */
1093
#define MPYS_B                 MPYS_L         /* Multiply Signed/Operand 1 (Byte Access) */
1094
#define MAC_B                  MAC_L          /* Multiply Unsigned and Accumulate/Operand 1 (Byte Access) */
1095
#define MACS_B                 MACS_L         /* Multiply Signed and Accumulate/Operand 1 (Byte Access) */
1096
#define OP2_B                  OP2_L          /* Operand 2 (Byte Access) */
1097
#define MPY32L_B               MPY32L_L       /* 32-bit operand 1 - multiply - low word (Byte Access) */
1098
#define MPY32H_B               MPY32H_L       /* 32-bit operand 1 - multiply - high word (Byte Access) */
1099
#define MPYS32L_B              MPYS32L_L      /* 32-bit operand 1 - signed multiply - low word (Byte Access) */
1100
#define MPYS32H_B              MPYS32H_L      /* 32-bit operand 1 - signed multiply - high word (Byte Access) */
1101
#define MAC32L_B               MAC32L_L       /* 32-bit operand 1 - multiply accumulate - low word (Byte Access) */
1102
#define MAC32H_B               MAC32H_L       /* 32-bit operand 1 - multiply accumulate - high word (Byte Access) */
1103
#define MACS32L_B              MACS32L_L      /* 32-bit operand 1 - signed multiply accumulate - low word (Byte Access) */
1104
#define MACS32H_B              MACS32H_L      /* 32-bit operand 1 - signed multiply accumulate - high word (Byte Access) */
1105
#define OP2L_B                 OP2L_L         /* 32-bit operand 2 - low word (Byte Access) */
1106
#define OP2H_B                 OP2H_L         /* 32-bit operand 2 - high word (Byte Access) */
1107
 
1108
/* MPY32CTL0 Control Bits */
1109
#define MPYC                   (0x0001)       /* Carry of the multiplier */
1110
//#define RESERVED            (0x0002)  /* Reserved */
1111
#define MPYFRAC                (0x0004)       /* Fractional mode */
1112
#define MPYSAT                 (0x0008)       /* Saturation mode */
1113
#define MPYM0                  (0x0010)       /* Multiplier mode Bit:0 */
1114
#define MPYM1                  (0x0020)       /* Multiplier mode Bit:1 */
1115
#define OP1_32                 (0x0040)       /* Bit-width of operand 1 0:16Bit / 1:32Bit */
1116
#define OP2_32                 (0x0080)       /* Bit-width of operand 2 0:16Bit / 1:32Bit */
1117
#define MPYDLYWRTEN            (0x0100)       /* Delayed write enable */
1118
#define MPYDLY32               (0x0200)       /* Delayed write mode */
1119
 
1120
/* MPY32CTL0 Control Bits */
1121
#define MPYC_L                 (0x0001)       /* Carry of the multiplier */
1122
//#define RESERVED            (0x0002)  /* Reserved */
1123
#define MPYFRAC_L              (0x0004)       /* Fractional mode */
1124
#define MPYSAT_L               (0x0008)       /* Saturation mode */
1125
#define MPYM0_L                (0x0010)       /* Multiplier mode Bit:0 */
1126
#define MPYM1_L                (0x0020)       /* Multiplier mode Bit:1 */
1127
#define OP1_32_L               (0x0040)       /* Bit-width of operand 1 0:16Bit / 1:32Bit */
1128
#define OP2_32_L               (0x0080)       /* Bit-width of operand 2 0:16Bit / 1:32Bit */
1129
 
1130
/* MPY32CTL0 Control Bits */
1131
//#define RESERVED            (0x0002)  /* Reserved */
1132
#define MPYDLYWRTEN_H          (0x0001)       /* Delayed write enable */
1133
#define MPYDLY32_H             (0x0002)       /* Delayed write mode */
1134
 
1135
#define MPYM_0                 (0x0000)       /* Multiplier mode: MPY */
1136
#define MPYM_1                 (0x0010)       /* Multiplier mode: MPYS */
1137
#define MPYM_2                 (0x0020)       /* Multiplier mode: MAC */
1138
#define MPYM_3                 (0x0030)       /* Multiplier mode: MACS */
1139
#define MPYM__MPY              (0x0000)       /* Multiplier mode: MPY */
1140
#define MPYM__MPYS             (0x0010)       /* Multiplier mode: MPYS */
1141
#define MPYM__MAC              (0x0020)       /* Multiplier mode: MAC */
1142
#define MPYM__MACS             (0x0030)       /* Multiplier mode: MACS */
1143
 
1144
/************************************************************
1145
* DIGITAL I/O Port1/2 Pull up / Pull down Resistors
1146
************************************************************/
1147
#define __MSP430_HAS_PORT1_R__                /* Definition to show that Module is available */
1148
#define __MSP430_BASEADDRESS_PORT1_R__ 0x0200
1149
#define __MSP430_HAS_PORT2_R__                /* Definition to show that Module is available */
1150
#define __MSP430_BASEADDRESS_PORT2_R__ 0x0200
1151
#define __MSP430_HAS_PORTA_R__                /* Definition to show that Module is available */
1152
#define __MSP430_BASEADDRESS_PORTA_R__ 0x0200
1153
 
1154
SFR_16BIT(PAIN);                              /* Port A Input */
1155
SFR_8BIT(PAIN_L);                             /* Port A Input */
1156
SFR_8BIT(PAIN_H);                             /* Port A Input */
1157
SFR_16BIT(PAOUT);                             /* Port A Output */
1158
SFR_8BIT(PAOUT_L);                            /* Port A Output */
1159
SFR_8BIT(PAOUT_H);                            /* Port A Output */
1160
SFR_16BIT(PADIR);                             /* Port A Direction */
1161
SFR_8BIT(PADIR_L);                            /* Port A Direction */
1162
SFR_8BIT(PADIR_H);                            /* Port A Direction */
1163
SFR_16BIT(PAREN);                             /* Port A Resistor Enable */
1164
SFR_8BIT(PAREN_L);                            /* Port A Resistor Enable */
1165
SFR_8BIT(PAREN_H);                            /* Port A Resistor Enable */
1166
SFR_16BIT(PADS);                              /* Port A Resistor Drive Strenght */
1167
SFR_8BIT(PADS_L);                             /* Port A Resistor Drive Strenght */
1168
SFR_8BIT(PADS_H);                             /* Port A Resistor Drive Strenght */
1169
SFR_16BIT(PASEL);                             /* Port A Selection */
1170
SFR_8BIT(PASEL_L);                            /* Port A Selection */
1171
SFR_8BIT(PASEL_H);                            /* Port A Selection */
1172
SFR_16BIT(PAIES);                             /* Port A Interrupt Edge Select */
1173
SFR_8BIT(PAIES_L);                            /* Port A Interrupt Edge Select */
1174
SFR_8BIT(PAIES_H);                            /* Port A Interrupt Edge Select */
1175
SFR_16BIT(PAIE);                              /* Port A Interrupt Enable */
1176
SFR_8BIT(PAIE_L);                             /* Port A Interrupt Enable */
1177
SFR_8BIT(PAIE_H);                             /* Port A Interrupt Enable */
1178
SFR_16BIT(PAIFG);                             /* Port A Interrupt Flag */
1179
SFR_8BIT(PAIFG_L);                            /* Port A Interrupt Flag */
1180
SFR_8BIT(PAIFG_H);                            /* Port A Interrupt Flag */
1181
 
1182
 
1183
SFR_16BIT(P1IV);                              /* Port 1 Interrupt Vector Word */
1184
SFR_16BIT(P2IV);                              /* Port 2 Interrupt Vector Word */
1185
#define P1IN                   (PAIN_L)       /* Port 1 Input */
1186
#define P1OUT                  (PAOUT_L)      /* Port 1 Output */
1187
#define P1DIR                  (PADIR_L)      /* Port 1 Direction */
1188
#define P1REN                  (PAREN_L)      /* Port 1 Resistor Enable */
1189
#define P1DS                   (PADS_L)       /* Port 1 Resistor Drive Strenght */
1190
#define P1SEL                  (PASEL_L)      /* Port 1 Selection */
1191
#define P1IES                  (PAIES_L)      /* Port 1 Interrupt Edge Select */
1192
#define P1IE                   (PAIE_L)       /* Port 1 Interrupt Enable */
1193
#define P1IFG                  (PAIFG_L)      /* Port 1 Interrupt Flag */
1194
 
1195
//Definitions for P1IV
1196
#define P1IV_NONE              (0x0000)       /* No Interrupt pending */
1197
#define P1IV_P1IFG0            (0x0002)       /* P1IV P1IFG.0 */
1198
#define P1IV_P1IFG1            (0x0004)       /* P1IV P1IFG.1 */
1199
#define P1IV_P1IFG2            (0x0006)       /* P1IV P1IFG.2 */
1200
#define P1IV_P1IFG3            (0x0008)       /* P1IV P1IFG.3 */
1201
#define P1IV_P1IFG4            (0x000A)       /* P1IV P1IFG.4 */
1202
#define P1IV_P1IFG5            (0x000C)       /* P1IV P1IFG.5 */
1203
#define P1IV_P1IFG6            (0x000E)       /* P1IV P1IFG.6 */
1204
#define P1IV_P1IFG7            (0x0010)       /* P1IV P1IFG.7 */
1205
 
1206
#define P2IN                   (PAIN_H)       /* Port 2 Input */
1207
#define P2OUT                  (PAOUT_H)      /* Port 2 Output */
1208
#define P2DIR                  (PADIR_H)      /* Port 2 Direction */
1209
#define P2REN                  (PAREN_H)      /* Port 2 Resistor Enable */
1210
#define P2DS                   (PADS_H)       /* Port 2 Resistor Drive Strenght */
1211
#define P2SEL                  (PASEL_H)      /* Port 2 Selection */
1212
#define P2IES                  (PAIES_H)      /* Port 2 Interrupt Edge Select */
1213
#define P2IE                   (PAIE_H)       /* Port 2 Interrupt Enable */
1214
#define P2IFG                  (PAIFG_H)      /* Port 2 Interrupt Flag */
1215
 
1216
//Definitions for P2IV
1217
#define P2IV_NONE              (0x0000)       /* No Interrupt pending */
1218
#define P2IV_P2IFG0            (0x0002)       /* P2IV P2IFG.0 */
1219
#define P2IV_P2IFG1            (0x0004)       /* P2IV P2IFG.1 */
1220
#define P2IV_P2IFG2            (0x0006)       /* P2IV P2IFG.2 */
1221
#define P2IV_P2IFG3            (0x0008)       /* P2IV P2IFG.3 */
1222
#define P2IV_P2IFG4            (0x000A)       /* P2IV P2IFG.4 */
1223
#define P2IV_P2IFG5            (0x000C)       /* P2IV P2IFG.5 */
1224
#define P2IV_P2IFG6            (0x000E)       /* P2IV P2IFG.6 */
1225
#define P2IV_P2IFG7            (0x0010)       /* P2IV P2IFG.7 */
1226
 
1227
 
1228
/************************************************************
1229
* DIGITAL I/O Port3/4 Pull up / Pull down Resistors
1230
************************************************************/
1231
#define __MSP430_HAS_PORT3_R__                /* Definition to show that Module is available */
1232
#define __MSP430_BASEADDRESS_PORT3_R__ 0x0220
1233
#define __MSP430_HAS_PORT4_R__                /* Definition to show that Module is available */
1234
#define __MSP430_BASEADDRESS_PORT4_R__ 0x0220
1235
#define __MSP430_HAS_PORTB_R__                /* Definition to show that Module is available */
1236
#define __MSP430_BASEADDRESS_PORTB_R__ 0x0220
1237
 
1238
SFR_16BIT(PBIN);                              /* Port B Input */
1239
SFR_8BIT(PBIN_L);                             /* Port B Input */
1240
SFR_8BIT(PBIN_H);                             /* Port B Input */
1241
SFR_16BIT(PBOUT);                             /* Port B Output */
1242
SFR_8BIT(PBOUT_L);                            /* Port B Output */
1243
SFR_8BIT(PBOUT_H);                            /* Port B Output */
1244
SFR_16BIT(PBDIR);                             /* Port B Direction */
1245
SFR_8BIT(PBDIR_L);                            /* Port B Direction */
1246
SFR_8BIT(PBDIR_H);                            /* Port B Direction */
1247
SFR_16BIT(PBREN);                             /* Port B Resistor Enable */
1248
SFR_8BIT(PBREN_L);                            /* Port B Resistor Enable */
1249
SFR_8BIT(PBREN_H);                            /* Port B Resistor Enable */
1250
SFR_16BIT(PBDS);                              /* Port B Resistor Drive Strenght */
1251
SFR_8BIT(PBDS_L);                             /* Port B Resistor Drive Strenght */
1252
SFR_8BIT(PBDS_H);                             /* Port B Resistor Drive Strenght */
1253
SFR_16BIT(PBSEL);                             /* Port B Selection */
1254
SFR_8BIT(PBSEL_L);                            /* Port B Selection */
1255
SFR_8BIT(PBSEL_H);                            /* Port B Selection */
1256
 
1257
 
1258
#define P3IN                   (PBIN_L)       /* Port 3 Input */
1259
#define P3OUT                  (PBOUT_L)      /* Port 3 Output */
1260
#define P3DIR                  (PBDIR_L)      /* Port 3 Direction */
1261
#define P3REN                  (PBREN_L)      /* Port 3 Resistor Enable */
1262
#define P3DS                   (PBDS_L)       /* Port 3 Resistor Drive Strenght */
1263
#define P3SEL                  (PBSEL_L)      /* Port 3 Selection */
1264
 
1265
#define P4IN                   (PBIN_H)       /* Port 4 Input */
1266
#define P4OUT                  (PBOUT_H)      /* Port 4 Output */
1267
#define P4DIR                  (PBDIR_H)      /* Port 4 Direction */
1268
#define P4REN                  (PBREN_H)      /* Port 4 Resistor Enable */
1269
#define P4DS                   (PBDS_H)       /* Port 4 Resistor Drive Strenght */
1270
#define P4SEL                  (PBSEL_H)      /* Port 4 Selection */
1271
 
1272
 
1273
/************************************************************
1274
* DIGITAL I/O Port5/6 Pull up / Pull down Resistors
1275
************************************************************/
1276
#define __MSP430_HAS_PORT5_R__                /* Definition to show that Module is available */
1277
#define __MSP430_BASEADDRESS_PORT5_R__ 0x0240
1278
#define __MSP430_HAS_PORT6_R__                /* Definition to show that Module is available */
1279
#define __MSP430_BASEADDRESS_PORT6_R__ 0x0240
1280
#define __MSP430_HAS_PORTC_R__                /* Definition to show that Module is available */
1281
#define __MSP430_BASEADDRESS_PORTC_R__ 0x0240
1282
 
1283
SFR_16BIT(PCIN);                              /* Port C Input */
1284
SFR_8BIT(PCIN_L);                             /* Port C Input */
1285
SFR_8BIT(PCIN_H);                             /* Port C Input */
1286
SFR_16BIT(PCOUT);                             /* Port C Output */
1287
SFR_8BIT(PCOUT_L);                            /* Port C Output */
1288
SFR_8BIT(PCOUT_H);                            /* Port C Output */
1289
SFR_16BIT(PCDIR);                             /* Port C Direction */
1290
SFR_8BIT(PCDIR_L);                            /* Port C Direction */
1291
SFR_8BIT(PCDIR_H);                            /* Port C Direction */
1292
SFR_16BIT(PCREN);                             /* Port C Resistor Enable */
1293
SFR_8BIT(PCREN_L);                            /* Port C Resistor Enable */
1294
SFR_8BIT(PCREN_H);                            /* Port C Resistor Enable */
1295
SFR_16BIT(PCDS);                              /* Port C Resistor Drive Strenght */
1296
SFR_8BIT(PCDS_L);                             /* Port C Resistor Drive Strenght */
1297
SFR_8BIT(PCDS_H);                             /* Port C Resistor Drive Strenght */
1298
SFR_16BIT(PCSEL);                             /* Port C Selection */
1299
SFR_8BIT(PCSEL_L);                            /* Port C Selection */
1300
SFR_8BIT(PCSEL_H);                            /* Port C Selection */
1301
 
1302
 
1303
#define P5IN                   (PCIN_L)       /* Port 5 Input */
1304
#define P5OUT                  (PCOUT_L)      /* Port 5 Output */
1305
#define P5DIR                  (PCDIR_L)      /* Port 5 Direction */
1306
#define P5REN                  (PCREN_L)      /* Port 5 Resistor Enable */
1307
#define P5DS                   (PCDS_L)       /* Port 5 Resistor Drive Strenght */
1308
#define P5SEL                  (PCSEL_L)      /* Port 5 Selection */
1309
 
1310
#define P6IN                   (PCIN_H)       /* Port 6 Input */
1311
#define P6OUT                  (PCOUT_H)      /* Port 6 Output */
1312
#define P6DIR                  (PCDIR_H)      /* Port 6 Direction */
1313
#define P6REN                  (PCREN_H)      /* Port 6 Resistor Enable */
1314
#define P6DS                   (PCDS_H)       /* Port 6 Resistor Drive Strenght */
1315
#define P6SEL                  (PCSEL_H)      /* Port 6 Selection */
1316
 
1317
 
1318
/************************************************************
1319
* DIGITAL I/O Port7/8 Pull up / Pull down Resistors
1320
************************************************************/
1321
#define __MSP430_HAS_PORT7_R__                /* Definition to show that Module is available */
1322
#define __MSP430_BASEADDRESS_PORT7_R__ 0x0260
1323
#define __MSP430_HAS_PORT8_R__                /* Definition to show that Module is available */
1324
#define __MSP430_BASEADDRESS_PORT8_R__ 0x0260
1325
#define __MSP430_HAS_PORTD_R__                /* Definition to show that Module is available */
1326
#define __MSP430_BASEADDRESS_PORTD_R__ 0x0260
1327
 
1328
SFR_16BIT(PDIN);                              /* Port D Input */
1329
SFR_8BIT(PDIN_L);                             /* Port D Input */
1330
SFR_8BIT(PDIN_H);                             /* Port D Input */
1331
SFR_16BIT(PDOUT);                             /* Port D Output */
1332
SFR_8BIT(PDOUT_L);                            /* Port D Output */
1333
SFR_8BIT(PDOUT_H);                            /* Port D Output */
1334
SFR_16BIT(PDDIR);                             /* Port D Direction */
1335
SFR_8BIT(PDDIR_L);                            /* Port D Direction */
1336
SFR_8BIT(PDDIR_H);                            /* Port D Direction */
1337
SFR_16BIT(PDREN);                             /* Port D Resistor Enable */
1338
SFR_8BIT(PDREN_L);                            /* Port D Resistor Enable */
1339
SFR_8BIT(PDREN_H);                            /* Port D Resistor Enable */
1340
SFR_16BIT(PDDS);                              /* Port D Resistor Drive Strenght */
1341
SFR_8BIT(PDDS_L);                             /* Port D Resistor Drive Strenght */
1342
SFR_8BIT(PDDS_H);                             /* Port D Resistor Drive Strenght */
1343
SFR_16BIT(PDSEL);                             /* Port D Selection */
1344
SFR_8BIT(PDSEL_L);                            /* Port D Selection */
1345
SFR_8BIT(PDSEL_H);                            /* Port D Selection */
1346
 
1347
 
1348
#define P7IN                   (PDIN_L)       /* Port 7 Input */
1349
#define P7OUT                  (PDOUT_L)      /* Port 7 Output */
1350
#define P7DIR                  (PDDIR_L)      /* Port 7 Direction */
1351
#define P7REN                  (PDREN_L)      /* Port 7 Resistor Enable */
1352
#define P7DS                   (PDDS_L)       /* Port 7 Resistor Drive Strenght */
1353
#define P7SEL                  (PDSEL_L)      /* Port 7 Selection */
1354
 
1355
#define P8IN                   (PDIN_H)       /* Port 8 Input */
1356
#define P8OUT                  (PDOUT_H)      /* Port 8 Output */
1357
#define P8DIR                  (PDDIR_H)      /* Port 8 Direction */
1358
#define P8REN                  (PDREN_H)      /* Port 8 Resistor Enable */
1359
#define P8DS                   (PDDS_H)       /* Port 8 Resistor Drive Strenght */
1360
#define P8SEL                  (PDSEL_H)      /* Port 8 Selection */
1361
 
1362
 
1363
/************************************************************
1364
* DIGITAL I/O Port9/10 Pull up / Pull down Resistors
1365
************************************************************/
1366
#define __MSP430_HAS_PORT9_R__                /* Definition to show that Module is available */
1367
#define __MSP430_BASEADDRESS_PORT9_R__ 0x0280
1368
#define __MSP430_HAS_PORT10_R__                /* Definition to show that Module is available */
1369
#define __MSP430_BASEADDRESS_PORT10_R__ 0x0280
1370
#define __MSP430_HAS_PORTE_R__                /* Definition to show that Module is available */
1371
#define __MSP430_BASEADDRESS_PORTE_R__ 0x0280
1372
 
1373
SFR_16BIT(PEIN);                              /* Port E Input */
1374
SFR_8BIT(PEIN_L);                             /* Port E Input */
1375
SFR_8BIT(PEIN_H);                             /* Port E Input */
1376
SFR_16BIT(PEOUT);                             /* Port E Output */
1377
SFR_8BIT(PEOUT_L);                            /* Port E Output */
1378
SFR_8BIT(PEOUT_H);                            /* Port E Output */
1379
SFR_16BIT(PEDIR);                             /* Port E Direction */
1380
SFR_8BIT(PEDIR_L);                            /* Port E Direction */
1381
SFR_8BIT(PEDIR_H);                            /* Port E Direction */
1382
SFR_16BIT(PEREN);                             /* Port E Resistor Enable */
1383
SFR_8BIT(PEREN_L);                            /* Port E Resistor Enable */
1384
SFR_8BIT(PEREN_H);                            /* Port E Resistor Enable */
1385
SFR_16BIT(PEDS);                              /* Port E Resistor Drive Strenght */
1386
SFR_8BIT(PEDS_L);                             /* Port E Resistor Drive Strenght */
1387
SFR_8BIT(PEDS_H);                             /* Port E Resistor Drive Strenght */
1388
SFR_16BIT(PESEL);                             /* Port E Selection */
1389
SFR_8BIT(PESEL_L);                            /* Port E Selection */
1390
SFR_8BIT(PESEL_H);                            /* Port E Selection */
1391
 
1392
 
1393
#define P9IN                   (PEIN_L)       /* Port 9 Input */
1394
#define P9OUT                  (PEOUT_L)      /* Port 9 Output */
1395
#define P9DIR                  (PEDIR_L)      /* Port 9 Direction */
1396
#define P9REN                  (PEREN_L)      /* Port 9 Resistor Enable */
1397
#define P9DS                   (PEDS_L)       /* Port 9 Resistor Drive Strenght */
1398
#define P9SEL                  (PESEL_L)      /* Port 9 Selection */
1399
 
1400
#define P10IN                  (PEIN_H)       /* Port 10 Input */
1401
#define P10OUT                 (PEOUT_H)      /* Port 10 Output */
1402
#define P10DIR                 (PEDIR_H)      /* Port 10 Direction */
1403
#define P10REN                 (PEREN_H)      /* Port 10 Resistor Enable */
1404
#define P10DS                  (PEDS_H)       /* Port 10 Resistor Drive Strenght */
1405
#define P10SEL                 (PESEL_H)      /* Port 10 Selection */
1406
 
1407
 
1408
/************************************************************
1409
* DIGITAL I/O Port11 Pull up / Pull down Resistors
1410
************************************************************/
1411
#define __MSP430_HAS_PORT11_R__                /* Definition to show that Module is available */
1412
#define __MSP430_BASEADDRESS_PORT11_R__ 0x02A0
1413
#define __MSP430_HAS_PORTF_R__                /* Definition to show that Module is available */
1414
#define __MSP430_BASEADDRESS_PORTF_R__ 0x02A0
1415
 
1416
SFR_16BIT(PFIN);                              /* Port F Input */
1417
SFR_8BIT(PFIN_L);                             /* Port F Input */
1418
SFR_8BIT(PFIN_H);                             /* Port F Input */
1419
SFR_16BIT(PFOUT);                             /* Port F Output */
1420
SFR_8BIT(PFOUT_L);                            /* Port F Output */
1421
SFR_8BIT(PFOUT_H);                            /* Port F Output */
1422
SFR_16BIT(PFDIR);                             /* Port F Direction */
1423
SFR_8BIT(PFDIR_L);                            /* Port F Direction */
1424
SFR_8BIT(PFDIR_H);                            /* Port F Direction */
1425
SFR_16BIT(PFREN);                             /* Port F Resistor Enable */
1426
SFR_8BIT(PFREN_L);                            /* Port F Resistor Enable */
1427
SFR_8BIT(PFREN_H);                            /* Port F Resistor Enable */
1428
SFR_16BIT(PFDS);                              /* Port F Resistor Drive Strenght */
1429
SFR_8BIT(PFDS_L);                             /* Port F Resistor Drive Strenght */
1430
SFR_8BIT(PFDS_H);                             /* Port F Resistor Drive Strenght */
1431
SFR_16BIT(PFSEL);                             /* Port F Selection */
1432
SFR_8BIT(PFSEL_L);                            /* Port F Selection */
1433
SFR_8BIT(PFSEL_H);                            /* Port F Selection */
1434
 
1435
 
1436
#define P11IN                  (PFIN_L)       /* Port 11 Input */
1437
#define P11OUT                 (PFOUT_L)      /* Port 11 Output */
1438
#define P11DIR                 (PFDIR_L)      /* Port 11 Direction */
1439
#define P11REN                 (PFREN_L)      /* Port 11 Resistor Enable */
1440
#define P11DS                  (PFDS_L)       /* Port 11 Resistor Drive Strenght */
1441
#define P11SEL                 (PFSEL_L)      /* Port 11 Selection */
1442
 
1443
 
1444
/************************************************************
1445
* DIGITAL I/O PortJ Pull up / Pull down Resistors
1446
************************************************************/
1447
#define __MSP430_HAS_PORTJ_R__                /* Definition to show that Module is available */
1448
#define __MSP430_BASEADDRESS_PORTJ_R__ 0x0320
1449
 
1450
SFR_16BIT(PJIN);                              /* Port J Input */
1451
SFR_8BIT(PJIN_L);                             /* Port J Input */
1452
SFR_8BIT(PJIN_H);                             /* Port J Input */
1453
SFR_16BIT(PJOUT);                             /* Port J Output */
1454
SFR_8BIT(PJOUT_L);                            /* Port J Output */
1455
SFR_8BIT(PJOUT_H);                            /* Port J Output */
1456
SFR_16BIT(PJDIR);                             /* Port J Direction */
1457
SFR_8BIT(PJDIR_L);                            /* Port J Direction */
1458
SFR_8BIT(PJDIR_H);                            /* Port J Direction */
1459
SFR_16BIT(PJREN);                             /* Port J Resistor Enable */
1460
SFR_8BIT(PJREN_L);                            /* Port J Resistor Enable */
1461
SFR_8BIT(PJREN_H);                            /* Port J Resistor Enable */
1462
SFR_16BIT(PJDS);                              /* Port J Resistor Drive Strenght */
1463
SFR_8BIT(PJDS_L);                             /* Port J Resistor Drive Strenght */
1464
SFR_8BIT(PJDS_H);                             /* Port J Resistor Drive Strenght */
1465
 
1466
/************************************************************
1467
* PMM - Power Management System
1468
************************************************************/
1469
#define __MSP430_HAS_PMM__                    /* Definition to show that Module is available */
1470
#define __MSP430_BASEADDRESS_PMM__ 0x0120
1471
 
1472
SFR_16BIT(PMMCTL0);                           /* PMM Control 0 */
1473
SFR_8BIT(PMMCTL0_L);                          /* PMM Control 0 */
1474
SFR_8BIT(PMMCTL0_H);                          /* PMM Control 0 */
1475
SFR_16BIT(PMMCTL1);                           /* PMM Control 1 */
1476
SFR_8BIT(PMMCTL1_L);                          /* PMM Control 1 */
1477
SFR_8BIT(PMMCTL1_H);                          /* PMM Control 1 */
1478
SFR_16BIT(SVSMHCTL);                          /* SVS and SVM high side control register */
1479
SFR_8BIT(SVSMHCTL_L);                         /* SVS and SVM high side control register */
1480
SFR_8BIT(SVSMHCTL_H);                         /* SVS and SVM high side control register */
1481
SFR_16BIT(SVSMLCTL);                          /* SVS and SVM low side control register */
1482
SFR_8BIT(SVSMLCTL_L);                         /* SVS and SVM low side control register */
1483
SFR_8BIT(SVSMLCTL_H);                         /* SVS and SVM low side control register */
1484
SFR_16BIT(SVSMIO);                            /* SVSIN and SVSOUT control register */
1485
SFR_8BIT(SVSMIO_L);                           /* SVSIN and SVSOUT control register */
1486
SFR_8BIT(SVSMIO_H);                           /* SVSIN and SVSOUT control register */
1487
SFR_16BIT(PMMIFG);                            /* PMM Interrupt Flag */
1488
SFR_8BIT(PMMIFG_L);                           /* PMM Interrupt Flag */
1489
SFR_8BIT(PMMIFG_H);                           /* PMM Interrupt Flag */
1490
SFR_16BIT(PMMRIE);                            /* PMM and RESET Interrupt Enable */
1491
SFR_8BIT(PMMRIE_L);                           /* PMM and RESET Interrupt Enable */
1492
SFR_8BIT(PMMRIE_H);                           /* PMM and RESET Interrupt Enable */
1493
 
1494
#define PMMPW                  (0xA500)       /* PMM Register Write Password */
1495
#define PMMPW_H                (0xA5)         /* PMM Register Write Password for high word access */
1496
 
1497
/* PMMCTL0 Control Bits */
1498
#define PMMCOREV0              (0x0001)       /* PMM Core Voltage Bit: 0 */
1499
#define PMMCOREV1              (0x0002)       /* PMM Core Voltage Bit: 1 */
1500
#define PMMSWBOR               (0x0004)       /* PMM Software BOR */
1501
#define PMMSWPOR               (0x0008)       /* PMM Software POR */
1502
#define PMMREGOFF              (0x0010)       /* PMM Turn Regulator off */
1503
#define PMMHPMRE               (0x0080)       /* PMM Global High Power Module Request Enable */
1504
 
1505
/* PMMCTL0 Control Bits */
1506
#define PMMCOREV0_L            (0x0001)       /* PMM Core Voltage Bit: 0 */
1507
#define PMMCOREV1_L            (0x0002)       /* PMM Core Voltage Bit: 1 */
1508
#define PMMSWBOR_L             (0x0004)       /* PMM Software BOR */
1509
#define PMMSWPOR_L             (0x0008)       /* PMM Software POR */
1510
#define PMMREGOFF_L            (0x0010)       /* PMM Turn Regulator off */
1511
#define PMMHPMRE_L             (0x0080)       /* PMM Global High Power Module Request Enable */
1512
 
1513
/* PMMCTL0 Control Bits */
1514
 
1515
#define PMMCOREV_0             (0x0000)       /* PMM Core Voltage 0 (1.35V) */
1516
#define PMMCOREV_1             (0x0001)       /* PMM Core Voltage 1 (1.55V) */
1517
#define PMMCOREV_2             (0x0002)       /* PMM Core Voltage 2 (1.75V) */
1518
#define PMMCOREV_3             (0x0003)       /* PMM Core Voltage 3 (1.85V) */
1519
 
1520
/* PMMCTL1 Control Bits */
1521
#define PMMREFMD               (0x0001)       /* PMM Reference Mode */
1522
#define PMMCMD0                (0x0010)       /* PMM Voltage Regulator Current Mode Bit: 0 */
1523
#define PMMCMD1                (0x0020)       /* PMM Voltage Regulator Current Mode Bit: 1 */
1524
 
1525
/* PMMCTL1 Control Bits */
1526
#define PMMREFMD_L             (0x0001)       /* PMM Reference Mode */
1527
#define PMMCMD0_L              (0x0010)       /* PMM Voltage Regulator Current Mode Bit: 0 */
1528
#define PMMCMD1_L              (0x0020)       /* PMM Voltage Regulator Current Mode Bit: 1 */
1529
 
1530
/* PMMCTL1 Control Bits */
1531
 
1532
/* SVSMHCTL Control Bits */
1533
#define SVSMHRRL0              (0x0001)       /* SVS and SVM high side Reset Release Voltage Level Bit: 0 */
1534
#define SVSMHRRL1              (0x0002)       /* SVS and SVM high side Reset Release Voltage Level Bit: 1 */
1535
#define SVSMHRRL2              (0x0004)       /* SVS and SVM high side Reset Release Voltage Level Bit: 2 */
1536
#define SVSMHDLYST             (0x0008)       /* SVS and SVM high side delay status */
1537
#define SVSHMD                 (0x0010)       /* SVS high side mode */
1538
#define SVSMHEVM               (0x0040)       /* SVS and SVM high side event mask */
1539
#define SVSMHACE               (0x0080)       /* SVS and SVM high side auto control enable */
1540
#define SVSHRVL0               (0x0100)       /* SVS high side reset voltage level Bit: 0 */
1541
#define SVSHRVL1               (0x0200)       /* SVS high side reset voltage level Bit: 1 */
1542
#define SVSHE                  (0x0400)       /* SVS high side enable */
1543
#define SVSHFP                 (0x0800)       /* SVS high side full performace mode */
1544
#define SVMHOVPE               (0x1000)       /* SVM high side over-voltage enable */
1545
#define SVMHE                  (0x4000)       /* SVM high side enable */
1546
#define SVMHFP                 (0x8000)       /* SVM high side full performace mode */
1547
 
1548
/* SVSMHCTL Control Bits */
1549
#define SVSMHRRL0_L            (0x0001)       /* SVS and SVM high side Reset Release Voltage Level Bit: 0 */
1550
#define SVSMHRRL1_L            (0x0002)       /* SVS and SVM high side Reset Release Voltage Level Bit: 1 */
1551
#define SVSMHRRL2_L            (0x0004)       /* SVS and SVM high side Reset Release Voltage Level Bit: 2 */
1552
#define SVSMHDLYST_L           (0x0008)       /* SVS and SVM high side delay status */
1553
#define SVSHMD_L               (0x0010)       /* SVS high side mode */
1554
#define SVSMHEVM_L             (0x0040)       /* SVS and SVM high side event mask */
1555
#define SVSMHACE_L             (0x0080)       /* SVS and SVM high side auto control enable */
1556
 
1557
/* SVSMHCTL Control Bits */
1558
#define SVSHRVL0_H             (0x0001)       /* SVS high side reset voltage level Bit: 0 */
1559
#define SVSHRVL1_H             (0x0002)       /* SVS high side reset voltage level Bit: 1 */
1560
#define SVSHE_H                (0x0004)       /* SVS high side enable */
1561
#define SVSHFP_H               (0x0008)       /* SVS high side full performace mode */
1562
#define SVMHOVPE_H             (0x0010)       /* SVM high side over-voltage enable */
1563
#define SVMHE_H                (0x0040)       /* SVM high side enable */
1564
#define SVMHFP_H               (0x0080)       /* SVM high side full performace mode */
1565
 
1566
#define SVSMHRRL_0             (0x0000)       /* SVS and SVM high side Reset Release Voltage Level 0 */
1567
#define SVSMHRRL_1             (0x0001)       /* SVS and SVM high side Reset Release Voltage Level 1 */
1568
#define SVSMHRRL_2             (0x0002)       /* SVS and SVM high side Reset Release Voltage Level 2 */
1569
#define SVSMHRRL_3             (0x0003)       /* SVS and SVM high side Reset Release Voltage Level 3 */
1570
#define SVSMHRRL_4             (0x0004)       /* SVS and SVM high side Reset Release Voltage Level 4 */
1571
#define SVSMHRRL_5             (0x0005)       /* SVS and SVM high side Reset Release Voltage Level 5 */
1572
#define SVSMHRRL_6             (0x0006)       /* SVS and SVM high side Reset Release Voltage Level 6 */
1573
#define SVSMHRRL_7             (0x0007)       /* SVS and SVM high side Reset Release Voltage Level 7 */
1574
 
1575
#define SVSHRVL_0              (0x0000)       /* SVS high side Reset Release Voltage Level 0 */
1576
#define SVSHRVL_1              (0x0100)       /* SVS high side Reset Release Voltage Level 1 */
1577
#define SVSHRVL_2              (0x0200)       /* SVS high side Reset Release Voltage Level 2 */
1578
#define SVSHRVL_3              (0x0300)       /* SVS high side Reset Release Voltage Level 3 */
1579
 
1580
/* SVSMLCTL Control Bits */
1581
#define SVSMLRRL0              (0x0001)       /* SVS and SVM low side Reset Release Voltage Level Bit: 0 */
1582
#define SVSMLRRL1              (0x0002)       /* SVS and SVM low side Reset Release Voltage Level Bit: 1 */
1583
#define SVSMLRRL2              (0x0004)       /* SVS and SVM low side Reset Release Voltage Level Bit: 2 */
1584
#define SVSMLDLYST             (0x0008)       /* SVS and SVM low side delay status */
1585
#define SVSLMD                 (0x0010)       /* SVS low side mode */
1586
#define SVSMLEVM               (0x0040)       /* SVS and SVM low side event mask */
1587
#define SVSMLACE               (0x0080)       /* SVS and SVM low side auto control enable */
1588
#define SVSLRVL0               (0x0100)       /* SVS low side reset voltage level Bit: 0 */
1589
#define SVSLRVL1               (0x0200)       /* SVS low side reset voltage level Bit: 1 */
1590
#define SVSLE                  (0x0400)       /* SVS low side enable */
1591
#define SVSLFP                 (0x0800)       /* SVS low side full performace mode */
1592
#define SVMLOVPE               (0x1000)       /* SVM low side over-voltage enable */
1593
#define SVMLE                  (0x4000)       /* SVM low side enable */
1594
#define SVMLFP                 (0x8000)       /* SVM low side full performace mode */
1595
 
1596
/* SVSMLCTL Control Bits */
1597
#define SVSMLRRL0_L            (0x0001)       /* SVS and SVM low side Reset Release Voltage Level Bit: 0 */
1598
#define SVSMLRRL1_L            (0x0002)       /* SVS and SVM low side Reset Release Voltage Level Bit: 1 */
1599
#define SVSMLRRL2_L            (0x0004)       /* SVS and SVM low side Reset Release Voltage Level Bit: 2 */
1600
#define SVSMLDLYST_L           (0x0008)       /* SVS and SVM low side delay status */
1601
#define SVSLMD_L               (0x0010)       /* SVS low side mode */
1602
#define SVSMLEVM_L             (0x0040)       /* SVS and SVM low side event mask */
1603
#define SVSMLACE_L             (0x0080)       /* SVS and SVM low side auto control enable */
1604
 
1605
/* SVSMLCTL Control Bits */
1606
#define SVSLRVL0_H             (0x0001)       /* SVS low side reset voltage level Bit: 0 */
1607
#define SVSLRVL1_H             (0x0002)       /* SVS low side reset voltage level Bit: 1 */
1608
#define SVSLE_H                (0x0004)       /* SVS low side enable */
1609
#define SVSLFP_H               (0x0008)       /* SVS low side full performace mode */
1610
#define SVMLOVPE_H             (0x0010)       /* SVM low side over-voltage enable */
1611
#define SVMLE_H                (0x0040)       /* SVM low side enable */
1612
#define SVMLFP_H               (0x0080)       /* SVM low side full performace mode */
1613
 
1614
#define SVSMLRRL_0             (0x0000)       /* SVS and SVM low side Reset Release Voltage Level 0 */
1615
#define SVSMLRRL_1             (0x0001)       /* SVS and SVM low side Reset Release Voltage Level 1 */
1616
#define SVSMLRRL_2             (0x0002)       /* SVS and SVM low side Reset Release Voltage Level 2 */
1617
#define SVSMLRRL_3             (0x0003)       /* SVS and SVM low side Reset Release Voltage Level 3 */
1618
#define SVSMLRRL_4             (0x0004)       /* SVS and SVM low side Reset Release Voltage Level 4 */
1619
#define SVSMLRRL_5             (0x0005)       /* SVS and SVM low side Reset Release Voltage Level 5 */
1620
#define SVSMLRRL_6             (0x0006)       /* SVS and SVM low side Reset Release Voltage Level 6 */
1621
#define SVSMLRRL_7             (0x0007)       /* SVS and SVM low side Reset Release Voltage Level 7 */
1622
 
1623
#define SVSLRVL_0              (0x0000)       /* SVS low side Reset Release Voltage Level 0 */
1624
#define SVSLRVL_1              (0x0100)       /* SVS low side Reset Release Voltage Level 1 */
1625
#define SVSLRVL_2              (0x0200)       /* SVS low side Reset Release Voltage Level 2 */
1626
#define SVSLRVL_3              (0x0300)       /* SVS low side Reset Release Voltage Level 3 */
1627
 
1628
/* SVSMIO Control Bits */
1629
#define SVMLOE                 (0x0008)       /* SVM low side output enable */
1630
#define SVMLVLROE              (0x0010)       /* SVM low side voltage level reached output enable */
1631
#define SVMOUTPOL              (0x0020)       /* SVMOUT pin polarity */
1632
#define SVMHOE                 (0x0800)       /* SVM high side output enable */
1633
#define SVMHVLROE              (0x1000)       /* SVM high side voltage level reached output enable */
1634
 
1635
/* SVSMIO Control Bits */
1636
#define SVMLOE_L               (0x0008)       /* SVM low side output enable */
1637
#define SVMLVLROE_L            (0x0010)       /* SVM low side voltage level reached output enable */
1638
#define SVMOUTPOL_L            (0x0020)       /* SVMOUT pin polarity */
1639
 
1640
/* SVSMIO Control Bits */
1641
#define SVMHOE_H               (0x0008)       /* SVM high side output enable */
1642
#define SVMHVLROE_H            (0x0010)       /* SVM high side voltage level reached output enable */
1643
 
1644
/* PMMIFG Control Bits */
1645
#define SVSMLDLYIFG            (0x0001)       /* SVS and SVM low side Delay expired interrupt flag */
1646
#define SVMLIFG                (0x0002)       /* SVM low side interrupt flag */
1647
#define SVMLVLRIFG             (0x0004)       /* SVM low side Voltage Level Reached interrupt flag */
1648
#define SVSMHDLYIFG            (0x0010)       /* SVS and SVM high side Delay expired interrupt flag */
1649
#define SVMHIFG                (0x0020)       /* SVM high side interrupt flag */
1650
#define SVMHVLRIFG             (0x0040)       /* SVM high side Voltage Level Reached interrupt flag */
1651
#define PMMBORIFG              (0x0100)       /* PMM Software BOR interrupt flag */
1652
#define PMMRSTIFG              (0x0200)       /* PMM RESET pin interrupt flag */
1653
#define PMMPORIFG              (0x0400)       /* PMM Software POR interrupt flag */
1654
#define SVSHIFG                (0x1000)       /* SVS low side interrupt flag */
1655
#define SVSLIFG                (0x2000)       /* SVS high side interrupt flag */
1656
#define PMMLPM5IFG             (0x8000)       /* LPM5 indication Flag */
1657
 
1658
/* PMMIFG Control Bits */
1659
#define SVSMLDLYIFG_L          (0x0001)       /* SVS and SVM low side Delay expired interrupt flag */
1660
#define SVMLIFG_L              (0x0002)       /* SVM low side interrupt flag */
1661
#define SVMLVLRIFG_L           (0x0004)       /* SVM low side Voltage Level Reached interrupt flag */
1662
#define SVSMHDLYIFG_L          (0x0010)       /* SVS and SVM high side Delay expired interrupt flag */
1663
#define SVMHIFG_L              (0x0020)       /* SVM high side interrupt flag */
1664
#define SVMHVLRIFG_L           (0x0040)       /* SVM high side Voltage Level Reached interrupt flag */
1665
 
1666
/* PMMIFG Control Bits */
1667
#define PMMBORIFG_H            (0x0001)       /* PMM Software BOR interrupt flag */
1668
#define PMMRSTIFG_H            (0x0002)       /* PMM RESET pin interrupt flag */
1669
#define PMMPORIFG_H            (0x0004)       /* PMM Software POR interrupt flag */
1670
#define SVSHIFG_H              (0x0010)       /* SVS low side interrupt flag */
1671
#define SVSLIFG_H              (0x0020)       /* SVS high side interrupt flag */
1672
#define PMMLPM5IFG_H           (0x0080)       /* LPM5 indication Flag */
1673
 
1674
#define PMMRSTLPM5IFG          PMMLPM5IFG     /* LPM5 indication Flag */
1675
 
1676
/* PMMIE and RESET Control Bits */
1677
#define SVSMLDLYIE             (0x0001)       /* SVS and SVM low side Delay expired interrupt enable */
1678
#define SVMLIE                 (0x0002)       /* SVM low side interrupt enable */
1679
#define SVMLVLRIE              (0x0004)       /* SVM low side Voltage Level Reached interrupt enable */
1680
#define SVSMHDLYIE             (0x0010)       /* SVS and SVM high side Delay expired interrupt enable */
1681
#define SVMHIE                 (0x0020)       /* SVM high side interrupt enable */
1682
#define SVMHVLRIE              (0x0040)       /* SVM high side Voltage Level Reached interrupt enable */
1683
#define SVSLPE                 (0x0100)       /* SVS low side POR enable */
1684
#define SVMLVLRPE              (0x0200)       /* SVM low side Voltage Level reached POR enable */
1685
#define SVSHPE                 (0x1000)       /* SVS high side POR enable */
1686
#define SVMHVLRPE              (0x2000)       /* SVM high side Voltage Level reached POR enable */
1687
 
1688
/* PMMIE and RESET Control Bits */
1689
#define SVSMLDLYIE_L           (0x0001)       /* SVS and SVM low side Delay expired interrupt enable */
1690
#define SVMLIE_L               (0x0002)       /* SVM low side interrupt enable */
1691
#define SVMLVLRIE_L            (0x0004)       /* SVM low side Voltage Level Reached interrupt enable */
1692
#define SVSMHDLYIE_L           (0x0010)       /* SVS and SVM high side Delay expired interrupt enable */
1693
#define SVMHIE_L               (0x0020)       /* SVM high side interrupt enable */
1694
#define SVMHVLRIE_L            (0x0040)       /* SVM high side Voltage Level Reached interrupt enable */
1695
 
1696
/* PMMIE and RESET Control Bits */
1697
#define SVSLPE_H               (0x0001)       /* SVS low side POR enable */
1698
#define SVMLVLRPE_H            (0x0002)       /* SVM low side Voltage Level reached POR enable */
1699
#define SVSHPE_H               (0x0010)       /* SVS high side POR enable */
1700
#define SVMHVLRPE_H            (0x0020)       /* SVM high side Voltage Level reached POR enable */
1701
 
1702
/*************************************************************
1703
* RAM Control Module
1704
*************************************************************/
1705
#define __MSP430_HAS_RC__                     /* Definition to show that Module is available */
1706
#define __MSP430_BASEADDRESS_RC__ 0x0158
1707
 
1708
SFR_16BIT(RCCTL0);                            /* Ram Controller Control Register */
1709
SFR_8BIT(RCCTL0_L);                           /* Ram Controller Control Register */
1710
SFR_8BIT(RCCTL0_H);                           /* Ram Controller Control Register */
1711
 
1712
/* RCCTL0 Control Bits */
1713
#define RCRS0OFF               (0x0001)       /* RAM Controller RAM Sector 0 Off */
1714
#define RCRS1OFF               (0x0002)       /* RAM Controller RAM Sector 1 Off */
1715
#define RCRS2OFF               (0x0004)       /* RAM Controller RAM Sector 2 Off */
1716
#define RCRS3OFF               (0x0008)       /* RAM Controller RAM Sector 3 Off */
1717
 
1718
/* RCCTL0 Control Bits */
1719
#define RCRS0OFF_L             (0x0001)       /* RAM Controller RAM Sector 0 Off */
1720
#define RCRS1OFF_L             (0x0002)       /* RAM Controller RAM Sector 1 Off */
1721
#define RCRS2OFF_L             (0x0004)       /* RAM Controller RAM Sector 2 Off */
1722
#define RCRS3OFF_L             (0x0008)       /* RAM Controller RAM Sector 3 Off */
1723
 
1724
/* RCCTL0 Control Bits */
1725
 
1726
#define RCKEY                  (0x5A00)
1727
 
1728
/************************************************************
1729
* Real Time Clock
1730
************************************************************/
1731
#define __MSP430_HAS_RTC__                    /* Definition to show that Module is available */
1732
#define __MSP430_BASEADDRESS_RTC__ 0x04A0
1733
 
1734
SFR_16BIT(RTCCTL01);                          /* Real Timer Control 0/1 */
1735
SFR_8BIT(RTCCTL01_L);                         /* Real Timer Control 0/1 */
1736
SFR_8BIT(RTCCTL01_H);                         /* Real Timer Control 0/1 */
1737
SFR_16BIT(RTCCTL23);                          /* Real Timer Control 2/3 */
1738
SFR_8BIT(RTCCTL23_L);                         /* Real Timer Control 2/3 */
1739
SFR_8BIT(RTCCTL23_H);                         /* Real Timer Control 2/3 */
1740
SFR_16BIT(RTCPS0CTL);                         /* Real Timer Prescale Timer 0 Control */
1741
SFR_8BIT(RTCPS0CTL_L);                        /* Real Timer Prescale Timer 0 Control */
1742
SFR_8BIT(RTCPS0CTL_H);                        /* Real Timer Prescale Timer 0 Control */
1743
SFR_16BIT(RTCPS1CTL);                         /* Real Timer Prescale Timer 1 Control */
1744
SFR_8BIT(RTCPS1CTL_L);                        /* Real Timer Prescale Timer 1 Control */
1745
SFR_8BIT(RTCPS1CTL_H);                        /* Real Timer Prescale Timer 1 Control */
1746
SFR_16BIT(RTCPS);                             /* Real Timer Prescale Timer Control */
1747
SFR_8BIT(RTCPS_L);                            /* Real Timer Prescale Timer Control */
1748
SFR_8BIT(RTCPS_H);                            /* Real Timer Prescale Timer Control */
1749
SFR_16BIT(RTCIV);                             /* Real Time Clock Interrupt Vector */
1750
SFR_16BIT(RTCTIM0);                           /* Real Time Clock Time 0 */
1751
SFR_8BIT(RTCTIM0_L);                          /* Real Time Clock Time 0 */
1752
SFR_8BIT(RTCTIM0_H);                          /* Real Time Clock Time 0 */
1753
SFR_16BIT(RTCTIM1);                           /* Real Time Clock Time 1 */
1754
SFR_8BIT(RTCTIM1_L);                          /* Real Time Clock Time 1 */
1755
SFR_8BIT(RTCTIM1_H);                          /* Real Time Clock Time 1 */
1756
SFR_16BIT(RTCDATE);                           /* Real Time Clock Date */
1757
SFR_8BIT(RTCDATE_L);                          /* Real Time Clock Date */
1758
SFR_8BIT(RTCDATE_H);                          /* Real Time Clock Date */
1759
SFR_16BIT(RTCYEAR);                           /* Real Time Clock Year */
1760
SFR_8BIT(RTCYEAR_L);                          /* Real Time Clock Year */
1761
SFR_8BIT(RTCYEAR_H);                          /* Real Time Clock Year */
1762
SFR_16BIT(RTCAMINHR);                         /* Real Time Clock Alarm Min/Hour */
1763
SFR_8BIT(RTCAMINHR_L);                        /* Real Time Clock Alarm Min/Hour */
1764
SFR_8BIT(RTCAMINHR_H);                        /* Real Time Clock Alarm Min/Hour */
1765
SFR_16BIT(RTCADOWDAY);                        /* Real Time Clock Alarm day of week/day */
1766
SFR_8BIT(RTCADOWDAY_L);                       /* Real Time Clock Alarm day of week/day */
1767
SFR_8BIT(RTCADOWDAY_H);                       /* Real Time Clock Alarm day of week/day */
1768
 
1769
#define RTCCTL0                RTCCTL01_L     /* Real Time Clock Control 0 */
1770
#define RTCCTL1                RTCCTL01_H     /* Real Time Clock Control 1 */
1771
#define RTCCTL2                RTCCTL23_L     /* Real Time Clock Control 2 */
1772
#define RTCCTL3                RTCCTL23_H     /* Real Time Clock Control 3 */
1773
#define RTCNT12                RTCTIM0
1774
#define RTCNT34                RTCTIM1
1775
#define RTCNT1                 RTCTIM0_L
1776
#define RTCNT2                 RTCTIM0_H
1777
#define RTCNT3                 RTCTIM1_L
1778
#define RTCNT4                 RTCTIM1_H
1779
#define RTCSEC                 RTCTIM0_L
1780
#define RTCMIN                 RTCTIM0_H
1781
#define RTCHOUR                RTCTIM1_L
1782
#define RTCDOW                 RTCTIM1_H
1783
#define RTCDAY                 RTCDATE_L
1784
#define RTCMON                 RTCDATE_H
1785
#define RTCYEARL               RTCYEAR_L
1786
#define RTCYEARH               RTCYEAR_H
1787
#define RT0PS                  RTCPS_L
1788
#define RT1PS                  RTCPS_H
1789
#define RTCAMIN                RTCAMINHR_L    /* Real Time Clock Alarm Min */
1790
#define RTCAHOUR               RTCAMINHR_H    /* Real Time Clock Alarm Hour */
1791
#define RTCADOW                RTCADOWDAY_L   /* Real Time Clock Alarm day of week */
1792
#define RTCADAY                RTCADOWDAY_H   /* Real Time Clock Alarm day */
1793
 
1794
/* RTCCTL01 Control Bits */
1795
#define RTCBCD                 (0x8000)       /* RTC BCD  0:Binary / 1:BCD */
1796
#define RTCHOLD                (0x4000)       /* RTC Hold */
1797
#define RTCMODE                (0x2000)       /* RTC Mode 0:Counter / 1: Calendar */
1798
#define RTCRDY                 (0x1000)       /* RTC Ready */
1799
#define RTCSSEL1               (0x0800)       /* RTC Source Select 1 */
1800
#define RTCSSEL0               (0x0400)       /* RTC Source Select 0 */
1801
#define RTCTEV1                (0x0200)       /* RTC Time Event 1 */
1802
#define RTCTEV0                (0x0100)       /* RTC Time Event 0 */
1803
//#define Reserved          (0x0080)
1804
#define RTCTEVIE               (0x0040)       /* RTC Time Event Interrupt Enable Flag */
1805
#define RTCAIE                 (0x0020)       /* RTC Alarm Interrupt Enable Flag */
1806
#define RTCRDYIE               (0x0010)       /* RTC Ready Interrupt Enable Flag */
1807
//#define Reserved          (0x0008)
1808
#define RTCTEVIFG              (0x0004)       /* RTC Time Event Interrupt Flag */
1809
#define RTCAIFG                (0x0002)       /* RTC Alarm Interrupt Flag */
1810
#define RTCRDYIFG              (0x0001)       /* RTC Ready Interrupt Flag */
1811
 
1812
/* RTCCTL01 Control Bits */
1813
//#define Reserved          (0x0080)
1814
#define RTCTEVIE_L             (0x0040)       /* RTC Time Event Interrupt Enable Flag */
1815
#define RTCAIE_L               (0x0020)       /* RTC Alarm Interrupt Enable Flag */
1816
#define RTCRDYIE_L             (0x0010)       /* RTC Ready Interrupt Enable Flag */
1817
//#define Reserved          (0x0008)
1818
#define RTCTEVIFG_L            (0x0004)       /* RTC Time Event Interrupt Flag */
1819
#define RTCAIFG_L              (0x0002)       /* RTC Alarm Interrupt Flag */
1820
#define RTCRDYIFG_L            (0x0001)       /* RTC Ready Interrupt Flag */
1821
 
1822
/* RTCCTL01 Control Bits */
1823
#define RTCBCD_H               (0x0080)       /* RTC BCD  0:Binary / 1:BCD */
1824
#define RTCHOLD_H              (0x0040)       /* RTC Hold */
1825
#define RTCMODE_H              (0x0020)       /* RTC Mode 0:Counter / 1: Calendar */
1826
#define RTCRDY_H               (0x0010)       /* RTC Ready */
1827
#define RTCSSEL1_H             (0x0008)       /* RTC Source Select 1 */
1828
#define RTCSSEL0_H             (0x0004)       /* RTC Source Select 0 */
1829
#define RTCTEV1_H              (0x0002)       /* RTC Time Event 1 */
1830
#define RTCTEV0_H              (0x0001)       /* RTC Time Event 0 */
1831
//#define Reserved          (0x0080)
1832
//#define Reserved          (0x0008)
1833
 
1834
#define RTCSSEL_0              (0x0000)       /* RTC Source Select ACLK */
1835
#define RTCSSEL_1              (0x0400)       /* RTC Source Select SMCLK */
1836
#define RTCSSEL_2              (0x0800)       /* RTC Source Select RT1PS */
1837
#define RTCSSEL_3              (0x0C00)       /* RTC Source Select RT1PS */
1838
#define RTCSSEL__ACLK          (0x0000)       /* RTC Source Select ACLK */
1839
#define RTCSSEL__SMCLK         (0x0400)       /* RTC Source Select SMCLK */
1840
#define RTCSSEL__RT1PS         (0x0800)       /* RTC Source Select RT1PS */
1841
#define RTCTEV_0               (0x0000)       /* RTC Time Event: 0 (Min. changed) */
1842
#define RTCTEV_1               (0x0100)       /* RTC Time Event: 1 (Hour changed) */
1843
#define RTCTEV_2               (0x0200)       /* RTC Time Event: 2 (12:00 changed) */
1844
#define RTCTEV_3               (0x0300)       /* RTC Time Event: 3 (00:00 changed) */
1845
#define RTCTEV__MIN            (0x0000)       /* RTC Time Event: 0 (Min. changed) */
1846
#define RTCTEV__HOUR           (0x0100)       /* RTC Time Event: 1 (Hour changed) */
1847
#define RTCTEV__1200           (0x0200)       /* RTC Time Event: 2 (12:00 changed) */
1848
#define RTCTEV__0000           (0x0300)       /* RTC Time Event: 3 (00:00 changed) */
1849
 
1850
/* RTCCTL23 Control Bits */
1851
#define RTCCALF1               (0x0200)       /* RTC Calibration Frequency Bit 1 */
1852
#define RTCCALF0               (0x0100)       /* RTC Calibration Frequency Bit 0 */
1853
#define RTCCALS                (0x0080)       /* RTC Calibration Sign */
1854
//#define Reserved          (0x0040)
1855
#define RTCCAL5                (0x0020)       /* RTC Calibration Bit 5 */
1856
#define RTCCAL4                (0x0010)       /* RTC Calibration Bit 4 */
1857
#define RTCCAL3                (0x0008)       /* RTC Calibration Bit 3 */
1858
#define RTCCAL2                (0x0004)       /* RTC Calibration Bit 2 */
1859
#define RTCCAL1                (0x0002)       /* RTC Calibration Bit 1 */
1860
#define RTCCAL0                (0x0001)       /* RTC Calibration Bit 0 */
1861
 
1862
/* RTCCTL23 Control Bits */
1863
#define RTCCALS_L              (0x0080)       /* RTC Calibration Sign */
1864
//#define Reserved          (0x0040)
1865
#define RTCCAL5_L              (0x0020)       /* RTC Calibration Bit 5 */
1866
#define RTCCAL4_L              (0x0010)       /* RTC Calibration Bit 4 */
1867
#define RTCCAL3_L              (0x0008)       /* RTC Calibration Bit 3 */
1868
#define RTCCAL2_L              (0x0004)       /* RTC Calibration Bit 2 */
1869
#define RTCCAL1_L              (0x0002)       /* RTC Calibration Bit 1 */
1870
#define RTCCAL0_L              (0x0001)       /* RTC Calibration Bit 0 */
1871
 
1872
/* RTCCTL23 Control Bits */
1873
#define RTCCALF1_H             (0x0002)       /* RTC Calibration Frequency Bit 1 */
1874
#define RTCCALF0_H             (0x0001)       /* RTC Calibration Frequency Bit 0 */
1875
//#define Reserved          (0x0040)
1876
 
1877
#define RTCCALF_0              (0x0000)       /* RTC Calibration Frequency: No Output */
1878
#define RTCCALF_1              (0x0100)       /* RTC Calibration Frequency: 512 Hz */
1879
#define RTCCALF_2              (0x0200)       /* RTC Calibration Frequency: 256 Hz */
1880
#define RTCCALF_3              (0x0300)       /* RTC Calibration Frequency: 1 Hz */
1881
 
1882
/* RTCPS0CTL Control Bits */
1883
//#define Reserved          (0x8000)
1884
#define RT0SSEL                (0x4000)       /* RTC Prescale Timer 0 Source Select 0:ACLK / 1:SMCLK */
1885
#define RT0PSDIV2              (0x2000)       /* RTC Prescale Timer 0 Clock Divide Bit: 2 */
1886
#define RT0PSDIV1              (0x1000)       /* RTC Prescale Timer 0 Clock Divide Bit: 1 */
1887
#define RT0PSDIV0              (0x0800)       /* RTC Prescale Timer 0 Clock Divide Bit: 0 */
1888
//#define Reserved          (0x0400)
1889
//#define Reserved          (0x0200)
1890
#define RT0PSHOLD              (0x0100)       /* RTC Prescale Timer 0 Hold */
1891
//#define Reserved          (0x0080)
1892
//#define Reserved          (0x0040)
1893
//#define Reserved          (0x0020)
1894
#define RT0IP2                 (0x0010)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 2 */
1895
#define RT0IP1                 (0x0008)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 1 */
1896
#define RT0IP0                 (0x0004)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 0 */
1897
#define RT0PSIE                (0x0002)       /* RTC Prescale Timer 0 Interrupt Enable Flag */
1898
#define RT0PSIFG               (0x0001)       /* RTC Prescale Timer 0 Interrupt Flag */
1899
 
1900
/* RTCPS0CTL Control Bits */
1901
//#define Reserved          (0x8000)
1902
//#define Reserved          (0x0400)
1903
//#define Reserved          (0x0200)
1904
//#define Reserved          (0x0080)
1905
//#define Reserved          (0x0040)
1906
//#define Reserved          (0x0020)
1907
#define RT0IP2_L               (0x0010)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 2 */
1908
#define RT0IP1_L               (0x0008)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 1 */
1909
#define RT0IP0_L               (0x0004)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 0 */
1910
#define RT0PSIE_L              (0x0002)       /* RTC Prescale Timer 0 Interrupt Enable Flag */
1911
#define RT0PSIFG_L             (0x0001)       /* RTC Prescale Timer 0 Interrupt Flag */
1912
 
1913
/* RTCPS0CTL Control Bits */
1914
//#define Reserved          (0x8000)
1915
#define RT0SSEL_H              (0x0040)       /* RTC Prescale Timer 0 Source Select 0:ACLK / 1:SMCLK */
1916
#define RT0PSDIV2_H            (0x0020)       /* RTC Prescale Timer 0 Clock Divide Bit: 2 */
1917
#define RT0PSDIV1_H            (0x0010)       /* RTC Prescale Timer 0 Clock Divide Bit: 1 */
1918
#define RT0PSDIV0_H            (0x0008)       /* RTC Prescale Timer 0 Clock Divide Bit: 0 */
1919
//#define Reserved          (0x0400)
1920
//#define Reserved          (0x0200)
1921
#define RT0PSHOLD_H            (0x0001)       /* RTC Prescale Timer 0 Hold */
1922
//#define Reserved          (0x0080)
1923
//#define Reserved          (0x0040)
1924
//#define Reserved          (0x0020)
1925
 
1926
#define RT0IP_0                (0x0000)       /* RTC Prescale Timer 0 Interrupt Interval /2 */
1927
#define RT0IP_1                (0x0004)       /* RTC Prescale Timer 0 Interrupt Interval /4 */
1928
#define RT0IP_2                (0x0008)       /* RTC Prescale Timer 0 Interrupt Interval /8 */
1929
#define RT0IP_3                (0x000C)       /* RTC Prescale Timer 0 Interrupt Interval /16 */
1930
#define RT0IP_4                (0x0010)       /* RTC Prescale Timer 0 Interrupt Interval /32 */
1931
#define RT0IP_5                (0x0014)       /* RTC Prescale Timer 0 Interrupt Interval /64 */
1932
#define RT0IP_6                (0x0018)       /* RTC Prescale Timer 0 Interrupt Interval /128 */
1933
#define RT0IP_7                (0x001C)       /* RTC Prescale Timer 0 Interrupt Interval /256 */
1934
 
1935
#define RT0PSDIV_0             (0x0000)       /* RTC Prescale Timer 0 Clock Divide /2 */
1936
#define RT0PSDIV_1             (0x0800)       /* RTC Prescale Timer 0 Clock Divide /4 */
1937
#define RT0PSDIV_2             (0x1000)       /* RTC Prescale Timer 0 Clock Divide /8 */
1938
#define RT0PSDIV_3             (0x1800)       /* RTC Prescale Timer 0 Clock Divide /16 */
1939
#define RT0PSDIV_4             (0x2000)       /* RTC Prescale Timer 0 Clock Divide /32 */
1940
#define RT0PSDIV_5             (0x2800)       /* RTC Prescale Timer 0 Clock Divide /64 */
1941
#define RT0PSDIV_6             (0x3000)       /* RTC Prescale Timer 0 Clock Divide /128 */
1942
#define RT0PSDIV_7             (0x3800)       /* RTC Prescale Timer 0 Clock Divide /256 */
1943
 
1944
/* RTCPS1CTL Control Bits */
1945
#define RT1SSEL1               (0x8000)       /* RTC Prescale Timer 1 Source Select Bit 1 */
1946
#define RT1SSEL0               (0x4000)       /* RTC Prescale Timer 1 Source Select Bit 0 */
1947
#define RT1PSDIV2              (0x2000)       /* RTC Prescale Timer 1 Clock Divide Bit: 2 */
1948
#define RT1PSDIV1              (0x1000)       /* RTC Prescale Timer 1 Clock Divide Bit: 1 */
1949
#define RT1PSDIV0              (0x0800)       /* RTC Prescale Timer 1 Clock Divide Bit: 0 */
1950
//#define Reserved          (0x0400)
1951
//#define Reserved          (0x0200)
1952
#define RT1PSHOLD              (0x0100)       /* RTC Prescale Timer 1 Hold */
1953
//#define Reserved          (0x0080)
1954
//#define Reserved          (0x0040)
1955
//#define Reserved          (0x0020)
1956
#define RT1IP2                 (0x0010)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 2 */
1957
#define RT1IP1                 (0x0008)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 1 */
1958
#define RT1IP0                 (0x0004)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 0 */
1959
#define RT1PSIE                (0x0002)       /* RTC Prescale Timer 1 Interrupt Enable Flag */
1960
#define RT1PSIFG               (0x0001)       /* RTC Prescale Timer 1 Interrupt Flag */
1961
 
1962
/* RTCPS1CTL Control Bits */
1963
//#define Reserved          (0x0400)
1964
//#define Reserved          (0x0200)
1965
//#define Reserved          (0x0080)
1966
//#define Reserved          (0x0040)
1967
//#define Reserved          (0x0020)
1968
#define RT1IP2_L               (0x0010)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 2 */
1969
#define RT1IP1_L               (0x0008)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 1 */
1970
#define RT1IP0_L               (0x0004)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 0 */
1971
#define RT1PSIE_L              (0x0002)       /* RTC Prescale Timer 1 Interrupt Enable Flag */
1972
#define RT1PSIFG_L             (0x0001)       /* RTC Prescale Timer 1 Interrupt Flag */
1973
 
1974
/* RTCPS1CTL Control Bits */
1975
#define RT1SSEL1_H             (0x0080)       /* RTC Prescale Timer 1 Source Select Bit 1 */
1976
#define RT1SSEL0_H             (0x0040)       /* RTC Prescale Timer 1 Source Select Bit 0 */
1977
#define RT1PSDIV2_H            (0x0020)       /* RTC Prescale Timer 1 Clock Divide Bit: 2 */
1978
#define RT1PSDIV1_H            (0x0010)       /* RTC Prescale Timer 1 Clock Divide Bit: 1 */
1979
#define RT1PSDIV0_H            (0x0008)       /* RTC Prescale Timer 1 Clock Divide Bit: 0 */
1980
//#define Reserved          (0x0400)
1981
//#define Reserved          (0x0200)
1982
#define RT1PSHOLD_H            (0x0001)       /* RTC Prescale Timer 1 Hold */
1983
//#define Reserved          (0x0080)
1984
//#define Reserved          (0x0040)
1985
//#define Reserved          (0x0020)
1986
 
1987
#define RT1IP_0                (0x0000)       /* RTC Prescale Timer 1 Interrupt Interval /2 */
1988
#define RT1IP_1                (0x0004)       /* RTC Prescale Timer 1 Interrupt Interval /4 */
1989
#define RT1IP_2                (0x0008)       /* RTC Prescale Timer 1 Interrupt Interval /8 */
1990
#define RT1IP_3                (0x000C)       /* RTC Prescale Timer 1 Interrupt Interval /16 */
1991
#define RT1IP_4                (0x0010)       /* RTC Prescale Timer 1 Interrupt Interval /32 */
1992
#define RT1IP_5                (0x0014)       /* RTC Prescale Timer 1 Interrupt Interval /64 */
1993
#define RT1IP_6                (0x0018)       /* RTC Prescale Timer 1 Interrupt Interval /128 */
1994
#define RT1IP_7                (0x001C)       /* RTC Prescale Timer 1 Interrupt Interval /256 */
1995
 
1996
#define RT1PSDIV_0             (0x0000)       /* RTC Prescale Timer 1 Clock Divide /2 */
1997
#define RT1PSDIV_1             (0x0800)       /* RTC Prescale Timer 1 Clock Divide /4 */
1998
#define RT1PSDIV_2             (0x1000)       /* RTC Prescale Timer 1 Clock Divide /8 */
1999
#define RT1PSDIV_3             (0x1800)       /* RTC Prescale Timer 1 Clock Divide /16 */
2000
#define RT1PSDIV_4             (0x2000)       /* RTC Prescale Timer 1 Clock Divide /32 */
2001
#define RT1PSDIV_5             (0x2800)       /* RTC Prescale Timer 1 Clock Divide /64 */
2002
#define RT1PSDIV_6             (0x3000)       /* RTC Prescale Timer 1 Clock Divide /128 */
2003
#define RT1PSDIV_7             (0x3800)       /* RTC Prescale Timer 1 Clock Divide /256 */
2004
 
2005
#define RT1SSEL_0              (0x0000)       /* RTC Prescale Timer Source Select ACLK */
2006
#define RT1SSEL_1              (0x4000)       /* RTC Prescale Timer Source Select SMCLK */
2007
#define RT1SSEL_2              (0x8000)       /* RTC Prescale Timer Source Select RT0PS */
2008
#define RT1SSEL_3              (0xC000)       /* RTC Prescale Timer Source Select RT0PS */
2009
 
2010
/* RTC Definitions */
2011
#define RTCIV_NONE             (0x0000)       /* No Interrupt pending */
2012
#define RTCIV_RTCRDYIFG        (0x0002)       /* RTC ready: RTCRDYIFG */
2013
#define RTCIV_RTCTEVIFG        (0x0004)       /* RTC interval timer: RTCTEVIFG */
2014
#define RTCIV_RTCAIFG          (0x0006)       /* RTC user alarm: RTCAIFG */
2015
#define RTCIV_RT0PSIFG         (0x0008)       /* RTC prescaler 0: RT0PSIFG */
2016
#define RTCIV_RT1PSIFG         (0x000A)       /* RTC prescaler 1: RT1PSIFG */
2017
 
2018
/* Legacy Definitions */
2019
#define RTC_NONE               (0x0000)       /* No Interrupt pending */
2020
#define RTC_RTCRDYIFG          (0x0002)       /* RTC ready: RTCRDYIFG */
2021
#define RTC_RTCTEVIFG          (0x0004)       /* RTC interval timer: RTCTEVIFG */
2022
#define RTC_RTCAIFG            (0x0006)       /* RTC user alarm: RTCAIFG */
2023
#define RTC_RT0PSIFG           (0x0008)       /* RTC prescaler 0: RT0PSIFG */
2024
#define RTC_RT1PSIFG           (0x000A)       /* RTC prescaler 1: RT1PSIFG */
2025
 
2026
/************************************************************
2027
* SFR - Special Function Register Module
2028
************************************************************/
2029
#define __MSP430_HAS_SFR__                    /* Definition to show that Module is available */
2030
#define __MSP430_BASEADDRESS_SFR__ 0x0100
2031
 
2032
SFR_16BIT(SFRIE1);                            /* Interrupt Enable 1 */
2033
SFR_8BIT(SFRIE1_L);                           /* Interrupt Enable 1 */
2034
SFR_8BIT(SFRIE1_H);                           /* Interrupt Enable 1 */
2035
 
2036
/* SFRIE1 Control Bits */
2037
#define WDTIE                  (0x0001)       /* WDT Interrupt Enable */
2038
#define OFIE                   (0x0002)       /* Osc Fault Enable */
2039
//#define Reserved          (0x0004)
2040
#define VMAIE                  (0x0008)       /* Vacant Memory Interrupt Enable */
2041
#define NMIIE                  (0x0010)       /* NMI Interrupt Enable */
2042
#define ACCVIE                 (0x0020)       /* Flash Access Violation Interrupt Enable */
2043
#define JMBINIE                (0x0040)       /* JTAG Mail Box input Interrupt Enable */
2044
#define JMBOUTIE               (0x0080)       /* JTAG Mail Box output Interrupt Enable */
2045
 
2046
#define WDTIE_L                (0x0001)       /* WDT Interrupt Enable */
2047
#define OFIE_L                 (0x0002)       /* Osc Fault Enable */
2048
//#define Reserved          (0x0004)
2049
#define VMAIE_L                (0x0008)       /* Vacant Memory Interrupt Enable */
2050
#define NMIIE_L                (0x0010)       /* NMI Interrupt Enable */
2051
#define ACCVIE_L               (0x0020)       /* Flash Access Violation Interrupt Enable */
2052
#define JMBINIE_L              (0x0040)       /* JTAG Mail Box input Interrupt Enable */
2053
#define JMBOUTIE_L             (0x0080)       /* JTAG Mail Box output Interrupt Enable */
2054
 
2055
//#define Reserved          (0x0004)
2056
 
2057
SFR_16BIT(SFRIFG1);                           /* Interrupt Flag 1 */
2058
SFR_8BIT(SFRIFG1_L);                          /* Interrupt Flag 1 */
2059
SFR_8BIT(SFRIFG1_H);                          /* Interrupt Flag 1 */
2060
/* SFRIFG1 Control Bits */
2061
#define WDTIFG                 (0x0001)       /* WDT Interrupt Flag */
2062
#define OFIFG                  (0x0002)       /* Osc Fault Flag */
2063
//#define Reserved          (0x0004)
2064
#define VMAIFG                 (0x0008)       /* Vacant Memory Interrupt Flag */
2065
#define NMIIFG                 (0x0010)       /* NMI Interrupt Flag */
2066
//#define Reserved          (0x0020)
2067
#define JMBINIFG               (0x0040)       /* JTAG Mail Box input Interrupt Flag */
2068
#define JMBOUTIFG              (0x0080)       /* JTAG Mail Box output Interrupt Flag */
2069
 
2070
#define WDTIFG_L               (0x0001)       /* WDT Interrupt Flag */
2071
#define OFIFG_L                (0x0002)       /* Osc Fault Flag */
2072
//#define Reserved          (0x0004)
2073
#define VMAIFG_L               (0x0008)       /* Vacant Memory Interrupt Flag */
2074
#define NMIIFG_L               (0x0010)       /* NMI Interrupt Flag */
2075
//#define Reserved          (0x0020)
2076
#define JMBINIFG_L             (0x0040)       /* JTAG Mail Box input Interrupt Flag */
2077
#define JMBOUTIFG_L            (0x0080)       /* JTAG Mail Box output Interrupt Flag */
2078
 
2079
//#define Reserved          (0x0004)
2080
//#define Reserved          (0x0020)
2081
 
2082
SFR_16BIT(SFRRPCR);                           /* RESET Pin Control Register */
2083
SFR_8BIT(SFRRPCR_L);                          /* RESET Pin Control Register */
2084
SFR_8BIT(SFRRPCR_H);                          /* RESET Pin Control Register */
2085
/* SFRRPCR Control Bits */
2086
#define SYSNMI                 (0x0001)       /* NMI select */
2087
#define SYSNMIIES              (0x0002)       /* NMI edge select */
2088
#define SYSRSTUP               (0x0004)       /* RESET Pin pull down/up select */
2089
#define SYSRSTRE               (0x0008)       /* RESET Pin Resistor enable */
2090
 
2091
#define SYSNMI_L               (0x0001)       /* NMI select */
2092
#define SYSNMIIES_L            (0x0002)       /* NMI edge select */
2093
#define SYSRSTUP_L             (0x0004)       /* RESET Pin pull down/up select */
2094
#define SYSRSTRE_L             (0x0008)       /* RESET Pin Resistor enable */
2095
 
2096
/************************************************************
2097
* SYS - System Module
2098
************************************************************/
2099
#define __MSP430_HAS_SYS__                    /* Definition to show that Module is available */
2100
#define __MSP430_BASEADDRESS_SYS__ 0x0180
2101
 
2102
SFR_16BIT(SYSCTL);                            /* System control */
2103
SFR_8BIT(SYSCTL_L);                           /* System control */
2104
SFR_8BIT(SYSCTL_H);                           /* System control */
2105
SFR_16BIT(SYSBSLC);                           /* Boot strap configuration area */
2106
SFR_8BIT(SYSBSLC_L);                          /* Boot strap configuration area */
2107
SFR_8BIT(SYSBSLC_H);                          /* Boot strap configuration area */
2108
SFR_16BIT(SYSJMBC);                           /* JTAG mailbox control */
2109
SFR_8BIT(SYSJMBC_L);                          /* JTAG mailbox control */
2110
SFR_8BIT(SYSJMBC_H);                          /* JTAG mailbox control */
2111
SFR_16BIT(SYSJMBI0);                          /* JTAG mailbox input 0 */
2112
SFR_8BIT(SYSJMBI0_L);                         /* JTAG mailbox input 0 */
2113
SFR_8BIT(SYSJMBI0_H);                         /* JTAG mailbox input 0 */
2114
SFR_16BIT(SYSJMBI1);                          /* JTAG mailbox input 1 */
2115
SFR_8BIT(SYSJMBI1_L);                         /* JTAG mailbox input 1 */
2116
SFR_8BIT(SYSJMBI1_H);                         /* JTAG mailbox input 1 */
2117
SFR_16BIT(SYSJMBO0);                          /* JTAG mailbox output 0 */
2118
SFR_8BIT(SYSJMBO0_L);                         /* JTAG mailbox output 0 */
2119
SFR_8BIT(SYSJMBO0_H);                         /* JTAG mailbox output 0 */
2120
SFR_16BIT(SYSJMBO1);                          /* JTAG mailbox output 1 */
2121
SFR_8BIT(SYSJMBO1_L);                         /* JTAG mailbox output 1 */
2122
SFR_8BIT(SYSJMBO1_H);                         /* JTAG mailbox output 1 */
2123
 
2124
SFR_16BIT(SYSUNIV);                           /* User NMI vector generator */
2125
SFR_8BIT(SYSUNIV_L);                          /* User NMI vector generator */
2126
SFR_8BIT(SYSUNIV_H);                          /* User NMI vector generator */
2127
SFR_16BIT(SYSSNIV);                           /* System NMI vector generator */
2128
SFR_8BIT(SYSSNIV_L);                          /* System NMI vector generator */
2129
SFR_8BIT(SYSSNIV_H);                          /* System NMI vector generator */
2130
SFR_16BIT(SYSRSTIV);                          /* Reset vector generator */
2131
SFR_8BIT(SYSRSTIV_L);                         /* Reset vector generator */
2132
SFR_8BIT(SYSRSTIV_H);                         /* Reset vector generator */
2133
 
2134
/* SYSCTL Control Bits */
2135
#define SYSRIVECT              (0x0001)       /* SYS - RAM based interrupt vectors */
2136
//#define RESERVED            (0x0002)  /* SYS - Reserved */
2137
#define SYSPMMPE               (0x0004)       /* SYS - PMM access protect */
2138
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2139
#define SYSBSLIND              (0x0010)       /* SYS - TCK/RST indication detected */
2140
#define SYSJTAGPIN             (0x0020)       /* SYS - Dedicated JTAG pins enabled */
2141
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2142
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2143
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2144
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2145
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2146
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2147
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2148
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2149
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2150
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2151
 
2152
/* SYSCTL Control Bits */
2153
#define SYSRIVECT_L            (0x0001)       /* SYS - RAM based interrupt vectors */
2154
//#define RESERVED            (0x0002)  /* SYS - Reserved */
2155
#define SYSPMMPE_L             (0x0004)       /* SYS - PMM access protect */
2156
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2157
#define SYSBSLIND_L            (0x0010)       /* SYS - TCK/RST indication detected */
2158
#define SYSJTAGPIN_L           (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 RESERVED            (0x0002)  /* SYS - Reserved */
2172
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2173
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2174
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2175
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2176
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2177
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2178
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2179
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2180
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2181
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2182
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2183
 
2184
/* SYSBSLC Control Bits */
2185
#define SYSBSLSIZE0            (0x0001)       /* SYS - BSL Protection Size 0 */
2186
#define SYSBSLSIZE1            (0x0002)       /* SYS - BSL Protection Size 1 */
2187
#define SYSBSLR                (0x0004)       /* SYS - RAM assigned to BSL */
2188
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2189
//#define RESERVED            (0x0010)  /* SYS - Reserved */
2190
//#define RESERVED            (0x0020)  /* 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 SYSBSLOFF              (0x4000)       /* SYS - BSL Memeory disabled */
2200
#define SYSBSLPE               (0x8000)       /* SYS - BSL Memory protection enabled */
2201
 
2202
/* SYSBSLC Control Bits */
2203
#define SYSBSLSIZE0_L          (0x0001)       /* SYS - BSL Protection Size 0 */
2204
#define SYSBSLSIZE1_L          (0x0002)       /* SYS - BSL Protection Size 1 */
2205
#define SYSBSLR_L              (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
 
2218
/* SYSBSLC Control Bits */
2219
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2220
//#define RESERVED            (0x0010)  /* SYS - Reserved */
2221
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2222
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2223
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2224
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2225
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2226
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2227
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2228
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2229
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2230
#define SYSBSLOFF_H            (0x0040)       /* SYS - BSL Memeory disabled */
2231
#define SYSBSLPE_H             (0x0080)       /* SYS - BSL Memory protection enabled */
2232
 
2233
/* SYSJMBC Control Bits */
2234
#define JMBIN0FG               (0x0001)       /* SYS - Incoming JTAG Mailbox 0 Flag */
2235
#define JMBIN1FG               (0x0002)       /* SYS - Incoming JTAG Mailbox 1 Flag */
2236
#define JMBOUT0FG              (0x0004)       /* SYS - Outgoing JTAG Mailbox 0 Flag */
2237
#define JMBOUT1FG              (0x0008)       /* SYS - Outgoing JTAG Mailbox 1 Flag */
2238
#define JMBMODE                (0x0010)       /* SYS - JMB 16/32 Bit Mode */
2239
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2240
#define JMBCLR0OFF             (0x0040)       /* SYS - Incoming JTAG Mailbox 0 Flag auto-clear disalbe */
2241
#define JMBCLR1OFF             (0x0080)       /* SYS - Incoming JTAG Mailbox 1 Flag auto-clear disalbe */
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 RESERVED            (0x4000)  /* SYS - Reserved */
2249
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2250
 
2251
/* SYSJMBC Control Bits */
2252
#define JMBIN0FG_L             (0x0001)       /* SYS - Incoming JTAG Mailbox 0 Flag */
2253
#define JMBIN1FG_L             (0x0002)       /* SYS - Incoming JTAG Mailbox 1 Flag */
2254
#define JMBOUT0FG_L            (0x0004)       /* SYS - Outgoing JTAG Mailbox 0 Flag */
2255
#define JMBOUT1FG_L            (0x0008)       /* SYS - Outgoing JTAG Mailbox 1 Flag */
2256
#define JMBMODE_L              (0x0010)       /* SYS - JMB 16/32 Bit Mode */
2257
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2258
#define JMBCLR0OFF_L           (0x0040)       /* SYS - Incoming JTAG Mailbox 0 Flag auto-clear disalbe */
2259
#define JMBCLR1OFF_L           (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 RESERVED            (0x0020)  /* SYS - Reserved */
2271
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2272
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2273
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2274
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2275
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2276
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2277
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2278
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2279
 
2280
/* SYSUNIV Definitions */
2281
#define SYSUNIV_NONE           (0x0000)       /* No Interrupt pending */
2282
#define SYSUNIV_NMIIFG         (0x0002)       /* SYSUNIV : NMIIFG */
2283
#define SYSUNIV_OFIFG          (0x0004)       /* SYSUNIV : Osc. Fail - OFIFG */
2284
#define SYSUNIV_ACCVIFG        (0x0006)       /* SYSUNIV : Access Violation - ACCVIFG */
2285
#define SYSUNIV_SYSBERRIV      (0x0008)       /* SYSUNIV : Bus Error - SYSBERRIV */
2286
 
2287
/* SYSSNIV Definitions */
2288
#define SYSSNIV_NONE           (0x0000)       /* No Interrupt pending */
2289
#define SYSSNIV_SVMLIFG        (0x0002)       /* SYSSNIV : SVMLIFG */
2290
#define SYSSNIV_SVMHIFG        (0x0004)       /* SYSSNIV : SVMHIFG */
2291
#define SYSSNIV_DLYLIFG        (0x0006)       /* SYSSNIV : DLYLIFG */
2292
#define SYSSNIV_DLYHIFG        (0x0008)       /* SYSSNIV : DLYHIFG */
2293
#define SYSSNIV_VMAIFG         (0x000A)       /* SYSSNIV : VMAIFG */
2294
#define SYSSNIV_JMBINIFG       (0x000C)       /* SYSSNIV : JMBINIFG */
2295
#define SYSSNIV_JMBOUTIFG      (0x000E)       /* SYSSNIV : JMBOUTIFG */
2296
#define SYSSNIV_VLRLIFG        (0x0010)       /* SYSSNIV : VLRLIFG */
2297
#define SYSSNIV_VLRHIFG        (0x0012)       /* SYSSNIV : VLRHIFG */
2298
 
2299
/* SYSRSTIV Definitions */
2300
#define SYSRSTIV_NONE          (0x0000)       /* No Interrupt pending */
2301
#define SYSRSTIV_BOR           (0x0002)       /* SYSRSTIV : BOR */
2302
#define SYSRSTIV_RSTNMI        (0x0004)       /* SYSRSTIV : RST/NMI */
2303
#define SYSRSTIV_DOBOR         (0x0006)       /* SYSRSTIV : Do BOR */
2304
#define SYSRSTIV_LPM5WU        (0x0008)       /* SYSRSTIV : Port LPM5 Wake Up */
2305
#define SYSRSTIV_SECYV         (0x000A)       /* SYSRSTIV : Security violation */
2306
#define SYSRSTIV_SVSL          (0x000C)       /* SYSRSTIV : SVSL */
2307
#define SYSRSTIV_SVSH          (0x000E)       /* SYSRSTIV : SVSH */
2308
#define SYSRSTIV_SVML_OVP      (0x0010)       /* SYSRSTIV : SVML_OVP */
2309
#define SYSRSTIV_SVMH_OVP      (0x0012)       /* SYSRSTIV : SVMH_OVP */
2310
#define SYSRSTIV_DOPOR         (0x0014)       /* SYSRSTIV : Do POR */
2311
#define SYSRSTIV_WDTTO         (0x0016)       /* SYSRSTIV : WDT Time out */
2312
#define SYSRSTIV_WDTKEY        (0x0018)       /* SYSRSTIV : WDTKEY violation */
2313
#define SYSRSTIV_KEYV          (0x001A)       /* SYSRSTIV : Flash Key violation */
2314
#define SYSRSTIV_PLLUL         (0x001C)       /* SYSRSTIV : PLL unlock */
2315
#define SYSRSTIV_PERF          (0x001E)       /* SYSRSTIV : peripheral/config area fetch */
2316
#define SYSRSTIV_PMMKEY        (0x0020)       /* SYSRSTIV : PMMKEY violation */
2317
 
2318
#define SYSRSTIV_PSSKEY        (0x0020)       /* SYSRSTIV : Legacy: PMMKEY violation */
2319
 
2320
/************************************************************
2321
* Timer0_A5
2322
************************************************************/
2323
#define __MSP430_HAS_T0A5__                   /* Definition to show that Module is available */
2324
#define __MSP430_BASEADDRESS_T0A5__ 0x0340
2325
 
2326
SFR_16BIT(TA0CTL);                            /* Timer0_A5 Control */
2327
SFR_16BIT(TA0CCTL0);                          /* Timer0_A5 Capture/Compare Control 0 */
2328
SFR_16BIT(TA0CCTL1);                          /* Timer0_A5 Capture/Compare Control 1 */
2329
SFR_16BIT(TA0CCTL2);                          /* Timer0_A5 Capture/Compare Control 2 */
2330
SFR_16BIT(TA0CCTL3);                          /* Timer0_A5 Capture/Compare Control 3 */
2331
SFR_16BIT(TA0CCTL4);                          /* Timer0_A5 Capture/Compare Control 4 */
2332
SFR_16BIT(TA0R);                              /* Timer0_A5 */
2333
SFR_16BIT(TA0CCR0);                           /* Timer0_A5 Capture/Compare 0 */
2334
SFR_16BIT(TA0CCR1);                           /* Timer0_A5 Capture/Compare 1 */
2335
SFR_16BIT(TA0CCR2);                           /* Timer0_A5 Capture/Compare 2 */
2336
SFR_16BIT(TA0CCR3);                           /* Timer0_A5 Capture/Compare 3 */
2337
SFR_16BIT(TA0CCR4);                           /* Timer0_A5 Capture/Compare 4 */
2338
SFR_16BIT(TA0IV);                             /* Timer0_A5 Interrupt Vector Word */
2339
SFR_16BIT(TA0EX0);                            /* Timer0_A5 Expansion Register 0 */
2340
 
2341
/* TAxCTL Control Bits */
2342
#define TASSEL1                (0x0200)       /* Timer A clock source select 0 */
2343
#define TASSEL0                (0x0100)       /* Timer A clock source select 1 */
2344
#define ID1                    (0x0080)       /* Timer A clock input divider 1 */
2345
#define ID0                    (0x0040)       /* Timer A clock input divider 0 */
2346
#define MC1                    (0x0020)       /* Timer A mode control 1 */
2347
#define MC0                    (0x0010)       /* Timer A mode control 0 */
2348
#define TACLR                  (0x0004)       /* Timer A counter clear */
2349
#define TAIE                   (0x0002)       /* Timer A counter interrupt enable */
2350
#define TAIFG                  (0x0001)       /* Timer A counter interrupt flag */
2351
 
2352
#define MC_0                   (0*0x10u)      /* Timer A mode control: 0 - Stop */
2353
#define MC_1                   (1*0x10u)      /* Timer A mode control: 1 - Up to CCR0 */
2354
#define MC_2                   (2*0x10u)      /* Timer A mode control: 2 - Continous up */
2355
#define MC_3                   (3*0x10u)      /* Timer A mode control: 3 - Up/Down */
2356
#define ID_0                   (0*0x40u)      /* Timer A input divider: 0 - /1 */
2357
#define ID_1                   (1*0x40u)      /* Timer A input divider: 1 - /2 */
2358
#define ID_2                   (2*0x40u)      /* Timer A input divider: 2 - /4 */
2359
#define ID_3                   (3*0x40u)      /* Timer A input divider: 3 - /8 */
2360
#define TASSEL_0               (0*0x100u)     /* Timer A clock source select: 0 - TACLK */
2361
#define TASSEL_1               (1*0x100u)     /* Timer A clock source select: 1 - ACLK  */
2362
#define TASSEL_2               (2*0x100u)     /* Timer A clock source select: 2 - SMCLK */
2363
#define TASSEL_3               (3*0x100u)     /* Timer A clock source select: 3 - INCLK */
2364
#define MC__STOP               (0*0x10u)      /* Timer A mode control: 0 - Stop */
2365
#define MC__UP                 (1*0x10u)      /* Timer A mode control: 1 - Up to CCR0 */
2366
#define MC__CONTINOUS          (2*0x10u)      /* Timer A mode control: 2 - Continous up */
2367
#define MC__UPDOWN             (3*0x10u)      /* Timer A mode control: 3 - Up/Down */
2368
#define ID__1                  (0*0x40u)      /* Timer A input divider: 0 - /1 */
2369
#define ID__2                  (1*0x40u)      /* Timer A input divider: 1 - /2 */
2370
#define ID__4                  (2*0x40u)      /* Timer A input divider: 2 - /4 */
2371
#define ID__8                  (3*0x40u)      /* Timer A input divider: 3 - /8 */
2372
#define TASSEL__TACLK          (0*0x100u)     /* Timer A clock source select: 0 - TACLK */
2373
#define TASSEL__ACLK           (1*0x100u)     /* Timer A clock source select: 1 - ACLK  */
2374
#define TASSEL__SMCLK          (2*0x100u)     /* Timer A clock source select: 2 - SMCLK */
2375
#define TASSEL__INCLK          (3*0x100u)     /* Timer A clock source select: 3 - INCLK */
2376
 
2377
/* TAxCCTLx Control Bits */
2378
#define CM1                    (0x8000)       /* Capture mode 1 */
2379
#define CM0                    (0x4000)       /* Capture mode 0 */
2380
#define CCIS1                  (0x2000)       /* Capture input select 1 */
2381
#define CCIS0                  (0x1000)       /* Capture input select 0 */
2382
#define SCS                    (0x0800)       /* Capture sychronize */
2383
#define SCCI                   (0x0400)       /* Latched capture signal (read) */
2384
#define CAP                    (0x0100)       /* Capture mode: 1 /Compare mode : 0 */
2385
#define OUTMOD2                (0x0080)       /* Output mode 2 */
2386
#define OUTMOD1                (0x0040)       /* Output mode 1 */
2387
#define OUTMOD0                (0x0020)       /* Output mode 0 */
2388
#define CCIE                   (0x0010)       /* Capture/compare interrupt enable */
2389
#define CCI                    (0x0008)       /* Capture input signal (read) */
2390
#define OUT                    (0x0004)       /* PWM Output signal if output mode 0 */
2391
#define COV                    (0x0002)       /* Capture/compare overflow flag */
2392
#define CCIFG                  (0x0001)       /* Capture/compare interrupt flag */
2393
 
2394
#define OUTMOD_0               (0*0x20u)      /* PWM output mode: 0 - output only */
2395
#define OUTMOD_1               (1*0x20u)      /* PWM output mode: 1 - set */
2396
#define OUTMOD_2               (2*0x20u)      /* PWM output mode: 2 - PWM toggle/reset */
2397
#define OUTMOD_3               (3*0x20u)      /* PWM output mode: 3 - PWM set/reset */
2398
#define OUTMOD_4               (4*0x20u)      /* PWM output mode: 4 - toggle */
2399
#define OUTMOD_5               (5*0x20u)      /* PWM output mode: 5 - Reset */
2400
#define OUTMOD_6               (6*0x20u)      /* PWM output mode: 6 - PWM toggle/set */
2401
#define OUTMOD_7               (7*0x20u)      /* PWM output mode: 7 - PWM reset/set */
2402
#define CCIS_0                 (0*0x1000u)    /* Capture input select: 0 - CCIxA */
2403
#define CCIS_1                 (1*0x1000u)    /* Capture input select: 1 - CCIxB */
2404
#define CCIS_2                 (2*0x1000u)    /* Capture input select: 2 - GND */
2405
#define CCIS_3                 (3*0x1000u)    /* Capture input select: 3 - Vcc */
2406
#define CM_0                   (0*0x4000u)    /* Capture mode: 0 - disabled */
2407
#define CM_1                   (1*0x4000u)    /* Capture mode: 1 - pos. edge */
2408
#define CM_2                   (2*0x4000u)    /* Capture mode: 1 - neg. edge */
2409
#define CM_3                   (3*0x4000u)    /* Capture mode: 1 - both edges */
2410
 
2411
/* TAxEX0 Control Bits */
2412
#define TAIDEX0                (0x0001)       /* Timer A Input divider expansion Bit: 0 */
2413
#define TAIDEX1                (0x0002)       /* Timer A Input divider expansion Bit: 1 */
2414
#define TAIDEX2                (0x0004)       /* Timer A Input divider expansion Bit: 2 */
2415
 
2416
#define TAIDEX_0               (0*0x0001u)    /* Timer A Input divider expansion : /1 */
2417
#define TAIDEX_1               (1*0x0001u)    /* Timer A Input divider expansion : /2 */
2418
#define TAIDEX_2               (2*0x0001u)    /* Timer A Input divider expansion : /3 */
2419
#define TAIDEX_3               (3*0x0001u)    /* Timer A Input divider expansion : /4 */
2420
#define TAIDEX_4               (4*0x0001u)    /* Timer A Input divider expansion : /5 */
2421
#define TAIDEX_5               (5*0x0001u)    /* Timer A Input divider expansion : /6 */
2422
#define TAIDEX_6               (6*0x0001u)    /* Timer A Input divider expansion : /7 */
2423
#define TAIDEX_7               (7*0x0001u)    /* Timer A Input divider expansion : /8 */
2424
 
2425
/* T0A5IV Definitions */
2426
#define TA0IV_NONE             (0x0000)       /* No Interrupt pending */
2427
#define TA0IV_TA0CCR1          (0x0002)       /* TA0CCR1_CCIFG */
2428
#define TA0IV_TA0CCR2          (0x0004)       /* TA0CCR2_CCIFG */
2429
#define TA0IV_TA0CCR3          (0x0006)       /* TA0CCR3_CCIFG */
2430
#define TA0IV_TA0CCR4          (0x0008)       /* TA0CCR4_CCIFG */
2431
#define TA0IV_5                (0x000A)       /* Reserved */
2432
#define TA0IV_6                (0x000C)       /* Reserved */
2433
#define TA0IV_TA0IFG           (0x000E)       /* TA0IFG */
2434
 
2435
/************************************************************
2436
* Timer1_A3
2437
************************************************************/
2438
#define __MSP430_HAS_T1A3__                   /* Definition to show that Module is available */
2439
#define __MSP430_BASEADDRESS_T1A3__ 0x0380
2440
 
2441
SFR_16BIT(TA1CTL);                            /* Timer1_A3 Control */
2442
SFR_16BIT(TA1CCTL0);                          /* Timer1_A3 Capture/Compare Control 0 */
2443
SFR_16BIT(TA1CCTL1);                          /* Timer1_A3 Capture/Compare Control 1 */
2444
SFR_16BIT(TA1CCTL2);                          /* Timer1_A3 Capture/Compare Control 2 */
2445
SFR_16BIT(TA1R);                              /* Timer1_A3 */
2446
SFR_16BIT(TA1CCR0);                           /* Timer1_A3 Capture/Compare 0 */
2447
SFR_16BIT(TA1CCR1);                           /* Timer1_A3 Capture/Compare 1 */
2448
SFR_16BIT(TA1CCR2);                           /* Timer1_A3 Capture/Compare 2 */
2449
SFR_16BIT(TA1IV);                             /* Timer1_A3 Interrupt Vector Word */
2450
SFR_16BIT(TA1EX0);                            /* Timer1_A3 Expansion Register 0 */
2451
 
2452
/* Bits are already defined within the Timer0_Ax */
2453
 
2454
/* TA1IV Definitions */
2455
#define TA1IV_NONE             (0x0000)       /* No Interrupt pending */
2456
#define TA1IV_TA1CCR1          (0x0002)       /* TA1CCR1_CCIFG */
2457
#define TA1IV_TA1CCR2          (0x0004)       /* TA1CCR2_CCIFG */
2458
#define TA1IV_3                (0x0006)       /* Reserved */
2459
#define TA1IV_4                (0x0008)       /* Reserved */
2460
#define TA1IV_5                (0x000A)       /* Reserved */
2461
#define TA1IV_6                (0x000C)       /* Reserved */
2462
#define TA1IV_TA1IFG           (0x000E)       /* TA1IFG */
2463
 
2464
/************************************************************
2465
* Timer0_B7
2466
************************************************************/
2467
#define __MSP430_HAS_T0B7__                   /* Definition to show that Module is available */
2468
#define __MSP430_BASEADDRESS_T0B7__ 0x03C0
2469
 
2470
SFR_16BIT(TB0CTL);                            /* Timer0_B7 Control */
2471
SFR_16BIT(TB0CCTL0);                          /* Timer0_B7 Capture/Compare Control 0 */
2472
SFR_16BIT(TB0CCTL1);                          /* Timer0_B7 Capture/Compare Control 1 */
2473
SFR_16BIT(TB0CCTL2);                          /* Timer0_B7 Capture/Compare Control 2 */
2474
SFR_16BIT(TB0CCTL3);                          /* Timer0_B7 Capture/Compare Control 3 */
2475
SFR_16BIT(TB0CCTL4);                          /* Timer0_B7 Capture/Compare Control 4 */
2476
SFR_16BIT(TB0CCTL5);                          /* Timer0_B7 Capture/Compare Control 5 */
2477
SFR_16BIT(TB0CCTL6);                          /* Timer0_B7 Capture/Compare Control 6 */
2478
SFR_16BIT(TB0R);                              /* Timer0_B7 */
2479
SFR_16BIT(TB0CCR0);                           /* Timer0_B7 Capture/Compare 0 */
2480
SFR_16BIT(TB0CCR1);                           /* Timer0_B7 Capture/Compare 1 */
2481
SFR_16BIT(TB0CCR2);                           /* Timer0_B7 Capture/Compare 2 */
2482
SFR_16BIT(TB0CCR3);                           /* Timer0_B7 Capture/Compare 3 */
2483
SFR_16BIT(TB0CCR4);                           /* Timer0_B7 Capture/Compare 4 */
2484
SFR_16BIT(TB0CCR5);                           /* Timer0_B7 Capture/Compare 5 */
2485
SFR_16BIT(TB0CCR6);                           /* Timer0_B7 Capture/Compare 6 */
2486
SFR_16BIT(TB0EX0);                            /* Timer0_B7 Expansion Register 0 */
2487
SFR_16BIT(TB0IV);                             /* Timer0_B7 Interrupt Vector Word */
2488
 
2489
/* Legacy Type Definitions for TimerB */
2490
#define TBCTL                  TB0CTL         /* Timer0_B7 Control */
2491
#define TBCCTL0                TB0CCTL0       /* Timer0_B7 Capture/Compare Control 0 */
2492
#define TBCCTL1                TB0CCTL1       /* Timer0_B7 Capture/Compare Control 1 */
2493
#define TBCCTL2                TB0CCTL2       /* Timer0_B7 Capture/Compare Control 2 */
2494
#define TBCCTL3                TB0CCTL3       /* Timer0_B7 Capture/Compare Control 3 */
2495
#define TBCCTL4                TB0CCTL4       /* Timer0_B7 Capture/Compare Control 4 */
2496
#define TBCCTL5                TB0CCTL5       /* Timer0_B7 Capture/Compare Control 5 */
2497
#define TBCCTL6                TB0CCTL6       /* Timer0_B7 Capture/Compare Control 6 */
2498
#define TBR                    TB0R           /* Timer0_B7 */
2499
#define TBCCR0                 TB0CCR0        /* Timer0_B7 Capture/Compare 0 */
2500
#define TBCCR1                 TB0CCR1        /* Timer0_B7 Capture/Compare 1 */
2501
#define TBCCR2                 TB0CCR2        /* Timer0_B7 Capture/Compare 2 */
2502
#define TBCCR3                 TB0CCR3        /* Timer0_B7 Capture/Compare 3 */
2503
#define TBCCR4                 TB0CCR4        /* Timer0_B7 Capture/Compare 4 */
2504
#define TBCCR5                 TB0CCR5        /* Timer0_B7 Capture/Compare 5 */
2505
#define TBCCR6                 TB0CCR6        /* Timer0_B7 Capture/Compare 6 */
2506
#define TBEX0                  TB0EX0         /* Timer0_B7 Expansion Register 0 */
2507
#define TBIV                   TB0IV          /* Timer0_B7 Interrupt Vector Word */
2508
#define TIMERB1_VECTOR       TIMER0_B1_VECTOR /* Timer0_B7 CC1-6, TB */
2509
#define TIMERB0_VECTOR       TIMER0_B0_VECTOR /* Timer0_B7 CC0 */
2510
 
2511
/* TBxCTL Control Bits */
2512
#define TBCLGRP1               (0x4000)       /* Timer0_B7 Compare latch load group 1 */
2513
#define TBCLGRP0               (0x2000)       /* Timer0_B7 Compare latch load group 0 */
2514
#define CNTL1                  (0x1000)       /* Counter lenght 1 */
2515
#define CNTL0                  (0x0800)       /* Counter lenght 0 */
2516
#define TBSSEL1                (0x0200)       /* Clock source 1 */
2517
#define TBSSEL0                (0x0100)       /* Clock source 0 */
2518
#define TBCLR                  (0x0004)       /* Timer0_B7 counter clear */
2519
#define TBIE                   (0x0002)       /* Timer0_B7 interrupt enable */
2520
#define TBIFG                  (0x0001)       /* Timer0_B7 interrupt flag */
2521
 
2522
#define SHR1                   (0x4000)       /* Timer0_B7 Compare latch load group 1 */
2523
#define SHR0                   (0x2000)       /* Timer0_B7 Compare latch load group 0 */
2524
 
2525
#define TBSSEL_0               (0*0x0100u)    /* Clock Source: TBCLK */
2526
#define TBSSEL_1               (1*0x0100u)    /* Clock Source: ACLK  */
2527
#define TBSSEL_2               (2*0x0100u)    /* Clock Source: SMCLK */
2528
#define TBSSEL_3               (3*0x0100u)    /* Clock Source: INCLK */
2529
#define CNTL_0                 (0*0x0800u)    /* Counter lenght: 16 bit */
2530
#define CNTL_1                 (1*0x0800u)    /* Counter lenght: 12 bit */
2531
#define CNTL_2                 (2*0x0800u)    /* Counter lenght: 10 bit */
2532
#define CNTL_3                 (3*0x0800u)    /* Counter lenght:  8 bit */
2533
#define SHR_0                  (0*0x2000u)    /* Timer0_B7 Group: 0 - individually */
2534
#define SHR_1                  (1*0x2000u)    /* Timer0_B7 Group: 1 - 3 groups (1-2, 3-4, 5-6) */
2535
#define SHR_2                  (2*0x2000u)    /* Timer0_B7 Group: 2 - 2 groups (1-3, 4-6)*/
2536
#define SHR_3                  (3*0x2000u)    /* Timer0_B7 Group: 3 - 1 group (all) */
2537
#define TBCLGRP_0              (0*0x2000u)    /* Timer0_B7 Group: 0 - individually */
2538
#define TBCLGRP_1              (1*0x2000u)    /* Timer0_B7 Group: 1 - 3 groups (1-2, 3-4, 5-6) */
2539
#define TBCLGRP_2              (2*0x2000u)    /* Timer0_B7 Group: 2 - 2 groups (1-3, 4-6)*/
2540
#define TBCLGRP_3              (3*0x2000u)    /* Timer0_B7 Group: 3 - 1 group (all) */
2541
#define TBSSEL__TACLK          (0*0x100u)     /* Timer0_B7 clock source select: 0 - TACLK */
2542
#define TBSSEL__ACLK           (1*0x100u)     /* Timer0_B7 clock source select: 1 - ACLK  */
2543
#define TBSSEL__SMCLK          (2*0x100u)     /* Timer0_B7 clock source select: 2 - SMCLK */
2544
#define TBSSEL__INCLK          (3*0x100u)     /* Timer0_B7 clock source select: 3 - INCLK */
2545
#define CNTL__16               (0*0x0800u)    /* Counter lenght: 16 bit */
2546
#define CNTL__12               (1*0x0800u)    /* Counter lenght: 12 bit */
2547
#define CNTL__10               (2*0x0800u)    /* Counter lenght: 10 bit */
2548
#define CNTL__8                (3*0x0800u)    /* Counter lenght:  8 bit */
2549
 
2550
/* Additional Timer B Control Register bits are defined in Timer A */
2551
/* TBxCCTLx Control Bits */
2552
#define CLLD1                  (0x0400)       /* Compare latch load source 1 */
2553
#define CLLD0                  (0x0200)       /* Compare latch load source 0 */
2554
 
2555
#define SLSHR1                 (0x0400)       /* Compare latch load source 1 */
2556
#define SLSHR0                 (0x0200)       /* Compare latch load source 0 */
2557
 
2558
#define SLSHR_0                (0*0x0200u)    /* Compare latch load sourec : 0 - immediate */
2559
#define SLSHR_1                (1*0x0200u)    /* Compare latch load sourec : 1 - TBR counts to 0 */
2560
#define SLSHR_2                (2*0x0200u)    /* Compare latch load sourec : 2 - up/down */
2561
#define SLSHR_3                (3*0x0200u)    /* Compare latch load sourec : 3 - TBR counts to TBCTL0 */
2562
 
2563
#define CLLD_0                 (0*0x0200u)    /* Compare latch load sourec : 0 - immediate */
2564
#define CLLD_1                 (1*0x0200u)    /* Compare latch load sourec : 1 - TBR counts to 0 */
2565
#define CLLD_2                 (2*0x0200u)    /* Compare latch load sourec : 2 - up/down */
2566
#define CLLD_3                 (3*0x0200u)    /* Compare latch load sourec : 3 - TBR counts to TBCTL0 */
2567
 
2568
/* TBxEX0 Control Bits */
2569
#define TBIDEX0                (0x0001)       /* Timer0_B7 Input divider expansion Bit: 0 */
2570
#define TBIDEX1                (0x0002)       /* Timer0_B7 Input divider expansion Bit: 1 */
2571
#define TBIDEX2                (0x0004)       /* Timer0_B7 Input divider expansion Bit: 2 */
2572
 
2573
#define TBIDEX_0               (0*0x0001u)    /* Timer0_B7 Input divider expansion : /1 */
2574
#define TBIDEX_1               (1*0x0001u)    /* Timer0_B7 Input divider expansion : /2 */
2575
#define TBIDEX_2               (2*0x0001u)    /* Timer0_B7 Input divider expansion : /3 */
2576
#define TBIDEX_3               (3*0x0001u)    /* Timer0_B7 Input divider expansion : /4 */
2577
#define TBIDEX_4               (4*0x0001u)    /* Timer0_B7 Input divider expansion : /5 */
2578
#define TBIDEX_5               (5*0x0001u)    /* Timer0_B7 Input divider expansion : /6 */
2579
#define TBIDEX_6               (6*0x0001u)    /* Timer0_B7 Input divider expansion : /7 */
2580
#define TBIDEX_7               (7*0x0001u)    /* Timer0_B7 Input divider expansion : /8 */
2581
#define TBIDEX__1              (0*0x0001u)    /* Timer0_B7 Input divider expansion : /1 */
2582
#define TBIDEX__2              (1*0x0001u)    /* Timer0_B7 Input divider expansion : /2 */
2583
#define TBIDEX__3              (2*0x0001u)    /* Timer0_B7 Input divider expansion : /3 */
2584
#define TBIDEX__4              (3*0x0001u)    /* Timer0_B7 Input divider expansion : /4 */
2585
#define TBIDEX__5              (4*0x0001u)    /* Timer0_B7 Input divider expansion : /5 */
2586
#define TBIDEX__6              (5*0x0001u)    /* Timer0_B7 Input divider expansion : /6 */
2587
#define TBIDEX__7              (6*0x0001u)    /* Timer0_B7 Input divider expansion : /7 */
2588
#define TBIDEX__8              (7*0x0001u)    /* Timer0_B7 Input divider expansion : /8 */
2589
 
2590
/* TB0IV Definitions */
2591
#define TB0IV_NONE             (0x0000)       /* No Interrupt pending */
2592
#define TB0IV_TB1CCR1          (0x0002)       /* TBCCR1_CCIFG */
2593
#define TB0IV_TB1CCR2          (0x0004)       /* TBCCR2_CCIFG */
2594
#define TB0IV_3                (0x0006)       /* Reserved */
2595
#define TB0IV_4                (0x0008)       /* Reserved */
2596
#define TB0IV_5                (0x000A)       /* Reserved */
2597
#define TB0IV_6                (0x000C)       /* Reserved */
2598
#define TB0IV_TB0IFG           (0x000E)       /* TBIFG */
2599
 
2600
 
2601
/************************************************************
2602
* UNIFIED CLOCK SYSTEM
2603
************************************************************/
2604
#define __MSP430_HAS_UCS__                    /* Definition to show that Module is available */
2605
#define __MSP430_BASEADDRESS_UCS__ 0x0160
2606
 
2607
SFR_16BIT(UCSCTL0);                           /* UCS Control Register 0 */
2608
SFR_8BIT(UCSCTL0_L);                          /* UCS Control Register 0 */
2609
SFR_8BIT(UCSCTL0_H);                          /* UCS Control Register 0 */
2610
SFR_16BIT(UCSCTL1);                           /* UCS Control Register 1 */
2611
SFR_8BIT(UCSCTL1_L);                          /* UCS Control Register 1 */
2612
SFR_8BIT(UCSCTL1_H);                          /* UCS Control Register 1 */
2613
SFR_16BIT(UCSCTL2);                           /* UCS Control Register 2 */
2614
SFR_8BIT(UCSCTL2_L);                          /* UCS Control Register 2 */
2615
SFR_8BIT(UCSCTL2_H);                          /* UCS Control Register 2 */
2616
SFR_16BIT(UCSCTL3);                           /* UCS Control Register 3 */
2617
SFR_8BIT(UCSCTL3_L);                          /* UCS Control Register 3 */
2618
SFR_8BIT(UCSCTL3_H);                          /* UCS Control Register 3 */
2619
SFR_16BIT(UCSCTL4);                           /* UCS Control Register 4 */
2620
SFR_8BIT(UCSCTL4_L);                          /* UCS Control Register 4 */
2621
SFR_8BIT(UCSCTL4_H);                          /* UCS Control Register 4 */
2622
SFR_16BIT(UCSCTL5);                           /* UCS Control Register 5 */
2623
SFR_8BIT(UCSCTL5_L);                          /* UCS Control Register 5 */
2624
SFR_8BIT(UCSCTL5_H);                          /* UCS Control Register 5 */
2625
SFR_16BIT(UCSCTL6);                           /* UCS Control Register 6 */
2626
SFR_8BIT(UCSCTL6_L);                          /* UCS Control Register 6 */
2627
SFR_8BIT(UCSCTL6_H);                          /* UCS Control Register 6 */
2628
SFR_16BIT(UCSCTL7);                           /* UCS Control Register 7 */
2629
SFR_8BIT(UCSCTL7_L);                          /* UCS Control Register 7 */
2630
SFR_8BIT(UCSCTL7_H);                          /* UCS Control Register 7 */
2631
SFR_16BIT(UCSCTL8);                           /* UCS Control Register 8 */
2632
SFR_8BIT(UCSCTL8_L);                          /* UCS Control Register 8 */
2633
SFR_8BIT(UCSCTL8_H);                          /* UCS Control Register 8 */
2634
 
2635
/* UCSCTL0 Control Bits */
2636
//#define RESERVED            (0x0001)    /* RESERVED */
2637
//#define RESERVED            (0x0002)    /* RESERVED */
2638
//#define RESERVED            (0x0004)    /* RESERVED */
2639
#define MOD0                   (0x0008)       /* Modulation Bit Counter Bit : 0 */
2640
#define MOD1                   (0x0010)       /* Modulation Bit Counter Bit : 1 */
2641
#define MOD2                   (0x0020)       /* Modulation Bit Counter Bit : 2 */
2642
#define MOD3                   (0x0040)       /* Modulation Bit Counter Bit : 3 */
2643
#define MOD4                   (0x0080)       /* Modulation Bit Counter Bit : 4 */
2644
#define DCO0                   (0x0100)       /* DCO TAP Bit : 0 */
2645
#define DCO1                   (0x0200)       /* DCO TAP Bit : 1 */
2646
#define DCO2                   (0x0400)       /* DCO TAP Bit : 2 */
2647
#define DCO3                   (0x0800)       /* DCO TAP Bit : 3 */
2648
#define DCO4                   (0x1000)       /* DCO TAP Bit : 4 */
2649
//#define RESERVED            (0x2000)    /* RESERVED */
2650
//#define RESERVED            (0x4000)    /* RESERVED */
2651
//#define RESERVED            (0x8000)    /* RESERVED */
2652
 
2653
/* UCSCTL0 Control Bits */
2654
//#define RESERVED            (0x0001)    /* RESERVED */
2655
//#define RESERVED            (0x0002)    /* RESERVED */
2656
//#define RESERVED            (0x0004)    /* RESERVED */
2657
#define MOD0_L                 (0x0008)       /* Modulation Bit Counter Bit : 0 */
2658
#define MOD1_L                 (0x0010)       /* Modulation Bit Counter Bit : 1 */
2659
#define MOD2_L                 (0x0020)       /* Modulation Bit Counter Bit : 2 */
2660
#define MOD3_L                 (0x0040)       /* Modulation Bit Counter Bit : 3 */
2661
#define MOD4_L                 (0x0080)       /* Modulation Bit Counter Bit : 4 */
2662
//#define RESERVED            (0x2000)    /* RESERVED */
2663
//#define RESERVED            (0x4000)    /* RESERVED */
2664
//#define RESERVED            (0x8000)    /* RESERVED */
2665
 
2666
/* UCSCTL0 Control Bits */
2667
//#define RESERVED            (0x0001)    /* RESERVED */
2668
//#define RESERVED            (0x0002)    /* RESERVED */
2669
//#define RESERVED            (0x0004)    /* RESERVED */
2670
#define DCO0_H                 (0x0001)       /* DCO TAP Bit : 0 */
2671
#define DCO1_H                 (0x0002)       /* DCO TAP Bit : 1 */
2672
#define DCO2_H                 (0x0004)       /* DCO TAP Bit : 2 */
2673
#define DCO3_H                 (0x0008)       /* DCO TAP Bit : 3 */
2674
#define DCO4_H                 (0x0010)       /* DCO TAP Bit : 4 */
2675
//#define RESERVED            (0x2000)    /* RESERVED */
2676
//#define RESERVED            (0x4000)    /* RESERVED */
2677
//#define RESERVED            (0x8000)    /* RESERVED */
2678
 
2679
/* UCSCTL1 Control Bits */
2680
#define DISMOD                 (0x0001)       /* Disable Modulation */
2681
//#define RESERVED            (0x0002)    /* RESERVED */
2682
//#define RESERVED            (0x0004)    /* RESERVED */
2683
//#define RESERVED            (0x0008)    /* RESERVED */
2684
#define DCORSEL0               (0x0010)       /* DCO Freq. Range Select Bit : 0 */
2685
#define DCORSEL1               (0x0020)       /* DCO Freq. Range Select Bit : 1 */
2686
#define DCORSEL2               (0x0040)       /* DCO Freq. Range Select Bit : 2 */
2687
//#define RESERVED            (0x0080)    /* RESERVED */
2688
//#define RESERVED            (0x0100)    /* RESERVED */
2689
//#define RESERVED            (0x0200)    /* RESERVED */
2690
//#define RESERVED            (0x0400)    /* RESERVED */
2691
//#define RESERVED            (0x0800)    /* RESERVED */
2692
//#define RESERVED            (0x1000)    /* RESERVED */
2693
//#define RESERVED            (0x2000)    /* RESERVED */
2694
//#define RESERVED            (0x4000)    /* RESERVED */
2695
//#define RESERVED            (0x8000)    /* RESERVED */
2696
 
2697
/* UCSCTL1 Control Bits */
2698
#define DISMOD_L               (0x0001)       /* Disable Modulation */
2699
//#define RESERVED            (0x0002)    /* RESERVED */
2700
//#define RESERVED            (0x0004)    /* RESERVED */
2701
//#define RESERVED            (0x0008)    /* RESERVED */
2702
#define DCORSEL0_L             (0x0010)       /* DCO Freq. Range Select Bit : 0 */
2703
#define DCORSEL1_L             (0x0020)       /* DCO Freq. Range Select Bit : 1 */
2704
#define DCORSEL2_L             (0x0040)       /* DCO Freq. Range Select Bit : 2 */
2705
//#define RESERVED            (0x0080)    /* RESERVED */
2706
//#define RESERVED            (0x0100)    /* RESERVED */
2707
//#define RESERVED            (0x0200)    /* RESERVED */
2708
//#define RESERVED            (0x0400)    /* RESERVED */
2709
//#define RESERVED            (0x0800)    /* RESERVED */
2710
//#define RESERVED            (0x1000)    /* RESERVED */
2711
//#define RESERVED            (0x2000)    /* RESERVED */
2712
//#define RESERVED            (0x4000)    /* RESERVED */
2713
//#define RESERVED            (0x8000)    /* RESERVED */
2714
 
2715
/* UCSCTL1 Control Bits */
2716
//#define RESERVED            (0x0002)    /* RESERVED */
2717
//#define RESERVED            (0x0004)    /* RESERVED */
2718
//#define RESERVED            (0x0008)    /* RESERVED */
2719
//#define RESERVED            (0x0080)    /* RESERVED */
2720
//#define RESERVED            (0x0100)    /* RESERVED */
2721
//#define RESERVED            (0x0200)    /* RESERVED */
2722
//#define RESERVED            (0x0400)    /* RESERVED */
2723
//#define RESERVED            (0x0800)    /* RESERVED */
2724
//#define RESERVED            (0x1000)    /* RESERVED */
2725
//#define RESERVED            (0x2000)    /* RESERVED */
2726
//#define RESERVED            (0x4000)    /* RESERVED */
2727
//#define RESERVED            (0x8000)    /* RESERVED */
2728
 
2729
#define DCORSEL_0              (0x0000)       /* DCO RSEL 0 */
2730
#define DCORSEL_1              (0x0010)       /* DCO RSEL 1 */
2731
#define DCORSEL_2              (0x0020)       /* DCO RSEL 2 */
2732
#define DCORSEL_3              (0x0030)       /* DCO RSEL 3 */
2733
#define DCORSEL_4              (0x0040)       /* DCO RSEL 4 */
2734
#define DCORSEL_5              (0x0050)       /* DCO RSEL 5 */
2735
#define DCORSEL_6              (0x0060)       /* DCO RSEL 6 */
2736
#define DCORSEL_7              (0x0070)       /* DCO RSEL 7 */
2737
 
2738
/* UCSCTL2 Control Bits */
2739
#define FLLN0                  (0x0001)       /* FLL Multipier Bit : 0 */
2740
#define FLLN1                  (0x0002)       /* FLL Multipier Bit : 1 */
2741
#define FLLN2                  (0x0004)       /* FLL Multipier Bit : 2 */
2742
#define FLLN3                  (0x0008)       /* FLL Multipier Bit : 3 */
2743
#define FLLN4                  (0x0010)       /* FLL Multipier Bit : 4 */
2744
#define FLLN5                  (0x0020)       /* FLL Multipier Bit : 5 */
2745
#define FLLN6                  (0x0040)       /* FLL Multipier Bit : 6 */
2746
#define FLLN7                  (0x0080)       /* FLL Multipier Bit : 7 */
2747
#define FLLN8                  (0x0100)       /* FLL Multipier Bit : 8 */
2748
#define FLLN9                  (0x0200)       /* FLL Multipier Bit : 9 */
2749
//#define RESERVED            (0x0400)    /* RESERVED */
2750
//#define RESERVED            (0x0800)    /* RESERVED */
2751
#define FLLD0                  (0x1000)       /* Loop Divider Bit : 0 */
2752
#define FLLD1                  (0x2000)       /* Loop Divider Bit : 1 */
2753
#define FLLD2                  (0x4000)       /* Loop Divider Bit : 1 */
2754
//#define RESERVED            (0x8000)    /* RESERVED */
2755
 
2756
/* UCSCTL2 Control Bits */
2757
#define FLLN0_L                (0x0001)       /* FLL Multipier Bit : 0 */
2758
#define FLLN1_L                (0x0002)       /* FLL Multipier Bit : 1 */
2759
#define FLLN2_L                (0x0004)       /* FLL Multipier Bit : 2 */
2760
#define FLLN3_L                (0x0008)       /* FLL Multipier Bit : 3 */
2761
#define FLLN4_L                (0x0010)       /* FLL Multipier Bit : 4 */
2762
#define FLLN5_L                (0x0020)       /* FLL Multipier Bit : 5 */
2763
#define FLLN6_L                (0x0040)       /* FLL Multipier Bit : 6 */
2764
#define FLLN7_L                (0x0080)       /* FLL Multipier Bit : 7 */
2765
//#define RESERVED            (0x0400)    /* RESERVED */
2766
//#define RESERVED            (0x0800)    /* RESERVED */
2767
//#define RESERVED            (0x8000)    /* RESERVED */
2768
 
2769
/* UCSCTL2 Control Bits */
2770
#define FLLN8_H                (0x0001)       /* FLL Multipier Bit : 8 */
2771
#define FLLN9_H                (0x0002)       /* FLL Multipier Bit : 9 */
2772
//#define RESERVED            (0x0400)    /* RESERVED */
2773
//#define RESERVED            (0x0800)    /* RESERVED */
2774
#define FLLD0_H                (0x0010)       /* Loop Divider Bit : 0 */
2775
#define FLLD1_H                (0x0020)       /* Loop Divider Bit : 1 */
2776
#define FLLD2_H                (0x0040)       /* Loop Divider Bit : 1 */
2777
//#define RESERVED            (0x8000)    /* RESERVED */
2778
 
2779
#define FLLD_0                 (0x0000)       /* Multiply Selected Loop Freq. 1 */
2780
#define FLLD_1                 (0x1000)       /* Multiply Selected Loop Freq. 2 */
2781
#define FLLD_2                 (0x2000)       /* Multiply Selected Loop Freq. 4 */
2782
#define FLLD_3                 (0x3000)       /* Multiply Selected Loop Freq. 8 */
2783
#define FLLD_4                 (0x4000)       /* Multiply Selected Loop Freq. 16 */
2784
#define FLLD_5                 (0x5000)       /* Multiply Selected Loop Freq. 32 */
2785
#define FLLD_6                 (0x6000)       /* Multiply Selected Loop Freq. 32 */
2786
#define FLLD_7                 (0x7000)       /* Multiply Selected Loop Freq. 32 */
2787
#define FLLD__1                (0x0000)       /* Multiply Selected Loop Freq. By 1 */
2788
#define FLLD__2                (0x1000)       /* Multiply Selected Loop Freq. By 2 */
2789
#define FLLD__4                (0x2000)       /* Multiply Selected Loop Freq. By 4 */
2790
#define FLLD__8                (0x3000)       /* Multiply Selected Loop Freq. By 8 */
2791
#define FLLD__16               (0x4000)       /* Multiply Selected Loop Freq. By 16 */
2792
#define FLLD__32               (0x5000)       /* Multiply Selected Loop Freq. By 32 */
2793
 
2794
/* UCSCTL3 Control Bits */
2795
#define FLLREFDIV0             (0x0001)       /* Reference Divider Bit : 0 */
2796
#define FLLREFDIV1             (0x0002)       /* Reference Divider Bit : 1 */
2797
#define FLLREFDIV2             (0x0004)       /* Reference Divider Bit : 2 */
2798
//#define RESERVED            (0x0008)    /* RESERVED */
2799
#define SELREF0                (0x0010)       /* FLL Reference Clock Select Bit : 0 */
2800
#define SELREF1                (0x0020)       /* FLL Reference Clock Select Bit : 1 */
2801
#define SELREF2                (0x0040)       /* FLL Reference Clock Select Bit : 2 */
2802
//#define RESERVED            (0x0080)    /* RESERVED */
2803
//#define RESERVED            (0x0100)    /* RESERVED */
2804
//#define RESERVED            (0x0200)    /* RESERVED */
2805
//#define RESERVED            (0x0400)    /* RESERVED */
2806
//#define RESERVED            (0x0800)    /* RESERVED */
2807
//#define RESERVED            (0x1000)    /* RESERVED */
2808
//#define RESERVED            (0x2000)    /* RESERVED */
2809
//#define RESERVED            (0x4000)    /* RESERVED */
2810
//#define RESERVED            (0x8000)    /* RESERVED */
2811
 
2812
/* UCSCTL3 Control Bits */
2813
#define FLLREFDIV0_L           (0x0001)       /* Reference Divider Bit : 0 */
2814
#define FLLREFDIV1_L           (0x0002)       /* Reference Divider Bit : 1 */
2815
#define FLLREFDIV2_L           (0x0004)       /* Reference Divider Bit : 2 */
2816
//#define RESERVED            (0x0008)    /* RESERVED */
2817
#define SELREF0_L              (0x0010)       /* FLL Reference Clock Select Bit : 0 */
2818
#define SELREF1_L              (0x0020)       /* FLL Reference Clock Select Bit : 1 */
2819
#define SELREF2_L              (0x0040)       /* FLL Reference Clock Select Bit : 2 */
2820
//#define RESERVED            (0x0080)    /* RESERVED */
2821
//#define RESERVED            (0x0100)    /* RESERVED */
2822
//#define RESERVED            (0x0200)    /* RESERVED */
2823
//#define RESERVED            (0x0400)    /* RESERVED */
2824
//#define RESERVED            (0x0800)    /* RESERVED */
2825
//#define RESERVED            (0x1000)    /* RESERVED */
2826
//#define RESERVED            (0x2000)    /* RESERVED */
2827
//#define RESERVED            (0x4000)    /* RESERVED */
2828
//#define RESERVED            (0x8000)    /* RESERVED */
2829
 
2830
/* UCSCTL3 Control Bits */
2831
//#define RESERVED            (0x0008)    /* RESERVED */
2832
//#define RESERVED            (0x0080)    /* RESERVED */
2833
//#define RESERVED            (0x0100)    /* RESERVED */
2834
//#define RESERVED            (0x0200)    /* RESERVED */
2835
//#define RESERVED            (0x0400)    /* RESERVED */
2836
//#define RESERVED            (0x0800)    /* RESERVED */
2837
//#define RESERVED            (0x1000)    /* RESERVED */
2838
//#define RESERVED            (0x2000)    /* RESERVED */
2839
//#define RESERVED            (0x4000)    /* RESERVED */
2840
//#define RESERVED            (0x8000)    /* RESERVED */
2841
 
2842
#define FLLREFDIV_0            (0x0000)       /* Reference Divider: f(LFCLK)/1 */
2843
#define FLLREFDIV_1            (0x0001)       /* Reference Divider: f(LFCLK)/2 */
2844
#define FLLREFDIV_2            (0x0002)       /* Reference Divider: f(LFCLK)/4 */
2845
#define FLLREFDIV_3            (0x0003)       /* Reference Divider: f(LFCLK)/8 */
2846
#define FLLREFDIV_4            (0x0004)       /* Reference Divider: f(LFCLK)/12 */
2847
#define FLLREFDIV_5            (0x0005)       /* Reference Divider: f(LFCLK)/16 */
2848
#define FLLREFDIV_6            (0x0006)       /* Reference Divider: f(LFCLK)/16 */
2849
#define FLLREFDIV_7            (0x0007)       /* Reference Divider: f(LFCLK)/16 */
2850
#define FLLREFDIV__1           (0x0000)       /* Reference Divider: f(LFCLK)/1 */
2851
#define FLLREFDIV__2           (0x0001)       /* Reference Divider: f(LFCLK)/2 */
2852
#define FLLREFDIV__4           (0x0002)       /* Reference Divider: f(LFCLK)/4 */
2853
#define FLLREFDIV__8           (0x0003)       /* Reference Divider: f(LFCLK)/8 */
2854
#define FLLREFDIV__12          (0x0004)       /* Reference Divider: f(LFCLK)/12 */
2855
#define FLLREFDIV__16          (0x0005)       /* Reference Divider: f(LFCLK)/16 */
2856
#define SELREF_0               (0x0000)       /* FLL Reference Clock Select 0 */
2857
#define SELREF_1               (0x0010)       /* FLL Reference Clock Select 1 */
2858
#define SELREF_2               (0x0020)       /* FLL Reference Clock Select 2 */
2859
#define SELREF_3               (0x0030)       /* FLL Reference Clock Select 3 */
2860
#define SELREF_4               (0x0040)       /* FLL Reference Clock Select 4 */
2861
#define SELREF_5               (0x0050)       /* FLL Reference Clock Select 5 */
2862
#define SELREF_6               (0x0060)       /* FLL Reference Clock Select 6 */
2863
#define SELREF_7               (0x0070)       /* FLL Reference Clock Select 7 */
2864
#define SELREF__XT1CLK         (0x0000)       /* Multiply Selected Loop Freq. By XT1CLK */
2865
#define SELREF__REFOCLK        (0x0020)       /* Multiply Selected Loop Freq. By REFOCLK */
2866
#define SELREF__XT2CLK         (0x0050)       /* Multiply Selected Loop Freq. By XT2CLK */
2867
 
2868
/* UCSCTL4 Control Bits */
2869
#define SELM0                  (0x0001)       /* MCLK Source Select Bit: 0 */
2870
#define SELM1                  (0x0002)       /* MCLK Source Select Bit: 1 */
2871
#define SELM2                  (0x0004)       /* MCLK Source Select Bit: 2 */
2872
//#define RESERVED            (0x0008)    /* RESERVED */
2873
#define SELS0                  (0x0010)       /* SMCLK Source Select Bit: 0 */
2874
#define SELS1                  (0x0020)       /* SMCLK Source Select Bit: 1 */
2875
#define SELS2                  (0x0040)       /* SMCLK Source Select Bit: 2 */
2876
//#define RESERVED            (0x0080)    /* RESERVED */
2877
#define SELA0                  (0x0100)       /* ACLK Source Select Bit: 0 */
2878
#define SELA1                  (0x0200)       /* ACLK Source Select Bit: 1 */
2879
#define SELA2                  (0x0400)       /* ACLK Source Select Bit: 2 */
2880
//#define RESERVED            (0x0800)    /* RESERVED */
2881
//#define RESERVED            (0x1000)    /* RESERVED */
2882
//#define RESERVED            (0x2000)    /* RESERVED */
2883
//#define RESERVED            (0x4000)    /* RESERVED */
2884
//#define RESERVED            (0x8000)    /* RESERVED */
2885
 
2886
/* UCSCTL4 Control Bits */
2887
#define SELM0_L                (0x0001)       /* MCLK Source Select Bit: 0 */
2888
#define SELM1_L                (0x0002)       /* MCLK Source Select Bit: 1 */
2889
#define SELM2_L                (0x0004)       /* MCLK Source Select Bit: 2 */
2890
//#define RESERVED            (0x0008)    /* RESERVED */
2891
#define SELS0_L                (0x0010)       /* SMCLK Source Select Bit: 0 */
2892
#define SELS1_L                (0x0020)       /* SMCLK Source Select Bit: 1 */
2893
#define SELS2_L                (0x0040)       /* SMCLK Source Select Bit: 2 */
2894
//#define RESERVED            (0x0080)    /* RESERVED */
2895
//#define RESERVED            (0x0800)    /* RESERVED */
2896
//#define RESERVED            (0x1000)    /* RESERVED */
2897
//#define RESERVED            (0x2000)    /* RESERVED */
2898
//#define RESERVED            (0x4000)    /* RESERVED */
2899
//#define RESERVED            (0x8000)    /* RESERVED */
2900
 
2901
/* UCSCTL4 Control Bits */
2902
//#define RESERVED            (0x0008)    /* RESERVED */
2903
//#define RESERVED            (0x0080)    /* RESERVED */
2904
#define SELA0_H                (0x0001)       /* ACLK Source Select Bit: 0 */
2905
#define SELA1_H                (0x0002)       /* ACLK Source Select Bit: 1 */
2906
#define SELA2_H                (0x0004)       /* ACLK Source Select Bit: 2 */
2907
//#define RESERVED            (0x0800)    /* RESERVED */
2908
//#define RESERVED            (0x1000)    /* RESERVED */
2909
//#define RESERVED            (0x2000)    /* RESERVED */
2910
//#define RESERVED            (0x4000)    /* RESERVED */
2911
//#define RESERVED            (0x8000)    /* RESERVED */
2912
 
2913
#define SELM_0                 (0x0000)       /* MCLK Source Select 0 */
2914
#define SELM_1                 (0x0001)       /* MCLK Source Select 1 */
2915
#define SELM_2                 (0x0002)       /* MCLK Source Select 2 */
2916
#define SELM_3                 (0x0003)       /* MCLK Source Select 3 */
2917
#define SELM_4                 (0x0004)       /* MCLK Source Select 4 */
2918
#define SELM_5                 (0x0005)       /* MCLK Source Select 5 */
2919
#define SELM_6                 (0x0006)       /* MCLK Source Select 6 */
2920
#define SELM_7                 (0x0007)       /* MCLK Source Select 7 */
2921
#define SELM__XT1CLK           (0x0000)       /* MCLK Source Select XT1CLK */
2922
#define SELM__VLOCLK           (0x0001)       /* MCLK Source Select VLOCLK */
2923
#define SELM__REFOCLK          (0x0002)       /* MCLK Source Select REFOCLK */
2924
#define SELM__DCOCLK           (0x0003)       /* MCLK Source Select DCOCLK */
2925
#define SELM__DCOCLKDIV        (0x0004)       /* MCLK Source Select DCOCLKDIV */
2926
#define SELM__XT2CLK           (0x0005)       /* MCLK Source Select XT2CLK */
2927
 
2928
#define SELS_0                 (0x0000)       /* SMCLK Source Select 0 */
2929
#define SELS_1                 (0x0010)       /* SMCLK Source Select 1 */
2930
#define SELS_2                 (0x0020)       /* SMCLK Source Select 2 */
2931
#define SELS_3                 (0x0030)       /* SMCLK Source Select 3 */
2932
#define SELS_4                 (0x0040)       /* SMCLK Source Select 4 */
2933
#define SELS_5                 (0x0050)       /* SMCLK Source Select 5 */
2934
#define SELS_6                 (0x0060)       /* SMCLK Source Select 6 */
2935
#define SELS_7                 (0x0070)       /* SMCLK Source Select 7 */
2936
#define SELS__XT1CLK           (0x0000)       /* SMCLK Source Select XT1CLK */
2937
#define SELS__VLOCLK           (0x0010)       /* SMCLK Source Select VLOCLK */
2938
#define SELS__REFOCLK          (0x0020)       /* SMCLK Source Select REFOCLK */
2939
#define SELS__DCOCLK           (0x0030)       /* SMCLK Source Select DCOCLK */
2940
#define SELS__DCOCLKDIV        (0x0040)       /* SMCLK Source Select DCOCLKDIV */
2941
#define SELS__XT2CLK           (0x0050)       /* SMCLK Source Select XT2CLK */
2942
 
2943
#define SELA_0                 (0x0000)       /* ACLK Source Select 0 */
2944
#define SELA_1                 (0x0100)       /* ACLK Source Select 1 */
2945
#define SELA_2                 (0x0200)       /* ACLK Source Select 2 */
2946
#define SELA_3                 (0x0300)       /* ACLK Source Select 3 */
2947
#define SELA_4                 (0x0400)       /* ACLK Source Select 4 */
2948
#define SELA_5                 (0x0500)       /* ACLK Source Select 5 */
2949
#define SELA_6                 (0x0600)       /* ACLK Source Select 6 */
2950
#define SELA_7                 (0x0700)       /* ACLK Source Select 7 */
2951
#define SELA__XT1CLK           (0x0000)       /* ACLK Source Select XT1CLK */
2952
#define SELA__VLOCLK           (0x0100)       /* ACLK Source Select VLOCLK */
2953
#define SELA__REFOCLK          (0x0200)       /* ACLK Source Select REFOCLK */
2954
#define SELA__DCOCLK           (0x0300)       /* ACLK Source Select DCOCLK */
2955
#define SELA__DCOCLKDIV        (0x0400)       /* ACLK Source Select DCOCLKDIV */
2956
#define SELA__XT2CLK           (0x0500)       /* ACLK Source Select XT2CLK */
2957
 
2958
/* UCSCTL5 Control Bits */
2959
#define DIVM0                  (0x0001)       /* MCLK Divider Bit: 0 */
2960
#define DIVM1                  (0x0002)       /* MCLK Divider Bit: 1 */
2961
#define DIVM2                  (0x0004)       /* MCLK Divider Bit: 2 */
2962
//#define RESERVED            (0x0008)    /* RESERVED */
2963
#define DIVS0                  (0x0010)       /* SMCLK Divider Bit: 0 */
2964
#define DIVS1                  (0x0020)       /* SMCLK Divider Bit: 1 */
2965
#define DIVS2                  (0x0040)       /* SMCLK Divider Bit: 2 */
2966
//#define RESERVED            (0x0080)    /* RESERVED */
2967
#define DIVA0                  (0x0100)       /* ACLK Divider Bit: 0 */
2968
#define DIVA1                  (0x0200)       /* ACLK Divider Bit: 1 */
2969
#define DIVA2                  (0x0400)       /* ACLK Divider Bit: 2 */
2970
//#define RESERVED            (0x0800)    /* RESERVED */
2971
#define DIVPA0                 (0x1000)       /* ACLK from Pin Divider Bit: 0 */
2972
#define DIVPA1                 (0x2000)       /* ACLK from Pin Divider Bit: 1 */
2973
#define DIVPA2                 (0x4000)       /* ACLK from Pin Divider Bit: 2 */
2974
//#define RESERVED            (0x8000)    /* RESERVED */
2975
 
2976
/* UCSCTL5 Control Bits */
2977
#define DIVM0_L                (0x0001)       /* MCLK Divider Bit: 0 */
2978
#define DIVM1_L                (0x0002)       /* MCLK Divider Bit: 1 */
2979
#define DIVM2_L                (0x0004)       /* MCLK Divider Bit: 2 */
2980
//#define RESERVED            (0x0008)    /* RESERVED */
2981
#define DIVS0_L                (0x0010)       /* SMCLK Divider Bit: 0 */
2982
#define DIVS1_L                (0x0020)       /* SMCLK Divider Bit: 1 */
2983
#define DIVS2_L                (0x0040)       /* SMCLK Divider Bit: 2 */
2984
//#define RESERVED            (0x0080)    /* RESERVED */
2985
//#define RESERVED            (0x0800)    /* RESERVED */
2986
//#define RESERVED            (0x8000)    /* RESERVED */
2987
 
2988
/* UCSCTL5 Control Bits */
2989
//#define RESERVED            (0x0008)    /* RESERVED */
2990
//#define RESERVED            (0x0080)    /* RESERVED */
2991
#define DIVA0_H                (0x0001)       /* ACLK Divider Bit: 0 */
2992
#define DIVA1_H                (0x0002)       /* ACLK Divider Bit: 1 */
2993
#define DIVA2_H                (0x0004)       /* ACLK Divider Bit: 2 */
2994
//#define RESERVED            (0x0800)    /* RESERVED */
2995
#define DIVPA0_H               (0x0010)       /* ACLK from Pin Divider Bit: 0 */
2996
#define DIVPA1_H               (0x0020)       /* ACLK from Pin Divider Bit: 1 */
2997
#define DIVPA2_H               (0x0040)       /* ACLK from Pin Divider Bit: 2 */
2998
//#define RESERVED            (0x8000)    /* RESERVED */
2999
 
3000
#define DIVM_0                 (0x0000)       /* MCLK Source Divider 0 */
3001
#define DIVM_1                 (0x0001)       /* MCLK Source Divider 1 */
3002
#define DIVM_2                 (0x0002)       /* MCLK Source Divider 2 */
3003
#define DIVM_3                 (0x0003)       /* MCLK Source Divider 3 */
3004
#define DIVM_4                 (0x0004)       /* MCLK Source Divider 4 */
3005
#define DIVM_5                 (0x0005)       /* MCLK Source Divider 5 */
3006
#define DIVM_6                 (0x0006)       /* MCLK Source Divider 6 */
3007
#define DIVM_7                 (0x0007)       /* MCLK Source Divider 7 */
3008
#define DIVM__1                (0x0000)       /* MCLK Source Divider f(MCLK)/1 */
3009
#define DIVM__2                (0x0001)       /* MCLK Source Divider f(MCLK)/2 */
3010
#define DIVM__4                (0x0002)       /* MCLK Source Divider f(MCLK)/4 */
3011
#define DIVM__8                (0x0003)       /* MCLK Source Divider f(MCLK)/8 */
3012
#define DIVM__16               (0x0004)       /* MCLK Source Divider f(MCLK)/16 */
3013
#define DIVM__32               (0x0005)       /* MCLK Source Divider f(MCLK)/32 */
3014
 
3015
#define DIVS_0                 (0x0000)       /* SMCLK Source Divider 0 */
3016
#define DIVS_1                 (0x0010)       /* SMCLK Source Divider 1 */
3017
#define DIVS_2                 (0x0020)       /* SMCLK Source Divider 2 */
3018
#define DIVS_3                 (0x0030)       /* SMCLK Source Divider 3 */
3019
#define DIVS_4                 (0x0040)       /* SMCLK Source Divider 4 */
3020
#define DIVS_5                 (0x0050)       /* SMCLK Source Divider 5 */
3021
#define DIVS_6                 (0x0060)       /* SMCLK Source Divider 6 */
3022
#define DIVS_7                 (0x0070)       /* SMCLK Source Divider 7 */
3023
#define DIVS__1                (0x0000)       /* SMCLK Source Divider f(SMCLK)/1 */
3024
#define DIVS__2                (0x0010)       /* SMCLK Source Divider f(SMCLK)/2 */
3025
#define DIVS__4                (0x0020)       /* SMCLK Source Divider f(SMCLK)/4 */
3026
#define DIVS__8                (0x0030)       /* SMCLK Source Divider f(SMCLK)/8 */
3027
#define DIVS__16               (0x0040)       /* SMCLK Source Divider f(SMCLK)/16 */
3028
#define DIVS__32               (0x0050)       /* SMCLK Source Divider f(SMCLK)/32 */
3029
 
3030
#define DIVA_0                 (0x0000)       /* ACLK Source Divider 0 */
3031
#define DIVA_1                 (0x0100)       /* ACLK Source Divider 1 */
3032
#define DIVA_2                 (0x0200)       /* ACLK Source Divider 2 */
3033
#define DIVA_3                 (0x0300)       /* ACLK Source Divider 3 */
3034
#define DIVA_4                 (0x0400)       /* ACLK Source Divider 4 */
3035
#define DIVA_5                 (0x0500)       /* ACLK Source Divider 5 */
3036
#define DIVA_6                 (0x0600)       /* ACLK Source Divider 6 */
3037
#define DIVA_7                 (0x0700)       /* ACLK Source Divider 7 */
3038
#define DIVA__1                (0x0000)       /* ACLK Source Divider f(ACLK)/1 */
3039
#define DIVA__2                (0x0100)       /* ACLK Source Divider f(ACLK)/2 */
3040
#define DIVA__4                (0x0200)       /* ACLK Source Divider f(ACLK)/4 */
3041
#define DIVA__8                (0x0300)       /* ACLK Source Divider f(ACLK)/8 */
3042
#define DIVA__16               (0x0400)       /* ACLK Source Divider f(ACLK)/16 */
3043
#define DIVA__32               (0x0500)       /* ACLK Source Divider f(ACLK)/32 */
3044
 
3045
#define DIVPA_0                (0x0000)       /* ACLK from Pin Source Divider 0 */
3046
#define DIVPA_1                (0x1000)       /* ACLK from Pin Source Divider 1 */
3047
#define DIVPA_2                (0x2000)       /* ACLK from Pin Source Divider 2 */
3048
#define DIVPA_3                (0x3000)       /* ACLK from Pin Source Divider 3 */
3049
#define DIVPA_4                (0x4000)       /* ACLK from Pin Source Divider 4 */
3050
#define DIVPA_5                (0x5000)       /* ACLK from Pin Source Divider 5 */
3051
#define DIVPA_6                (0x6000)       /* ACLK from Pin Source Divider 6 */
3052
#define DIVPA_7                (0x7000)       /* ACLK from Pin Source Divider 7 */
3053
#define DIVPA__1               (0x0000)       /* ACLK from Pin Source Divider f(ACLK)/1 */
3054
#define DIVPA__2               (0x1000)       /* ACLK from Pin Source Divider f(ACLK)/2 */
3055
#define DIVPA__4               (0x2000)       /* ACLK from Pin Source Divider f(ACLK)/4 */
3056
#define DIVPA__8               (0x3000)       /* ACLK from Pin Source Divider f(ACLK)/8 */
3057
#define DIVPA__16              (0x4000)       /* ACLK from Pin Source Divider f(ACLK)/16 */
3058
#define DIVPA__32              (0x5000)       /* ACLK from Pin Source Divider f(ACLK)/32 */
3059
 
3060
/* UCSCTL6 Control Bits */
3061
#define XT1OFF                 (0x0001)       /* High Frequency Oscillator 1 (XT1) disable */
3062
#define SMCLKOFF               (0x0002)       /* SMCLK Off */
3063
#define XCAP0                  (0x0004)       /* XIN/XOUT Cap Bit: 0 */
3064
#define XCAP1                  (0x0008)       /* XIN/XOUT Cap Bit: 1 */
3065
#define XT1BYPASS              (0x0010)       /* XT1 bypass mode : 0: internal 1:sourced from external pin */
3066
#define XTS                    (0x0020)       /* 1: Selects high-freq. oscillator */
3067
#define XT1DRIVE0              (0x0040)       /* XT1 Drive Level mode Bit 0 */
3068
#define XT1DRIVE1              (0x0080)       /* XT1 Drive Level mode Bit 1 */
3069
#define XT2OFF                 (0x0100)       /* High Frequency Oscillator 2 (XT2) disable */
3070
//#define RESERVED            (0x0200)    /* RESERVED */
3071
//#define RESERVED            (0x0400)    /* RESERVED */
3072
//#define RESERVED            (0x0800)    /* RESERVED */
3073
#define XT2BYPASS              (0x1000)       /* XT2 bypass mode : 0: internal 1:sourced from external pin */
3074
//#define RESERVED            (0x2000)    /* RESERVED */
3075
#define XT2DRIVE0              (0x4000)       /* XT2 Drive Level mode Bit 0 */
3076
#define XT2DRIVE1              (0x8000)       /* XT2 Drive Level mode Bit 1 */
3077
 
3078
/* UCSCTL6 Control Bits */
3079
#define XT1OFF_L               (0x0001)       /* High Frequency Oscillator 1 (XT1) disable */
3080
#define SMCLKOFF_L             (0x0002)       /* SMCLK Off */
3081
#define XCAP0_L                (0x0004)       /* XIN/XOUT Cap Bit: 0 */
3082
#define XCAP1_L                (0x0008)       /* XIN/XOUT Cap Bit: 1 */
3083
#define XT1BYPASS_L            (0x0010)       /* XT1 bypass mode : 0: internal 1:sourced from external pin */
3084
#define XTS_L                  (0x0020)       /* 1: Selects high-freq. oscillator */
3085
#define XT1DRIVE0_L            (0x0040)       /* XT1 Drive Level mode Bit 0 */
3086
#define XT1DRIVE1_L            (0x0080)       /* XT1 Drive Level mode Bit 1 */
3087
//#define RESERVED            (0x0200)    /* RESERVED */
3088
//#define RESERVED            (0x0400)    /* RESERVED */
3089
//#define RESERVED            (0x0800)    /* RESERVED */
3090
//#define RESERVED            (0x2000)    /* RESERVED */
3091
 
3092
/* UCSCTL6 Control Bits */
3093
#define XT2OFF_H               (0x0001)       /* High Frequency Oscillator 2 (XT2) disable */
3094
//#define RESERVED            (0x0200)    /* RESERVED */
3095
//#define RESERVED            (0x0400)    /* RESERVED */
3096
//#define RESERVED            (0x0800)    /* RESERVED */
3097
#define XT2BYPASS_H            (0x0010)       /* XT2 bypass mode : 0: internal 1:sourced from external pin */
3098
//#define RESERVED            (0x2000)    /* RESERVED */
3099
#define XT2DRIVE0_H            (0x0040)       /* XT2 Drive Level mode Bit 0 */
3100
#define XT2DRIVE1_H            (0x0080)       /* XT2 Drive Level mode Bit 1 */
3101
 
3102
#define XCAP_0                 (0x0000)       /* XIN/XOUT Cap 0 */
3103
#define XCAP_1                 (0x0004)       /* XIN/XOUT Cap 1 */
3104
#define XCAP_2                 (0x0008)       /* XIN/XOUT Cap 2 */
3105
#define XCAP_3                 (0x000C)       /* XIN/XOUT Cap 3 */
3106
#define XT1DRIVE_0             (0x0000)       /* XT1 Drive Level mode: 0 */
3107
#define XT1DRIVE_1             (0x0040)       /* XT1 Drive Level mode: 1 */
3108
#define XT1DRIVE_2             (0x0080)       /* XT1 Drive Level mode: 2 */
3109
#define XT1DRIVE_3             (0x00C0)       /* XT1 Drive Level mode: 3 */
3110
#define XT2DRIVE_0             (0x0000)       /* XT2 Drive Level mode: 0 */
3111
#define XT2DRIVE_1             (0x4000)       /* XT2 Drive Level mode: 1 */
3112
#define XT2DRIVE_2             (0x8000)       /* XT2 Drive Level mode: 2 */
3113
#define XT2DRIVE_3             (0xC000)       /* XT2 Drive Level mode: 3 */
3114
 
3115
/* UCSCTL7 Control Bits */
3116
#define DCOFFG                 (0x0001)       /* DCO Fault Flag */
3117
#define XT1LFOFFG              (0x0002)       /* XT1 Low Frequency Oscillator Fault Flag */
3118
#define XT1HFOFFG              (0x0004)       /* XT1 High Frequency Oscillator 1 Fault Flag */
3119
#define XT2OFFG                (0x0008)       /* High Frequency Oscillator 2 Fault Flag */
3120
//#define RESERVED            (0x0010)    /* RESERVED */
3121
//#define RESERVED            (0x0020)    /* RESERVED */
3122
//#define RESERVED            (0x0040)    /* RESERVED */
3123
//#define RESERVED            (0x0080)    /* RESERVED */
3124
//#define RESERVED            (0x0100)    /* RESERVED */
3125
//#define RESERVED            (0x0200)    /* RESERVED */
3126
//#define RESERVED            (0x0400)    /* RESERVED */
3127
//#define RESERVED            (0x0800)    /* RESERVED */
3128
//#define RESERVED            (0x1000)    /* RESERVED */
3129
//#define RESERVED            (0x2000)    /* RESERVED */
3130
//#define RESERVED            (0x4000)    /* RESERVED */
3131
//#define RESERVED            (0x8000)    /* RESERVED */
3132
 
3133
/* UCSCTL7 Control Bits */
3134
#define DCOFFG_L               (0x0001)       /* DCO Fault Flag */
3135
#define XT1LFOFFG_L            (0x0002)       /* XT1 Low Frequency Oscillator Fault Flag */
3136
#define XT1HFOFFG_L            (0x0004)       /* XT1 High Frequency Oscillator 1 Fault Flag */
3137
#define XT2OFFG_L              (0x0008)       /* High Frequency Oscillator 2 Fault Flag */
3138
//#define RESERVED            (0x0010)    /* RESERVED */
3139
//#define RESERVED            (0x0020)    /* RESERVED */
3140
//#define RESERVED            (0x0040)    /* RESERVED */
3141
//#define RESERVED            (0x0080)    /* RESERVED */
3142
//#define RESERVED            (0x0100)    /* RESERVED */
3143
//#define RESERVED            (0x0200)    /* RESERVED */
3144
//#define RESERVED            (0x0400)    /* RESERVED */
3145
//#define RESERVED            (0x0800)    /* RESERVED */
3146
//#define RESERVED            (0x1000)    /* RESERVED */
3147
//#define RESERVED            (0x2000)    /* RESERVED */
3148
//#define RESERVED            (0x4000)    /* RESERVED */
3149
//#define RESERVED            (0x8000)    /* RESERVED */
3150
 
3151
/* UCSCTL7 Control Bits */
3152
//#define RESERVED            (0x0010)    /* RESERVED */
3153
//#define RESERVED            (0x0020)    /* RESERVED */
3154
//#define RESERVED            (0x0040)    /* RESERVED */
3155
//#define RESERVED            (0x0080)    /* RESERVED */
3156
//#define RESERVED            (0x0100)    /* RESERVED */
3157
//#define RESERVED            (0x0200)    /* RESERVED */
3158
//#define RESERVED            (0x0400)    /* RESERVED */
3159
//#define RESERVED            (0x0800)    /* RESERVED */
3160
//#define RESERVED            (0x1000)    /* RESERVED */
3161
//#define RESERVED            (0x2000)    /* RESERVED */
3162
//#define RESERVED            (0x4000)    /* RESERVED */
3163
//#define RESERVED            (0x8000)    /* RESERVED */
3164
 
3165
/* UCSCTL8 Control Bits */
3166
#define ACLKREQEN              (0x0001)       /* ACLK Clock Request Enable */
3167
#define MCLKREQEN              (0x0002)       /* MCLK Clock Request Enable */
3168
#define SMCLKREQEN             (0x0004)       /* SMCLK Clock Request Enable */
3169
#define MODOSCREQEN            (0x0008)       /* MODOSC Clock Request Enable */
3170
//#define RESERVED            (0x0010)    /* RESERVED */
3171
//#define RESERVED            (0x0020)    /* RESERVED */
3172
//#define RESERVED            (0x0040)    /* RESERVED */
3173
//#define RESERVED            (0x0080)    /* RESERVED */
3174
//#define RESERVED            (0x0100)    /* RESERVED */
3175
//#define RESERVED            (0x0200)    /* RESERVED */
3176
//#define RESERVED            (0x0400)    /* RESERVED */
3177
//#define RESERVED            (0x0800)    /* RESERVED */
3178
//#define RESERVED            (0x1000)    /* RESERVED */
3179
//#define RESERVED            (0x2000)    /* RESERVED */
3180
//#define RESERVED            (0x4000)    /* RESERVED */
3181
//#define RESERVED            (0x8000)    /* RESERVED */
3182
 
3183
/* UCSCTL8 Control Bits */
3184
#define ACLKREQEN_L            (0x0001)       /* ACLK Clock Request Enable */
3185
#define MCLKREQEN_L            (0x0002)       /* MCLK Clock Request Enable */
3186
#define SMCLKREQEN_L           (0x0004)       /* SMCLK Clock Request Enable */
3187
#define MODOSCREQEN_L          (0x0008)       /* MODOSC Clock Request Enable */
3188
//#define RESERVED            (0x0010)    /* RESERVED */
3189
//#define RESERVED            (0x0020)    /* RESERVED */
3190
//#define RESERVED            (0x0040)    /* RESERVED */
3191
//#define RESERVED            (0x0080)    /* RESERVED */
3192
//#define RESERVED            (0x0100)    /* RESERVED */
3193
//#define RESERVED            (0x0200)    /* RESERVED */
3194
//#define RESERVED            (0x0400)    /* RESERVED */
3195
//#define RESERVED            (0x0800)    /* RESERVED */
3196
//#define RESERVED            (0x1000)    /* RESERVED */
3197
//#define RESERVED            (0x2000)    /* RESERVED */
3198
//#define RESERVED            (0x4000)    /* RESERVED */
3199
//#define RESERVED            (0x8000)    /* RESERVED */
3200
 
3201
/* UCSCTL8 Control Bits */
3202
//#define RESERVED            (0x0010)    /* RESERVED */
3203
//#define RESERVED            (0x0020)    /* RESERVED */
3204
//#define RESERVED            (0x0040)    /* RESERVED */
3205
//#define RESERVED            (0x0080)    /* RESERVED */
3206
//#define RESERVED            (0x0100)    /* RESERVED */
3207
//#define RESERVED            (0x0200)    /* RESERVED */
3208
//#define RESERVED            (0x0400)    /* RESERVED */
3209
//#define RESERVED            (0x0800)    /* RESERVED */
3210
//#define RESERVED            (0x1000)    /* RESERVED */
3211
//#define RESERVED            (0x2000)    /* RESERVED */
3212
//#define RESERVED            (0x4000)    /* RESERVED */
3213
//#define RESERVED            (0x8000)    /* RESERVED */
3214
 
3215
/************************************************************
3216
* USCI A0
3217
************************************************************/
3218
#define __MSP430_HAS_USCI_A0__                /* Definition to show that Module is available */
3219
#define __MSP430_BASEADDRESS_USCI_A0__ 0x05C0
3220
 
3221
SFR_16BIT(UCA0CTLW0);                         /* USCI A0 Control Word Register 0 */
3222
SFR_8BIT(UCA0CTLW0_L);                        /* USCI A0 Control Word Register 0 */
3223
SFR_8BIT(UCA0CTLW0_H);                        /* USCI A0 Control Word Register 0 */
3224
#define UCA0CTL1               UCA0CTLW0_L    /* USCI A0 Control Register 1 */
3225
#define UCA0CTL0               UCA0CTLW0_H    /* USCI A0 Control Register 0 */
3226
SFR_16BIT(UCA0BRW);                           /* USCI A0 Baud Word Rate 0 */
3227
SFR_8BIT(UCA0BRW_L);                          /* USCI A0 Baud Word Rate 0 */
3228
SFR_8BIT(UCA0BRW_H);                          /* USCI A0 Baud Word Rate 0 */
3229
#define UCA0BR0                UCA0BRW_L      /* USCI A0 Baud Rate 0 */
3230
#define UCA0BR1                UCA0BRW_H      /* USCI A0 Baud Rate 1 */
3231
SFR_8BIT(UCA0MCTL);                           /* USCI A0 Modulation Control */
3232
SFR_8BIT(UCA0STAT);                           /* USCI A0 Status Register */
3233
SFR_8BIT(UCA0RXBUF);                          /* USCI A0 Receive Buffer */
3234
SFR_8BIT(UCA0TXBUF);                          /* USCI A0 Transmit Buffer */
3235
SFR_8BIT(UCA0ABCTL);                          /* USCI A0 LIN Control */
3236
SFR_16BIT(UCA0IRCTL);                         /* USCI A0 IrDA Transmit Control */
3237
SFR_8BIT(UCA0IRCTL_L);                        /* USCI A0 IrDA Transmit Control */
3238
SFR_8BIT(UCA0IRCTL_H);                        /* USCI A0 IrDA Transmit Control */
3239
#define UCA0IRTCTL             UCA0IRCTL_L    /* USCI A0 IrDA Transmit Control */
3240
#define UCA0IRRCTL             UCA0IRCTL_H    /* USCI A0 IrDA Receive Control */
3241
SFR_16BIT(UCA0ICTL);                          /* USCI A0 Interrupt Enable Register */
3242
SFR_8BIT(UCA0ICTL_L);                         /* USCI A0 Interrupt Enable Register */
3243
SFR_8BIT(UCA0ICTL_H);                         /* USCI A0 Interrupt Enable Register */
3244
#define UCA0IE                 UCA0ICTL_L     /* USCI A0 Interrupt Enable Register */
3245
#define UCA0IFG                UCA0ICTL_H     /* USCI A0 Interrupt Flags Register */
3246
SFR_16BIT(UCA0IV);                            /* USCI A0 Interrupt Vector Register */
3247
 
3248
 
3249
/************************************************************
3250
* USCI B0
3251
************************************************************/
3252
#define __MSP430_HAS_USCI_B0__                /* Definition to show that Module is available */
3253
#define __MSP430_BASEADDRESS_USCI_B0__ 0x05E0
3254
 
3255
 
3256
SFR_16BIT(UCB0CTLW0);                         /* USCI B0 Control Word Register 0 */
3257
SFR_8BIT(UCB0CTLW0_L);                        /* USCI B0 Control Word Register 0 */
3258
SFR_8BIT(UCB0CTLW0_H);                        /* USCI B0 Control Word Register 0 */
3259
#define UCB0CTL1               UCB0CTLW0_L    /* USCI B0 Control Register 1 */
3260
#define UCB0CTL0               UCB0CTLW0_H    /* USCI B0 Control Register 0 */
3261
SFR_16BIT(UCB0BRW);                           /* USCI B0 Baud Word Rate 0 */
3262
SFR_8BIT(UCB0BRW_L);                          /* USCI B0 Baud Word Rate 0 */
3263
SFR_8BIT(UCB0BRW_H);                          /* USCI B0 Baud Word Rate 0 */
3264
#define UCB0BR0                UCB0BRW_L      /* USCI B0 Baud Rate 0 */
3265
#define UCB0BR1                UCB0BRW_H      /* USCI B0 Baud Rate 1 */
3266
SFR_8BIT(UCB0STAT);                           /* USCI B0 Status Register */
3267
SFR_8BIT(UCB0RXBUF);                          /* USCI B0 Receive Buffer */
3268
SFR_8BIT(UCB0TXBUF);                          /* USCI B0 Transmit Buffer */
3269
SFR_16BIT(UCB0I2COA);                         /* USCI B0 I2C Own Address */
3270
SFR_8BIT(UCB0I2COA_L);                        /* USCI B0 I2C Own Address */
3271
SFR_8BIT(UCB0I2COA_H);                        /* USCI B0 I2C Own Address */
3272
SFR_16BIT(UCB0I2CSA);                         /* USCI B0 I2C Slave Address */
3273
SFR_8BIT(UCB0I2CSA_L);                        /* USCI B0 I2C Slave Address */
3274
SFR_8BIT(UCB0I2CSA_H);                        /* USCI B0 I2C Slave Address */
3275
SFR_16BIT(UCB0ICTL);                          /* USCI B0 Interrupt Enable Register */
3276
SFR_8BIT(UCB0ICTL_L);                         /* USCI B0 Interrupt Enable Register */
3277
SFR_8BIT(UCB0ICTL_H);                         /* USCI B0 Interrupt Enable Register */
3278
#define UCB0IE                 UCB0ICTL_L     /* USCI B0 Interrupt Enable Register */
3279
#define UCB0IFG                UCB0ICTL_H     /* USCI B0 Interrupt Flags Register */
3280
SFR_16BIT(UCB0IV);                            /* USCI B0 Interrupt Vector Register */
3281
 
3282
// UCAxCTL0 UART-Mode Control Bits
3283
#define UCPEN                  (0x80)         /* Async. Mode: Parity enable */
3284
#define UCPAR                  (0x40)         /* Async. Mode: Parity     0:odd / 1:even */
3285
#define UCMSB                  (0x20)         /* Async. Mode: MSB first  0:LSB / 1:MSB */
3286
#define UC7BIT                 (0x10)         /* Async. Mode: Data Bits  0:8-bits / 1:7-bits */
3287
#define UCSPB                  (0x08)         /* Async. Mode: Stop Bits  0:one / 1: two */
3288
#define UCMODE1                (0x04)         /* Async. Mode: USCI Mode 1 */
3289
#define UCMODE0                (0x02)         /* Async. Mode: USCI Mode 0 */
3290
#define UCSYNC                 (0x01)         /* Sync-Mode  0:UART-Mode / 1:SPI-Mode */
3291
 
3292
// UCxxCTL0 SPI-Mode Control Bits
3293
#define UCCKPH                 (0x80)         /* Sync. Mode: Clock Phase */
3294
#define UCCKPL                 (0x40)         /* Sync. Mode: Clock Polarity */
3295
#define UCMST                  (0x08)         /* Sync. Mode: Master Select */
3296
 
3297
// UCBxCTL0 I2C-Mode Control Bits
3298
#define UCA10                  (0x80)         /* 10-bit Address Mode */
3299
#define UCSLA10                (0x40)         /* 10-bit Slave Address Mode */
3300
#define UCMM                   (0x20)         /* Multi-Master Environment */
3301
//#define res               (0x10)    /* reserved */
3302
#define UCMODE_0               (0x00)         /* Sync. Mode: USCI Mode: 0 */
3303
#define UCMODE_1               (0x02)         /* Sync. Mode: USCI Mode: 1 */
3304
#define UCMODE_2               (0x04)         /* Sync. Mode: USCI Mode: 2 */
3305
#define UCMODE_3               (0x06)         /* Sync. Mode: USCI Mode: 3 */
3306
 
3307
// UCAxCTL1 UART-Mode Control Bits
3308
#define UCSSEL1                (0x80)         /* USCI 0 Clock Source Select 1 */
3309
#define UCSSEL0                (0x40)         /* USCI 0 Clock Source Select 0 */
3310
#define UCRXEIE                (0x20)         /* RX Error interrupt enable */
3311
#define UCBRKIE                (0x10)         /* Break interrupt enable */
3312
#define UCDORM                 (0x08)         /* Dormant (Sleep) Mode */
3313
#define UCTXADDR               (0x04)         /* Send next Data as Address */
3314
#define UCTXBRK                (0x02)         /* Send next Data as Break */
3315
#define UCSWRST                (0x01)         /* USCI Software Reset */
3316
 
3317
// UCxxCTL1 SPI-Mode Control Bits
3318
//#define res               (0x20)    /* reserved */
3319
//#define res               (0x10)    /* reserved */
3320
//#define res               (0x08)    /* reserved */
3321
//#define res               (0x04)    /* reserved */
3322
//#define res               (0x02)    /* reserved */
3323
 
3324
// UCBxCTL1 I2C-Mode Control Bits
3325
//#define res               (0x20)    /* reserved */
3326
#define UCTR                   (0x10)         /* Transmit/Receive Select/Flag */
3327
#define UCTXNACK               (0x08)         /* Transmit NACK */
3328
#define UCTXSTP                (0x04)         /* Transmit STOP */
3329
#define UCTXSTT                (0x02)         /* Transmit START */
3330
#define UCSSEL_0               (0x00)         /* USCI 0 Clock Source: 0 */
3331
#define UCSSEL_1               (0x40)         /* USCI 0 Clock Source: 1 */
3332
#define UCSSEL_2               (0x80)         /* USCI 0 Clock Source: 2 */
3333
#define UCSSEL_3               (0xC0)         /* USCI 0 Clock Source: 3 */
3334
#define UCSSEL__UCLK           (0x00)         /* USCI 0 Clock Source: UCLK */
3335
#define UCSSEL__ACLK           (0x40)         /* USCI 0 Clock Source: ACLK */
3336
#define UCSSEL__SMCLK          (0x80)         /* USCI 0 Clock Source: SMCLK */
3337
 
3338
/* UCAxMCTL Control Bits */
3339
#define UCBRF3                 (0x80)         /* USCI First Stage Modulation Select 3 */
3340
#define UCBRF2                 (0x40)         /* USCI First Stage Modulation Select 2 */
3341
#define UCBRF1                 (0x20)         /* USCI First Stage Modulation Select 1 */
3342
#define UCBRF0                 (0x10)         /* USCI First Stage Modulation Select 0 */
3343
#define UCBRS2                 (0x08)         /* USCI Second Stage Modulation Select 2 */
3344
#define UCBRS1                 (0x04)         /* USCI Second Stage Modulation Select 1 */
3345
#define UCBRS0                 (0x02)         /* USCI Second Stage Modulation Select 0 */
3346
#define UCOS16                 (0x01)         /* USCI 16-times Oversampling enable */
3347
 
3348
#define UCBRF_0                (0x00)         /* USCI First Stage Modulation: 0 */
3349
#define UCBRF_1                (0x10)         /* USCI First Stage Modulation: 1 */
3350
#define UCBRF_2                (0x20)         /* USCI First Stage Modulation: 2 */
3351
#define UCBRF_3                (0x30)         /* USCI First Stage Modulation: 3 */
3352
#define UCBRF_4                (0x40)         /* USCI First Stage Modulation: 4 */
3353
#define UCBRF_5                (0x50)         /* USCI First Stage Modulation: 5 */
3354
#define UCBRF_6                (0x60)         /* USCI First Stage Modulation: 6 */
3355
#define UCBRF_7                (0x70)         /* USCI First Stage Modulation: 7 */
3356
#define UCBRF_8                (0x80)         /* USCI First Stage Modulation: 8 */
3357
#define UCBRF_9                (0x90)         /* USCI First Stage Modulation: 9 */
3358
#define UCBRF_10               (0xA0)         /* USCI First Stage Modulation: A */
3359
#define UCBRF_11               (0xB0)         /* USCI First Stage Modulation: B */
3360
#define UCBRF_12               (0xC0)         /* USCI First Stage Modulation: C */
3361
#define UCBRF_13               (0xD0)         /* USCI First Stage Modulation: D */
3362
#define UCBRF_14               (0xE0)         /* USCI First Stage Modulation: E */
3363
#define UCBRF_15               (0xF0)         /* USCI First Stage Modulation: F */
3364
 
3365
#define UCBRS_0                (0x00)         /* USCI Second Stage Modulation: 0 */
3366
#define UCBRS_1                (0x02)         /* USCI Second Stage Modulation: 1 */
3367
#define UCBRS_2                (0x04)         /* USCI Second Stage Modulation: 2 */
3368
#define UCBRS_3                (0x06)         /* USCI Second Stage Modulation: 3 */
3369
#define UCBRS_4                (0x08)         /* USCI Second Stage Modulation: 4 */
3370
#define UCBRS_5                (0x0A)         /* USCI Second Stage Modulation: 5 */
3371
#define UCBRS_6                (0x0C)         /* USCI Second Stage Modulation: 6 */
3372
#define UCBRS_7                (0x0E)         /* USCI Second Stage Modulation: 7 */
3373
 
3374
/* UCAxSTAT Control Bits */
3375
#define UCLISTEN               (0x80)         /* USCI Listen mode */
3376
#define UCFE                   (0x40)         /* USCI Frame Error Flag */
3377
#define UCOE                   (0x20)         /* USCI Overrun Error Flag */
3378
#define UCPE                   (0x10)         /* USCI Parity Error Flag */
3379
#define UCBRK                  (0x08)         /* USCI Break received */
3380
#define UCRXERR                (0x04)         /* USCI RX Error Flag */
3381
#define UCADDR                 (0x02)         /* USCI Address received Flag */
3382
#define UCBUSY                 (0x01)         /* USCI Busy Flag */
3383
#define UCIDLE                 (0x02)         /* USCI Idle line detected Flag */
3384
 
3385
/* UCBxSTAT Control Bits */
3386
#define UCSCLLOW               (0x40)         /* SCL low */
3387
#define UCGC                   (0x20)         /* General Call address received Flag */
3388
#define UCBBUSY                (0x10)         /* Bus Busy Flag */
3389
 
3390
/* UCAxIRTCTL Control Bits */
3391
#define UCIRTXPL5              (0x80)         /* IRDA Transmit Pulse Length 5 */
3392
#define UCIRTXPL4              (0x40)         /* IRDA Transmit Pulse Length 4 */
3393
#define UCIRTXPL3              (0x20)         /* IRDA Transmit Pulse Length 3 */
3394
#define UCIRTXPL2              (0x10)         /* IRDA Transmit Pulse Length 2 */
3395
#define UCIRTXPL1              (0x08)         /* IRDA Transmit Pulse Length 1 */
3396
#define UCIRTXPL0              (0x04)         /* IRDA Transmit Pulse Length 0 */
3397
#define UCIRTXCLK              (0x02)         /* IRDA Transmit Pulse Clock Select */
3398
#define UCIREN                 (0x01)         /* IRDA Encoder/Decoder enable */
3399
 
3400
/* UCAxIRRCTL Control Bits */
3401
#define UCIRRXFL5              (0x80)         /* IRDA Receive Filter Length 5 */
3402
#define UCIRRXFL4              (0x40)         /* IRDA Receive Filter Length 4 */
3403
#define UCIRRXFL3              (0x20)         /* IRDA Receive Filter Length 3 */
3404
#define UCIRRXFL2              (0x10)         /* IRDA Receive Filter Length 2 */
3405
#define UCIRRXFL1              (0x08)         /* IRDA Receive Filter Length 1 */
3406
#define UCIRRXFL0              (0x04)         /* IRDA Receive Filter Length 0 */
3407
#define UCIRRXPL               (0x02)         /* IRDA Receive Input Polarity */
3408
#define UCIRRXFE               (0x01)         /* IRDA Receive Filter enable */
3409
 
3410
/* UCAxABCTL Control Bits */
3411
//#define res               (0x80)    /* reserved */
3412
//#define res               (0x40)    /* reserved */
3413
#define UCDELIM1               (0x20)         /* Break Sync Delimiter 1 */
3414
#define UCDELIM0               (0x10)         /* Break Sync Delimiter 0 */
3415
#define UCSTOE                 (0x08)         /* Sync-Field Timeout error */
3416
#define UCBTOE                 (0x04)         /* Break Timeout error */
3417
//#define res               (0x02)    /* reserved */
3418
#define UCABDEN                (0x01)         /* Auto Baud Rate detect enable */
3419
 
3420
/* UCBxI2COA Control Bits */
3421
#define UCGCEN                 (0x8000)       /* I2C General Call enable */
3422
#define UCOA9                  (0x0200)       /* I2C Own Address 9 */
3423
#define UCOA8                  (0x0100)       /* I2C Own Address 8 */
3424
#define UCOA7                  (0x0080)       /* I2C Own Address 7 */
3425
#define UCOA6                  (0x0040)       /* I2C Own Address 6 */
3426
#define UCOA5                  (0x0020)       /* I2C Own Address 5 */
3427
#define UCOA4                  (0x0010)       /* I2C Own Address 4 */
3428
#define UCOA3                  (0x0008)       /* I2C Own Address 3 */
3429
#define UCOA2                  (0x0004)       /* I2C Own Address 2 */
3430
#define UCOA1                  (0x0002)       /* I2C Own Address 1 */
3431
#define UCOA0                  (0x0001)       /* I2C Own Address 0 */
3432
 
3433
/* UCBxI2COA Control Bits */
3434
#define UCOA7_L                (0x0080)       /* I2C Own Address 7 */
3435
#define UCOA6_L                (0x0040)       /* I2C Own Address 6 */
3436
#define UCOA5_L                (0x0020)       /* I2C Own Address 5 */
3437
#define UCOA4_L                (0x0010)       /* I2C Own Address 4 */
3438
#define UCOA3_L                (0x0008)       /* I2C Own Address 3 */
3439
#define UCOA2_L                (0x0004)       /* I2C Own Address 2 */
3440
#define UCOA1_L                (0x0002)       /* I2C Own Address 1 */
3441
#define UCOA0_L                (0x0001)       /* I2C Own Address 0 */
3442
 
3443
/* UCBxI2COA Control Bits */
3444
#define UCGCEN_H               (0x0080)       /* I2C General Call enable */
3445
#define UCOA9_H                (0x0002)       /* I2C Own Address 9 */
3446
#define UCOA8_H                (0x0001)       /* I2C Own Address 8 */
3447
 
3448
/* UCBxI2CSA Control Bits */
3449
#define UCSA9                  (0x0200)       /* I2C Slave Address 9 */
3450
#define UCSA8                  (0x0100)       /* I2C Slave Address 8 */
3451
#define UCSA7                  (0x0080)       /* I2C Slave Address 7 */
3452
#define UCSA6                  (0x0040)       /* I2C Slave Address 6 */
3453
#define UCSA5                  (0x0020)       /* I2C Slave Address 5 */
3454
#define UCSA4                  (0x0010)       /* I2C Slave Address 4 */
3455
#define UCSA3                  (0x0008)       /* I2C Slave Address 3 */
3456
#define UCSA2                  (0x0004)       /* I2C Slave Address 2 */
3457
#define UCSA1                  (0x0002)       /* I2C Slave Address 1 */
3458
#define UCSA0                  (0x0001)       /* I2C Slave Address 0 */
3459
 
3460
/* UCBxI2CSA Control Bits */
3461
#define UCSA7_L                (0x0080)       /* I2C Slave Address 7 */
3462
#define UCSA6_L                (0x0040)       /* I2C Slave Address 6 */
3463
#define UCSA5_L                (0x0020)       /* I2C Slave Address 5 */
3464
#define UCSA4_L                (0x0010)       /* I2C Slave Address 4 */
3465
#define UCSA3_L                (0x0008)       /* I2C Slave Address 3 */
3466
#define UCSA2_L                (0x0004)       /* I2C Slave Address 2 */
3467
#define UCSA1_L                (0x0002)       /* I2C Slave Address 1 */
3468
#define UCSA0_L                (0x0001)       /* I2C Slave Address 0 */
3469
 
3470
/* UCBxI2CSA Control Bits */
3471
#define UCSA9_H                (0x0002)       /* I2C Slave Address 9 */
3472
#define UCSA8_H                (0x0001)       /* I2C Slave Address 8 */
3473
 
3474
/* UCAxIE Control Bits */
3475
#define UCTXIE                 (0x0002)       /* USCI Transmit Interrupt Enable */
3476
#define UCRXIE                 (0x0001)       /* USCI Receive Interrupt Enable */
3477
 
3478
/* UCBxIE Control Bits */
3479
#define UCNACKIE               (0x0020)       /* NACK Condition interrupt enable */
3480
#define UCALIE                 (0x0010)       /* Arbitration Lost interrupt enable */
3481
#define UCSTPIE                (0x0008)       /* STOP Condition interrupt enable */
3482
#define UCSTTIE                (0x0004)       /* START Condition interrupt enable */
3483
#define UCTXIE                 (0x0002)       /* USCI Transmit Interrupt Enable */
3484
#define UCRXIE                 (0x0001)       /* USCI Receive Interrupt Enable */
3485
 
3486
/* UCAxIFG Control Bits */
3487
#define UCTXIFG                (0x0002)       /* USCI Transmit Interrupt Flag */
3488
#define UCRXIFG                (0x0001)       /* USCI Receive Interrupt Flag */
3489
 
3490
/* UCBxIFG Control Bits */
3491
#define UCNACKIFG              (0x0020)       /* NAK Condition interrupt Flag */
3492
#define UCALIFG                (0x0010)       /* Arbitration Lost interrupt Flag */
3493
#define UCSTPIFG               (0x0008)       /* STOP Condition interrupt Flag */
3494
#define UCSTTIFG               (0x0004)       /* START Condition interrupt Flag */
3495
#define UCTXIFG                (0x0002)       /* USCI Transmit Interrupt Flag */
3496
#define UCRXIFG                (0x0001)       /* USCI Receive Interrupt Flag */
3497
 
3498
/* USCI Definitions */
3499
#define USCI_NONE              (0x0000)       /* No Interrupt pending */
3500
#define USCI_UCRXIFG           (0x0002)       /* USCI UCRXIFG */
3501
#define USCI_UCTXIFG           (0x0004)       /* USCI UCTXIFG */
3502
#define USCI_I2C_UCALIFG       (0x0002)       /* USCI I2C Mode: UCALIFG */
3503
#define USCI_I2C_UCNACKIFG     (0x0004)       /* USCI I2C Mode: UCNACKIFG */
3504
#define USCI_I2C_UCSTTIFG      (0x0006)       /* USCI I2C Mode: UCSTTIFG*/
3505
#define USCI_I2C_UCSTPIFG      (0x0008)       /* USCI I2C Mode: UCSTPIFG*/
3506
#define USCI_I2C_UCRXIFG       (0x000A)       /* USCI I2C Mode: UCRXIFG */
3507
#define USCI_I2C_UCTXIFG       (0x000C)       /* USCI I2C Mode: UCTXIFG */
3508
 
3509
/************************************************************
3510
* USCI A1
3511
************************************************************/
3512
#define __MSP430_HAS_USCI_A1__                /* Definition to show that Module is available */
3513
#define __MSP430_BASEADDRESS_USCI_A1__ 0x0600
3514
 
3515
SFR_16BIT(UCA1CTLW0);                         /* USCI A1 Control Word Register 0 */
3516
SFR_8BIT(UCA1CTLW0_L);                        /* USCI A1 Control Word Register 0 */
3517
SFR_8BIT(UCA1CTLW0_H);                        /* USCI A1 Control Word Register 0 */
3518
#define UCA1CTL1               UCA1CTLW0_L    /* USCI A1 Control Register 1 */
3519
#define UCA1CTL0               UCA1CTLW0_H    /* USCI A1 Control Register 0 */
3520
SFR_16BIT(UCA1BRW);                           /* USCI A1 Baud Word Rate 0 */
3521
SFR_8BIT(UCA1BRW_L);                          /* USCI A1 Baud Word Rate 0 */
3522
SFR_8BIT(UCA1BRW_H);                          /* USCI A1 Baud Word Rate 0 */
3523
#define UCA1BR0                UCA1BRW_L      /* USCI A1 Baud Rate 0 */
3524
#define UCA1BR1                UCA1BRW_H      /* USCI A1 Baud Rate 1 */
3525
SFR_8BIT(UCA1MCTL);                           /* USCI A1 Modulation Control */
3526
SFR_8BIT(UCA1STAT);                           /* USCI A1 Status Register */
3527
SFR_8BIT(UCA1RXBUF);                          /* USCI A1 Receive Buffer */
3528
SFR_8BIT(UCA1TXBUF);                          /* USCI A1 Transmit Buffer */
3529
SFR_8BIT(UCA1ABCTL);                          /* USCI A1 LIN Control */
3530
SFR_16BIT(UCA1IRCTL);                         /* USCI A1 IrDA Transmit Control */
3531
SFR_8BIT(UCA1IRCTL_L);                        /* USCI A1 IrDA Transmit Control */
3532
SFR_8BIT(UCA1IRCTL_H);                        /* USCI A1 IrDA Transmit Control */
3533
#define UCA1IRTCTL             UCA1IRCTL_L    /* USCI A1 IrDA Transmit Control */
3534
#define UCA1IRRCTL             UCA1IRCTL_H    /* USCI A1 IrDA Receive Control */
3535
SFR_16BIT(UCA1ICTL);                          /* USCI A1 Interrupt Enable Register */
3536
SFR_8BIT(UCA1ICTL_L);                         /* USCI A1 Interrupt Enable Register */
3537
SFR_8BIT(UCA1ICTL_H);                         /* USCI A1 Interrupt Enable Register */
3538
#define UCA1IE                 UCA1ICTL_L     /* USCI A1 Interrupt Enable Register */
3539
#define UCA1IFG                UCA1ICTL_H     /* USCI A1 Interrupt Flags Register */
3540
SFR_16BIT(UCA1IV);                            /* USCI A1 Interrupt Vector Register */
3541
 
3542
 
3543
/************************************************************
3544
* USCI B1
3545
************************************************************/
3546
#define __MSP430_HAS_USCI_B1__                /* Definition to show that Module is available */
3547
#define __MSP430_BASEADDRESS_USCI_B1__ 0x0620
3548
 
3549
 
3550
SFR_16BIT(UCB1CTLW0);                         /* USCI B1 Control Word Register 0 */
3551
SFR_8BIT(UCB1CTLW0_L);                        /* USCI B1 Control Word Register 0 */
3552
SFR_8BIT(UCB1CTLW0_H);                        /* USCI B1 Control Word Register 0 */
3553
#define UCB1CTL1               UCB1CTLW0_L    /* USCI B1 Control Register 1 */
3554
#define UCB1CTL0               UCB1CTLW0_H    /* USCI B1 Control Register 0 */
3555
SFR_16BIT(UCB1BRW);                           /* USCI B1 Baud Word Rate 0 */
3556
SFR_8BIT(UCB1BRW_L);                          /* USCI B1 Baud Word Rate 0 */
3557
SFR_8BIT(UCB1BRW_H);                          /* USCI B1 Baud Word Rate 0 */
3558
#define UCB1BR0                UCB1BRW_L      /* USCI B1 Baud Rate 0 */
3559
#define UCB1BR1                UCB1BRW_H      /* USCI B1 Baud Rate 1 */
3560
SFR_8BIT(UCB1STAT);                           /* USCI B1 Status Register */
3561
SFR_8BIT(UCB1RXBUF);                          /* USCI B1 Receive Buffer */
3562
SFR_8BIT(UCB1TXBUF);                          /* USCI B1 Transmit Buffer */
3563
SFR_16BIT(UCB1I2COA);                         /* USCI B1 I2C Own Address */
3564
SFR_8BIT(UCB1I2COA_L);                        /* USCI B1 I2C Own Address */
3565
SFR_8BIT(UCB1I2COA_H);                        /* USCI B1 I2C Own Address */
3566
SFR_16BIT(UCB1I2CSA);                         /* USCI B1 I2C Slave Address */
3567
SFR_8BIT(UCB1I2CSA_L);                        /* USCI B1 I2C Slave Address */
3568
SFR_8BIT(UCB1I2CSA_H);                        /* USCI B1 I2C Slave Address */
3569
SFR_16BIT(UCB1ICTL);                          /* USCI B1 Interrupt Enable Register */
3570
SFR_8BIT(UCB1ICTL_L);                         /* USCI B1 Interrupt Enable Register */
3571
SFR_8BIT(UCB1ICTL_H);                         /* USCI B1 Interrupt Enable Register */
3572
#define UCB1IE                 UCB1ICTL_L     /* USCI B1 Interrupt Enable Register */
3573
#define UCB1IFG                UCB1ICTL_H     /* USCI B1 Interrupt Flags Register */
3574
SFR_16BIT(UCB1IV);                            /* USCI B1 Interrupt Vector Register */
3575
 
3576
/************************************************************
3577
* USCI A2
3578
************************************************************/
3579
#define __MSP430_HAS_USCI_A2__                /* Definition to show that Module is available */
3580
#define __MSP430_BASEADDRESS_USCI_A2__ 0x0640
3581
 
3582
SFR_16BIT(UCA2CTLW0);                         /* USCI A2 Control Word Register 0 */
3583
SFR_8BIT(UCA2CTLW0_L);                        /* USCI A2 Control Word Register 0 */
3584
SFR_8BIT(UCA2CTLW0_H);                        /* USCI A2 Control Word Register 0 */
3585
#define UCA2CTL1               UCA2CTLW0_L    /* USCI A2 Control Register 1 */
3586
#define UCA2CTL0               UCA2CTLW0_H    /* USCI A2 Control Register 0 */
3587
SFR_16BIT(UCA2BRW);                           /* USCI A2 Baud Word Rate 0 */
3588
SFR_8BIT(UCA2BRW_L);                          /* USCI A2 Baud Word Rate 0 */
3589
SFR_8BIT(UCA2BRW_H);                          /* USCI A2 Baud Word Rate 0 */
3590
#define UCA2BR0                UCA2BRW_L      /* USCI A2 Baud Rate 0 */
3591
#define UCA2BR1                UCA2BRW_H      /* USCI A2 Baud Rate 1 */
3592
SFR_8BIT(UCA2MCTL);                           /* USCI A2 Modulation Control */
3593
SFR_8BIT(UCA2STAT);                           /* USCI A2 Status Register */
3594
SFR_8BIT(UCA2RXBUF);                          /* USCI A2 Receive Buffer */
3595
SFR_8BIT(UCA2TXBUF);                          /* USCI A2 Transmit Buffer */
3596
SFR_8BIT(UCA2ABCTL);                          /* USCI A2 LIN Control */
3597
SFR_16BIT(UCA2IRCTL);                         /* USCI A2 IrDA Transmit Control */
3598
SFR_8BIT(UCA2IRCTL_L);                        /* USCI A2 IrDA Transmit Control */
3599
SFR_8BIT(UCA2IRCTL_H);                        /* USCI A2 IrDA Transmit Control */
3600
#define UCA2IRTCTL             UCA2IRCTL_L    /* USCI A2 IrDA Transmit Control */
3601
#define UCA2IRRCTL             UCA2IRCTL_H    /* USCI A2 IrDA Receive Control */
3602
SFR_16BIT(UCA2ICTL);                          /* USCI A2 Interrupt Enable Register */
3603
SFR_8BIT(UCA2ICTL_L);                         /* USCI A2 Interrupt Enable Register */
3604
SFR_8BIT(UCA2ICTL_H);                         /* USCI A2 Interrupt Enable Register */
3605
#define UCA2IE                 UCA2ICTL_L     /* USCI A2 Interrupt Enable Register */
3606
#define UCA2IFG                UCA2ICTL_H     /* USCI A2 Interrupt Flags Register */
3607
SFR_16BIT(UCA2IV);                            /* USCI A2 Interrupt Vector Register */
3608
 
3609
 
3610
/************************************************************
3611
* USCI B2
3612
************************************************************/
3613
#define __MSP430_HAS_USCI_B2__                /* Definition to show that Module is available */
3614
#define __MSP430_BASEADDRESS_USCI_B2__ 0x0660
3615
 
3616
 
3617
SFR_16BIT(UCB2CTLW0);                         /* USCI B2 Control Word Register 0 */
3618
SFR_8BIT(UCB2CTLW0_L);                        /* USCI B2 Control Word Register 0 */
3619
SFR_8BIT(UCB2CTLW0_H);                        /* USCI B2 Control Word Register 0 */
3620
#define UCB2CTL1               UCB2CTLW0_L    /* USCI B2 Control Register 1 */
3621
#define UCB2CTL0               UCB2CTLW0_H    /* USCI B2 Control Register 0 */
3622
SFR_16BIT(UCB2BRW);                           /* USCI B2 Baud Word Rate 0 */
3623
SFR_8BIT(UCB2BRW_L);                          /* USCI B2 Baud Word Rate 0 */
3624
SFR_8BIT(UCB2BRW_H);                          /* USCI B2 Baud Word Rate 0 */
3625
#define UCB2BR0                UCB2BRW_L      /* USCI B2 Baud Rate 0 */
3626
#define UCB2BR1                UCB2BRW_H      /* USCI B2 Baud Rate 1 */
3627
SFR_8BIT(UCB2STAT);                           /* USCI B2 Status Register */
3628
SFR_8BIT(UCB2RXBUF);                          /* USCI B2 Receive Buffer */
3629
SFR_8BIT(UCB2TXBUF);                          /* USCI B2 Transmit Buffer */
3630
SFR_16BIT(UCB2I2COA);                         /* USCI B2 I2C Own Address */
3631
SFR_8BIT(UCB2I2COA_L);                        /* USCI B2 I2C Own Address */
3632
SFR_8BIT(UCB2I2COA_H);                        /* USCI B2 I2C Own Address */
3633
SFR_16BIT(UCB2I2CSA);                         /* USCI B2 I2C Slave Address */
3634
SFR_8BIT(UCB2I2CSA_L);                        /* USCI B2 I2C Slave Address */
3635
SFR_8BIT(UCB2I2CSA_H);                        /* USCI B2 I2C Slave Address */
3636
SFR_16BIT(UCB2ICTL);                          /* USCI B2 Interrupt Enable Register */
3637
SFR_8BIT(UCB2ICTL_L);                         /* USCI B2 Interrupt Enable Register */
3638
SFR_8BIT(UCB2ICTL_H);                         /* USCI B2 Interrupt Enable Register */
3639
#define UCB2IE                 UCB2ICTL_L     /* USCI B2 Interrupt Enable Register */
3640
#define UCB2IFG                UCB2ICTL_H     /* USCI B2 Interrupt Flags Register */
3641
SFR_16BIT(UCB2IV);                            /* USCI B2 Interrupt Vector Register */
3642
 
3643
/************************************************************
3644
* USCI A3
3645
************************************************************/
3646
#define __MSP430_HAS_USCI_A3__                /* Definition to show that Module is available */
3647
#define __MSP430_BASEADDRESS_USCI_A3__ 0x0680
3648
 
3649
SFR_16BIT(UCA3CTLW0);                         /* USCI A3 Control Word Register 0 */
3650
SFR_8BIT(UCA3CTLW0_L);                        /* USCI A3 Control Word Register 0 */
3651
SFR_8BIT(UCA3CTLW0_H);                        /* USCI A3 Control Word Register 0 */
3652
#define UCA3CTL1               UCA3CTLW0_L    /* USCI A3 Control Register 1 */
3653
#define UCA3CTL0               UCA3CTLW0_H    /* USCI A3 Control Register 0 */
3654
SFR_16BIT(UCA3BRW);                           /* USCI A3 Baud Word Rate 0 */
3655
SFR_8BIT(UCA3BRW_L);                          /* USCI A3 Baud Word Rate 0 */
3656
SFR_8BIT(UCA3BRW_H);                          /* USCI A3 Baud Word Rate 0 */
3657
#define UCA3BR0                UCA3BRW_L      /* USCI A3 Baud Rate 0 */
3658
#define UCA3BR1                UCA3BRW_H      /* USCI A3 Baud Rate 1 */
3659
SFR_8BIT(UCA3MCTL);                           /* USCI A3 Modulation Control */
3660
SFR_8BIT(UCA3STAT);                           /* USCI A3 Status Register */
3661
SFR_8BIT(UCA3RXBUF);                          /* USCI A3 Receive Buffer */
3662
SFR_8BIT(UCA3TXBUF);                          /* USCI A3 Transmit Buffer */
3663
SFR_8BIT(UCA3ABCTL);                          /* USCI A3 LIN Control */
3664
SFR_16BIT(UCA3IRCTL);                         /* USCI A3 IrDA Transmit Control */
3665
SFR_8BIT(UCA3IRCTL_L);                        /* USCI A3 IrDA Transmit Control */
3666
SFR_8BIT(UCA3IRCTL_H);                        /* USCI A3 IrDA Transmit Control */
3667
#define UCA3IRTCTL             UCA3IRCTL_L    /* USCI A3 IrDA Transmit Control */
3668
#define UCA3IRRCTL             UCA3IRCTL_H    /* USCI A3 IrDA Receive Control */
3669
SFR_16BIT(UCA3ICTL);                          /* USCI A3 Interrupt Enable Register */
3670
SFR_8BIT(UCA3ICTL_L);                         /* USCI A3 Interrupt Enable Register */
3671
SFR_8BIT(UCA3ICTL_H);                         /* USCI A3 Interrupt Enable Register */
3672
#define UCA3IE                 UCA3ICTL_L     /* USCI A3 Interrupt Enable Register */
3673
#define UCA3IFG                UCA3ICTL_H     /* USCI A3 Interrupt Flags Register */
3674
SFR_16BIT(UCA3IV);                            /* USCI A3 Interrupt Vector Register */
3675
 
3676
 
3677
/************************************************************
3678
* USCI B3
3679
************************************************************/
3680
#define __MSP430_HAS_USCI_B3__                /* Definition to show that Module is available */
3681
#define __MSP430_BASEADDRESS_USCI_B3__ 0x06A0
3682
 
3683
 
3684
SFR_16BIT(UCB3CTLW0);                         /* USCI B3 Control Word Register 0 */
3685
SFR_8BIT(UCB3CTLW0_L);                        /* USCI B3 Control Word Register 0 */
3686
SFR_8BIT(UCB3CTLW0_H);                        /* USCI B3 Control Word Register 0 */
3687
#define UCB3CTL1               UCB3CTLW0_L    /* USCI B3 Control Register 1 */
3688
#define UCB3CTL0               UCB3CTLW0_H    /* USCI B3 Control Register 0 */
3689
SFR_16BIT(UCB3BRW);                           /* USCI B3 Baud Word Rate 0 */
3690
SFR_8BIT(UCB3BRW_L);                          /* USCI B3 Baud Word Rate 0 */
3691
SFR_8BIT(UCB3BRW_H);                          /* USCI B3 Baud Word Rate 0 */
3692
#define UCB3BR0                UCB3BRW_L      /* USCI B3 Baud Rate 0 */
3693
#define UCB3BR1                UCB3BRW_H      /* USCI B3 Baud Rate 1 */
3694
SFR_8BIT(UCB3STAT);                           /* USCI B3 Status Register */
3695
SFR_8BIT(UCB3RXBUF);                          /* USCI B3 Receive Buffer */
3696
SFR_8BIT(UCB3TXBUF);                          /* USCI B3 Transmit Buffer */
3697
SFR_16BIT(UCB3I2COA);                         /* USCI B3 I2C Own Address */
3698
SFR_8BIT(UCB3I2COA_L);                        /* USCI B3 I2C Own Address */
3699
SFR_8BIT(UCB3I2COA_H);                        /* USCI B3 I2C Own Address */
3700
SFR_16BIT(UCB3I2CSA);                         /* USCI B3 I2C Slave Address */
3701
SFR_8BIT(UCB3I2CSA_L);                        /* USCI B3 I2C Slave Address */
3702
SFR_8BIT(UCB3I2CSA_H);                        /* USCI B3 I2C Slave Address */
3703
SFR_16BIT(UCB3ICTL);                          /* USCI B3 Interrupt Enable Register */
3704
SFR_8BIT(UCB3ICTL_L);                         /* USCI B3 Interrupt Enable Register */
3705
SFR_8BIT(UCB3ICTL_H);                         /* USCI B3 Interrupt Enable Register */
3706
#define UCB3IE                 UCB3ICTL_L     /* USCI B3 Interrupt Enable Register */
3707
#define UCB3IFG                UCB3ICTL_H     /* USCI B3 Interrupt Flags Register */
3708
SFR_16BIT(UCB3IV);                            /* USCI B3 Interrupt Vector Register */
3709
 
3710
/************************************************************
3711
* WATCHDOG TIMER A
3712
************************************************************/
3713
#define __MSP430_HAS_WDT_A__                  /* Definition to show that Module is available */
3714
#define __MSP430_BASEADDRESS_WDT_A__ 0x0150
3715
 
3716
SFR_16BIT(WDTCTL);                            /* Watchdog Timer Control */
3717
SFR_8BIT(WDTCTL_L);                           /* Watchdog Timer Control */
3718
SFR_8BIT(WDTCTL_H);                           /* Watchdog Timer Control */
3719
/* The bit names have been prefixed with "WDT" */
3720
/* WDTCTL Control Bits */
3721
#define WDTIS0                 (0x0001)       /* WDT - Timer Interval Select 0 */
3722
#define WDTIS1                 (0x0002)       /* WDT - Timer Interval Select 1 */
3723
#define WDTIS2                 (0x0004)       /* WDT - Timer Interval Select 2 */
3724
#define WDTCNTCL               (0x0008)       /* WDT - Timer Clear */
3725
#define WDTTMSEL               (0x0010)       /* WDT - Timer Mode Select */
3726
#define WDTSSEL0               (0x0020)       /* WDT - Timer Clock Source Select 0 */
3727
#define WDTSSEL1               (0x0040)       /* WDT - Timer Clock Source Select 1 */
3728
#define WDTHOLD                (0x0080)       /* WDT - Timer hold */
3729
 
3730
/* WDTCTL Control Bits */
3731
#define WDTIS0_L               (0x0001)       /* WDT - Timer Interval Select 0 */
3732
#define WDTIS1_L               (0x0002)       /* WDT - Timer Interval Select 1 */
3733
#define WDTIS2_L               (0x0004)       /* WDT - Timer Interval Select 2 */
3734
#define WDTCNTCL_L             (0x0008)       /* WDT - Timer Clear */
3735
#define WDTTMSEL_L             (0x0010)       /* WDT - Timer Mode Select */
3736
#define WDTSSEL0_L             (0x0020)       /* WDT - Timer Clock Source Select 0 */
3737
#define WDTSSEL1_L             (0x0040)       /* WDT - Timer Clock Source Select 1 */
3738
#define WDTHOLD_L              (0x0080)       /* WDT - Timer hold */
3739
 
3740
/* WDTCTL Control Bits */
3741
 
3742
#define WDTPW                  (0x5A00)
3743
 
3744
#define WDTIS_0                (0*0x0001u)    /* WDT - Timer Interval Select: /2G */
3745
#define WDTIS_1                (1*0x0001u)    /* WDT - Timer Interval Select: /128M */
3746
#define WDTIS_2                (2*0x0001u)    /* WDT - Timer Interval Select: /8192k */
3747
#define WDTIS_3                (3*0x0001u)    /* WDT - Timer Interval Select: /512k */
3748
#define WDTIS_4                (4*0x0001u)    /* WDT - Timer Interval Select: /32k */
3749
#define WDTIS_5                (5*0x0001u)    /* WDT - Timer Interval Select: /8192 */
3750
#define WDTIS_6                (6*0x0001u)    /* WDT - Timer Interval Select: /512 */
3751
#define WDTIS_7                (7*0x0001u)    /* WDT - Timer Interval Select: /64 */
3752
#define WDTIS__2G              (0*0x0001u)    /* WDT - Timer Interval Select: /2G */
3753
#define WDTIS__128M            (1*0x0001u)    /* WDT - Timer Interval Select: /128M */
3754
#define WDTIS__8192K           (2*0x0001u)    /* WDT - Timer Interval Select: /8192k */
3755
#define WDTIS__512K            (3*0x0001u)    /* WDT - Timer Interval Select: /512k */
3756
#define WDTIS__32K             (4*0x0001u)    /* WDT - Timer Interval Select: /32k */
3757
#define WDTIS__8192            (5*0x0001u)    /* WDT - Timer Interval Select: /8192 */
3758
#define WDTIS__512             (6*0x0001u)    /* WDT - Timer Interval Select: /512 */
3759
#define WDTIS__64              (7*0x0001u)    /* WDT - Timer Interval Select: /64 */
3760
 
3761
#define WDTSSEL_0              (0*0x0020u)    /* WDT - Timer Clock Source Select: SMCLK */
3762
#define WDTSSEL_1              (1*0x0020u)    /* WDT - Timer Clock Source Select: ACLK */
3763
#define WDTSSEL_2              (2*0x0020u)    /* WDT - Timer Clock Source Select: VLO_CLK */
3764
#define WDTSSEL_3              (3*0x0020u)    /* WDT - Timer Clock Source Select: reserved */
3765
#define WDTSSEL__SMCLK         (0*0x0020u)    /* WDT - Timer Clock Source Select: SMCLK */
3766
#define WDTSSEL__ACLK          (1*0x0020u)    /* WDT - Timer Clock Source Select: ACLK */
3767
#define WDTSSEL__VLO           (2*0x0020u)    /* WDT - Timer Clock Source Select: VLO_CLK */
3768
 
3769
/* WDT-interval times [1ms] coded with Bits 0-2 */
3770
/* WDT is clocked by fSMCLK (assumed 1MHz) */
3771
#define WDT_MDLY_32         (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2)                         /* 32ms interval (default) */
3772
#define WDT_MDLY_8          (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTIS0)                  /* 8ms     " */
3773
#define WDT_MDLY_0_5        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTIS1)                  /* 0.5ms   " */
3774
#define WDT_MDLY_0_064      (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTIS1+WDTIS0)           /* 0.064ms " */
3775
/* WDT is clocked by fACLK (assumed 32KHz) */
3776
#define WDT_ADLY_1000       (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0)                /* 1000ms  " */
3777
#define WDT_ADLY_250        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0+WDTIS0)         /* 250ms   " */
3778
#define WDT_ADLY_16         (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0+WDTIS1)         /* 16ms    " */
3779
#define WDT_ADLY_1_9        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0+WDTIS1+WDTIS0)  /* 1.9ms   " */
3780
/* Watchdog mode -> reset after expired time */
3781
/* WDT is clocked by fSMCLK (assumed 1MHz) */
3782
#define WDT_MRST_32         (WDTPW+WDTCNTCL+WDTIS2)                                  /* 32ms interval (default) */
3783
#define WDT_MRST_8          (WDTPW+WDTCNTCL+WDTIS2+WDTIS0)                           /* 8ms     " */
3784
#define WDT_MRST_0_5        (WDTPW+WDTCNTCL+WDTIS2+WDTIS1)                           /* 0.5ms   " */
3785
#define WDT_MRST_0_064      (WDTPW+WDTCNTCL+WDTIS2+WDTIS1+WDTIS0)                    /* 0.064ms " */
3786
/* WDT is clocked by fACLK (assumed 32KHz) */
3787
#define WDT_ARST_1000       (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2)                         /* 1000ms  " */
3788
#define WDT_ARST_250        (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2+WDTIS0)                  /* 250ms   " */
3789
#define WDT_ARST_16         (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2+WDTIS1)                  /* 16ms    " */
3790
#define WDT_ARST_1_9        (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2+WDTIS1+WDTIS0)           /* 1.9ms   " */
3791
 
3792
 
3793
/************************************************************
3794
* TLV Descriptors
3795
************************************************************/
3796
#define __MSP430_HAS_TLV__                    /* Definition to show that Module is available */
3797
 
3798
#define TLV_START              (0x1A08)       /* Start Address of the TLV structure */
3799
#define TLV_END                (0x1AFF)       /* End Address of the TLV structure */
3800
 
3801
#define TLV_LDTAG              (0x01)         /*  Legacy descriptor (1xx, 2xx, 4xx families) */
3802
#define TLV_PDTAG              (0x02)         /*  Peripheral discovery descriptor */
3803
#define TLV_Reserved3          (0x03)         /*  Future usage */
3804
#define TLV_Reserved4          (0x04)         /*  Future usage */
3805
#define TLV_BLANK              (0x05)         /*  Blank descriptor */
3806
#define TLV_Reserved6          (0x06)         /*  Future usage */
3807
#define TLV_Reserved7          (0x07)         /*  Serial Number */
3808
#define TLV_DIERECORD          (0x08)         /*  Die Record  */
3809
#define TLV_ADCCAL             (0x11)         /*  ADC12 calibration */
3810
#define TLV_ADC12CAL           (0x11)         /*  ADC12 calibration */
3811
#define TLV_ADC10CAL           (0x13)         /*  ADC10 calibration */
3812
#define TLV_REFCAL             (0x12)         /*  REF calibration */
3813
#define TLV_TAGEXT             (0xFE)         /*  Tag extender */
3814
#define TLV_TAGEND             (0xFF)         //  Tag End of Table
3815
 
3816
/************************************************************
3817
* Interrupt Vectors (offset from 0xFF80)
3818
************************************************************/
3819
 
3820
#pragma diag_suppress 1107
3821
#define VECTOR_NAME(name)             name##_ptr
3822
#define EMIT_PRAGMA(x)                _Pragma(#x)
3823
#define CREATE_VECTOR(name)           void * const VECTOR_NAME(name) = (void *)(long)&name
3824
#define PLACE_VECTOR(vector,section)  EMIT_PRAGMA(DATA_SECTION(vector,section))
3825
#define PLACE_INTERRUPT(func)         EMIT_PRAGMA(CODE_SECTION(func,".text:_isr"))
3826
#define ISR_VECTOR(func,offset)       CREATE_VECTOR(func); \
3827
                                      PLACE_VECTOR(VECTOR_NAME(func), offset) \
3828
                                      PLACE_INTERRUPT(func)
3829
 
3830
 
3831
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3832
#define RTC_VECTOR              ".int41"                    /* 0xFFD2 RTC */
3833
#else
3834
#define RTC_VECTOR              (41 * 1u)                    /* 0xFFD2 RTC */
3835
/*#define RTC_ISR(func)           ISR_VECTOR(func, ".int41")  */ /* 0xFFD2 RTC */ /* CCE V2 Style */
3836
#endif
3837
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3838
#define PORT2_VECTOR            ".int42"                    /* 0xFFD4 Port 2 */
3839
#else
3840
#define PORT2_VECTOR            (42 * 1u)                    /* 0xFFD4 Port 2 */
3841
/*#define PORT2_ISR(func)         ISR_VECTOR(func, ".int42")  */ /* 0xFFD4 Port 2 */ /* CCE V2 Style */
3842
#endif
3843
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3844
#define USCI_B3_VECTOR          ".int43"                    /* 0xFFD6 USCI B3 Receive/Transmit */
3845
#else
3846
#define USCI_B3_VECTOR          (43 * 1u)                    /* 0xFFD6 USCI B3 Receive/Transmit */
3847
/*#define USCI_B3_ISR(func)       ISR_VECTOR(func, ".int43")  */ /* 0xFFD6 USCI B3 Receive/Transmit */ /* CCE V2 Style */
3848
#endif
3849
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3850
#define USCI_A3_VECTOR          ".int44"                    /* 0xFFD8 USCI A3 Receive/Transmit */
3851
#else
3852
#define USCI_A3_VECTOR          (44 * 1u)                    /* 0xFFD8 USCI A3 Receive/Transmit */
3853
/*#define USCI_A3_ISR(func)       ISR_VECTOR(func, ".int44")  */ /* 0xFFD8 USCI A3 Receive/Transmit */ /* CCE V2 Style */
3854
#endif
3855
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3856
#define USCI_B1_VECTOR          ".int45"                    /* 0xFFDA USCI B1 Receive/Transmit */
3857
#else
3858
#define USCI_B1_VECTOR          (45 * 1u)                    /* 0xFFDA USCI B1 Receive/Transmit */
3859
/*#define USCI_B1_ISR(func)       ISR_VECTOR(func, ".int45")  */ /* 0xFFDA USCI B1 Receive/Transmit */ /* CCE V2 Style */
3860
#endif
3861
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3862
#define USCI_A1_VECTOR          ".int46"                    /* 0xFFDC USCI A1 Receive/Transmit */
3863
#else
3864
#define USCI_A1_VECTOR          (46 * 1u)                    /* 0xFFDC USCI A1 Receive/Transmit */
3865
/*#define USCI_A1_ISR(func)       ISR_VECTOR(func, ".int46")  */ /* 0xFFDC USCI A1 Receive/Transmit */ /* CCE V2 Style */
3866
#endif
3867
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3868
#define PORT1_VECTOR            ".int47"                    /* 0xFFDE Port 1 */
3869
#else
3870
#define PORT1_VECTOR            (47 * 1u)                    /* 0xFFDE Port 1 */
3871
/*#define PORT1_ISR(func)         ISR_VECTOR(func, ".int47")  */ /* 0xFFDE Port 1 */ /* CCE V2 Style */
3872
#endif
3873
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3874
#define TIMER1_A1_VECTOR        ".int48"                    /* 0xFFE0 Timer1_A3 CC1-2, TA1 */
3875
#else
3876
#define TIMER1_A1_VECTOR        (48 * 1u)                    /* 0xFFE0 Timer1_A3 CC1-2, TA1 */
3877
/*#define TIMER1_A1_ISR(func)     ISR_VECTOR(func, ".int48")  */ /* 0xFFE0 Timer1_A3 CC1-2, TA1 */ /* CCE V2 Style */
3878
#endif
3879
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3880
#define TIMER1_A0_VECTOR        ".int49"                    /* 0xFFE2 Timer1_A3 CC0 */
3881
#else
3882
#define TIMER1_A0_VECTOR        (49 * 1u)                    /* 0xFFE2 Timer1_A3 CC0 */
3883
/*#define TIMER1_A0_ISR(func)     ISR_VECTOR(func, ".int49")  */ /* 0xFFE2 Timer1_A3 CC0 */ /* CCE V2 Style */
3884
#endif
3885
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3886
#define DMA_VECTOR              ".int50"                    /* 0xFFE4 DMA */
3887
#else
3888
#define DMA_VECTOR              (50 * 1u)                    /* 0xFFE4 DMA */
3889
/*#define DMA_ISR(func)           ISR_VECTOR(func, ".int50")  */ /* 0xFFE4 DMA */ /* CCE V2 Style */
3890
#endif
3891
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3892
#define USCI_B2_VECTOR          ".int51"                    /* 0xFFE6 USCI B2 Receive/Transmit */
3893
#else
3894
#define USCI_B2_VECTOR          (51 * 1u)                    /* 0xFFE6 USCI B2 Receive/Transmit */
3895
/*#define USCI_B2_ISR(func)       ISR_VECTOR(func, ".int51")  */ /* 0xFFE6 USCI B2 Receive/Transmit */ /* CCE V2 Style */
3896
#endif
3897
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3898
#define USCI_A2_VECTOR          ".int52"                    /* 0xFFE8 USCI A2 Receive/Transmit */
3899
#else
3900
#define USCI_A2_VECTOR          (52 * 1u)                    /* 0xFFE8 USCI A2 Receive/Transmit */
3901
/*#define USCI_A2_ISR(func)       ISR_VECTOR(func, ".int52")  */ /* 0xFFE8 USCI A2 Receive/Transmit */ /* CCE V2 Style */
3902
#endif
3903
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3904
#define TIMER0_A1_VECTOR        ".int53"                    /* 0xFFEA Timer0_A5 CC1-4, TA */
3905
#else
3906
#define TIMER0_A1_VECTOR        (53 * 1u)                    /* 0xFFEA Timer0_A5 CC1-4, TA */
3907
/*#define TIMER0_A1_ISR(func)     ISR_VECTOR(func, ".int53")  */ /* 0xFFEA Timer0_A5 CC1-4, TA */ /* CCE V2 Style */
3908
#endif
3909
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3910
#define TIMER0_A0_VECTOR        ".int54"                    /* 0xFFEC Timer0_A5 CC0 */
3911
#else
3912
#define TIMER0_A0_VECTOR        (54 * 1u)                    /* 0xFFEC Timer0_A5 CC0 */
3913
/*#define TIMER0_A0_ISR(func)     ISR_VECTOR(func, ".int54")  */ /* 0xFFEC Timer0_A5 CC0 */ /* CCE V2 Style */
3914
#endif
3915
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3916
#define ADC12_VECTOR            ".int55"                    /* 0xFFEE ADC */
3917
#else
3918
#define ADC12_VECTOR            (55 * 1u)                    /* 0xFFEE ADC */
3919
/*#define ADC12_ISR(func)         ISR_VECTOR(func, ".int55")  */ /* 0xFFEE ADC */ /* CCE V2 Style */
3920
#endif
3921
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3922
#define USCI_B0_VECTOR          ".int56"                    /* 0xFFF0 USCI B0 Receive/Transmit */
3923
#else
3924
#define USCI_B0_VECTOR          (56 * 1u)                    /* 0xFFF0 USCI B0 Receive/Transmit */
3925
/*#define USCI_B0_ISR(func)       ISR_VECTOR(func, ".int56")  */ /* 0xFFF0 USCI B0 Receive/Transmit */ /* CCE V2 Style */
3926
#endif
3927
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3928
#define USCI_A0_VECTOR          ".int57"                    /* 0xFFF2 USCI A0 Receive/Transmit */
3929
#else
3930
#define USCI_A0_VECTOR          (57 * 1u)                    /* 0xFFF2 USCI A0 Receive/Transmit */
3931
/*#define USCI_A0_ISR(func)       ISR_VECTOR(func, ".int57")  */ /* 0xFFF2 USCI A0 Receive/Transmit */ /* CCE V2 Style */
3932
#endif
3933
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3934
#define WDT_VECTOR              ".int58"                    /* 0xFFF4 Watchdog Timer */
3935
#else
3936
#define WDT_VECTOR              (58 * 1u)                    /* 0xFFF4 Watchdog Timer */
3937
/*#define WDT_ISR(func)           ISR_VECTOR(func, ".int58")  */ /* 0xFFF4 Watchdog Timer */ /* CCE V2 Style */
3938
#endif
3939
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3940
#define TIMER0_B1_VECTOR        ".int59"                    /* 0xFFF6 Timer0_B7 CC1-6, TB */
3941
#else
3942
#define TIMER0_B1_VECTOR        (59 * 1u)                    /* 0xFFF6 Timer0_B7 CC1-6, TB */
3943
/*#define TIMER0_B1_ISR(func)     ISR_VECTOR(func, ".int59")  */ /* 0xFFF6 Timer0_B7 CC1-6, TB */ /* CCE V2 Style */
3944
#endif
3945
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3946
#define TIMER0_B0_VECTOR        ".int60"                    /* 0xFFF8 Timer0_B7 CC0 */
3947
#else
3948
#define TIMER0_B0_VECTOR        (60 * 1u)                    /* 0xFFF8 Timer0_B7 CC0 */
3949
/*#define TIMER0_B0_ISR(func)     ISR_VECTOR(func, ".int60")  */ /* 0xFFF8 Timer0_B7 CC0 */ /* CCE V2 Style */
3950
#endif
3951
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3952
#define UNMI_VECTOR             ".int61"                    /* 0xFFFA User Non-maskable */
3953
#else
3954
#define UNMI_VECTOR             (61 * 1u)                    /* 0xFFFA User Non-maskable */
3955
/*#define UNMI_ISR(func)          ISR_VECTOR(func, ".int61")  */ /* 0xFFFA User Non-maskable */ /* CCE V2 Style */
3956
#endif
3957
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3958
#define SYSNMI_VECTOR           ".int62"                    /* 0xFFFC System Non-maskable */
3959
#else
3960
#define SYSNMI_VECTOR           (62 * 1u)                    /* 0xFFFC System Non-maskable */
3961
/*#define SYSNMI_ISR(func)        ISR_VECTOR(func, ".int62")  */ /* 0xFFFC System Non-maskable */ /* CCE V2 Style */
3962
#endif
3963
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3964
#define RESET_VECTOR            ".reset"                    /* 0xFFFE Reset [Highest Priority] */
3965
#else
3966
#define RESET_VECTOR            (63 * 1u)                    /* 0xFFFE Reset [Highest Priority] */
3967
/*#define RESET_ISR(func)         ISR_VECTOR(func, ".int63")  */ /* 0xFFFE Reset [Highest Priority] */ /* CCE V2 Style */
3968
#endif
3969
 
3970
/************************************************************
3971
* End of Modules
3972
************************************************************/
3973
 
3974
#ifdef __cplusplus
3975
}
3976
#endif /* extern "C" */
3977
 
3978
#endif /* #ifndef __msp430x54x */
3979