Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2850 dpurdie 1
/********************************************************************
2
*
3
* Standard register and bit definitions for the Texas Instruments
4
* MSP430 microcontroller.
5
*
6
* This file supports assembler and C development for
7
* MSP430x16x devices.
8
*
9
* Texas Instruments, Version 2.7
10
*
11
* Rev. 2.0, Fixed definitions for DMA
12
* Rev. 2.1, Alignment of defintions in Users Guide and of version numbers
13
* Rev. 2.2, Fixed definitions for I2C
14
* Rev. 2.21,Fixed definitions for I2C for assembler
15
* Rev. 2.3, Fixed type in ADC12 bit definitions (replaced ADC10 with ADC12)
16
*           Added SVS
17
*           Added DMA request definitions
18
* Rev. 2.4, Removed unused def of TASSEL2 / TBSSEL2
19
* Rev. 2.5, Added VLD bits in SVS module
20
* Rev. 2.6, Fixed incorrect bits in I2C STT (wrong:SST) and I2C prefix was missing at some bits
21
* Rev. 2.7, added definitions for Interrupt Vectors xxIV
22
*
23
********************************************************************/
24
 
25
#ifndef __msp430x16x
26
#define __msp430x16x
27
 
28
#ifdef __cplusplus
29
extern "C" {
30
#endif
31
 
32
 
33
/*----------------------------------------------------------------------------*/
34
/* PERIPHERAL FILE MAP                                                        */
35
/*----------------------------------------------------------------------------*/
36
 
37
/* External references resolved by a device-specific linker command file */
38
#define SFR_8BIT(address)   extern volatile unsigned char address
39
#define SFR_16BIT(address)  extern volatile unsigned int address
40
 
41
 
42
/************************************************************
43
* STANDARD BITS
44
************************************************************/
45
 
46
#define BIT0                   (0x0001)
47
#define BIT1                   (0x0002)
48
#define BIT2                   (0x0004)
49
#define BIT3                   (0x0008)
50
#define BIT4                   (0x0010)
51
#define BIT5                   (0x0020)
52
#define BIT6                   (0x0040)
53
#define BIT7                   (0x0080)
54
#define BIT8                   (0x0100)
55
#define BIT9                   (0x0200)
56
#define BITA                   (0x0400)
57
#define BITB                   (0x0800)
58
#define BITC                   (0x1000)
59
#define BITD                   (0x2000)
60
#define BITE                   (0x4000)
61
#define BITF                   (0x8000)
62
 
63
/************************************************************
64
* STATUS REGISTER BITS
65
************************************************************/
66
 
67
#define C                      (0x0001)
68
#define Z                      (0x0002)
69
#define N                      (0x0004)
70
#define V                      (0x0100)
71
#define GIE                    (0x0008)
72
#define CPUOFF                 (0x0010)
73
#define OSCOFF                 (0x0020)
74
#define SCG0                   (0x0040)
75
#define SCG1                   (0x0080)
76
 
77
/* Low Power Modes coded with Bits 4-7 in SR */
78
 
79
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
80
#define LPM0                   (CPUOFF)
81
#define LPM1                   (SCG0+CPUOFF)
82
#define LPM2                   (SCG1+CPUOFF)
83
#define LPM3                   (SCG1+SCG0+CPUOFF)
84
#define LPM4                   (SCG1+SCG0+OSCOFF+CPUOFF)
85
/* End #defines for assembler */
86
 
87
#else /* Begin #defines for C */
88
#define LPM0_bits              (CPUOFF)
89
#define LPM1_bits              (SCG0+CPUOFF)
90
#define LPM2_bits              (SCG1+CPUOFF)
91
#define LPM3_bits              (SCG1+SCG0+CPUOFF)
92
#define LPM4_bits              (SCG1+SCG0+OSCOFF+CPUOFF)
93
 
94
#include "in430.h"
95
 
96
#define LPM0         _bis_SR_register(LPM0_bits)         /* Enter Low Power Mode 0 */
97
#define LPM0_EXIT    _bic_SR_register_on_exit(LPM0_bits) /* Exit Low Power Mode 0 */
98
#define LPM1         _bis_SR_register(LPM1_bits)         /* Enter Low Power Mode 1 */
99
#define LPM1_EXIT    _bic_SR_register_on_exit(LPM1_bits) /* Exit Low Power Mode 1 */
100
#define LPM2         _bis_SR_register(LPM2_bits)         /* Enter Low Power Mode 2 */
101
#define LPM2_EXIT    _bic_SR_register_on_exit(LPM2_bits) /* Exit Low Power Mode 2 */
102
#define LPM3         _bis_SR_register(LPM3_bits)         /* Enter Low Power Mode 3 */
103
#define LPM3_EXIT    _bic_SR_register_on_exit(LPM3_bits) /* Exit Low Power Mode 3 */
104
#define LPM4         _bis_SR_register(LPM4_bits)         /* Enter Low Power Mode 4 */
105
#define LPM4_EXIT    _bic_SR_register_on_exit(LPM4_bits) /* Exit Low Power Mode 4 */
106
#endif /* End #defines for C */
107
 
108
/************************************************************
109
* PERIPHERAL FILE MAP
110
************************************************************/
111
 
112
/************************************************************
113
* SPECIAL FUNCTION REGISTER ADDRESSES + CONTROL BITS
114
************************************************************/
115
 
116
SFR_8BIT(IE1);                                /* Interrupt Enable 1 */
117
#define U0IE                   IE1            /* UART0 Interrupt Enable Register */
118
#define WDTIE                  (0x01)
119
#define OFIE                   (0x02)
120
#define NMIIE                  (0x10)
121
#define ACCVIE                 (0x20)
122
#define URXIE0                 (0x40)
123
#define UTXIE0                 (0x80)
124
 
125
SFR_8BIT(IFG1);                               /* Interrupt Flag 1 */
126
#define U0IFG                  IFG1           /* UART0 Interrupt Flag Register */
127
#define WDTIFG                 (0x01)
128
#define OFIFG                  (0x02)
129
#define NMIIFG                 (0x10)
130
#define URXIFG0                (0x40)
131
#define UTXIFG0                (0x80)
132
 
133
SFR_8BIT(ME1);                                /* Module Enable 1 */
134
#define U0ME                   ME1            /* UART0 Module Enable Register */
135
#define URXE0                  (0x40)
136
#define UTXE0                  (0x80)
137
#define USPIE0                 (0x40)
138
 
139
SFR_8BIT(IE2);                                /* Interrupt Enable 2 */
140
#define U1IE                   IE2            /* UART1 Interrupt Enable Register */
141
#define URXIE1                 (0x10)
142
#define UTXIE1                 (0x20)
143
 
144
SFR_8BIT(IFG2);                               /* Interrupt Flag 2 */
145
#define U1IFG                  IFG2           /* UART1 Interrupt Flag Register */
146
#define URXIFG1                (0x10)
147
#define UTXIFG1                (0x20)
148
 
149
SFR_8BIT(ME2);                                /* Module Enable 2 */
150
#define U1ME                   ME2            /* UART1 Module Enable Register */
151
#define URXE1                  (0x10)
152
#define UTXE1                  (0x20)
153
#define USPIE1                 (0x10)
154
 
155
/************************************************************
156
* WATCHDOG TIMER
157
************************************************************/
158
#define __MSP430_HAS_WDT__                    /* Definition to show that Module is available */
159
 
160
SFR_16BIT(WDTCTL);                            /* Watchdog Timer Control */
161
/* The bit names have been prefixed with "WDT" */
162
#define WDTIS0                 (0x0001)
163
#define WDTIS1                 (0x0002)
164
#define WDTSSEL                (0x0004)
165
#define WDTCNTCL               (0x0008)
166
#define WDTTMSEL               (0x0010)
167
#define WDTNMI                 (0x0020)
168
#define WDTNMIES               (0x0040)
169
#define WDTHOLD                (0x0080)
170
 
171
#define WDTPW                  (0x5A00)
172
 
173
/* WDT-interval times [1ms] coded with Bits 0-2 */
174
/* WDT is clocked by fSMCLK (assumed 1MHz) */
175
#define WDT_MDLY_32         (WDTPW+WDTTMSEL+WDTCNTCL)                         /* 32ms interval (default) */
176
#define WDT_MDLY_8          (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS0)                  /* 8ms     " */
177
#define WDT_MDLY_0_5        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS1)                  /* 0.5ms   " */
178
#define WDT_MDLY_0_064      (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS1+WDTIS0)           /* 0.064ms " */
179
/* WDT is clocked by fACLK (assumed 32KHz) */
180
#define WDT_ADLY_1000       (WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL)                 /* 1000ms  " */
181
#define WDT_ADLY_250        (WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS0)          /* 250ms   " */
182
#define WDT_ADLY_16         (WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS1)          /* 16ms    " */
183
#define WDT_ADLY_1_9        (WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS1+WDTIS0)   /* 1.9ms   " */
184
/* Watchdog mode -> reset after expired time */
185
/* WDT is clocked by fSMCLK (assumed 1MHz) */
186
#define WDT_MRST_32         (WDTPW+WDTCNTCL)                                  /* 32ms interval (default) */
187
#define WDT_MRST_8          (WDTPW+WDTCNTCL+WDTIS0)                           /* 8ms     " */
188
#define WDT_MRST_0_5        (WDTPW+WDTCNTCL+WDTIS1)                           /* 0.5ms   " */
189
#define WDT_MRST_0_064      (WDTPW+WDTCNTCL+WDTIS1+WDTIS0)                    /* 0.064ms " */
190
/* WDT is clocked by fACLK (assumed 32KHz) */
191
#define WDT_ARST_1000       (WDTPW+WDTCNTCL+WDTSSEL)                          /* 1000ms  " */
192
#define WDT_ARST_250        (WDTPW+WDTCNTCL+WDTSSEL+WDTIS0)                   /* 250ms   " */
193
#define WDT_ARST_16         (WDTPW+WDTCNTCL+WDTSSEL+WDTIS1)                   /* 16ms    " */
194
#define WDT_ARST_1_9        (WDTPW+WDTCNTCL+WDTSSEL+WDTIS1+WDTIS0)            /* 1.9ms   " */
195
 
196
/* INTERRUPT CONTROL */
197
/* These two bits are defined in the Special Function Registers */
198
/* #define WDTIE               0x01 */
199
/* #define WDTIFG              0x01 */
200
 
201
/************************************************************
202
* HARDWARE MULTIPLIER
203
************************************************************/
204
#define __MSP430_HAS_MPY__                    /* Definition to show that Module is available */
205
 
206
SFR_16BIT(MPY);                               /* Multiply Unsigned/Operand 1 */
207
SFR_16BIT(MPYS);                              /* Multiply Signed/Operand 1 */
208
SFR_16BIT(MAC);                               /* Multiply Unsigned and Accumulate/Operand 1 */
209
SFR_16BIT(MACS);                              /* Multiply Signed and Accumulate/Operand 1 */
210
SFR_16BIT(OP2);                               /* Operand 2 */
211
SFR_16BIT(RESLO);                             /* Result Low Word */
212
SFR_16BIT(RESHI);                             /* Result High Word */
213
SFR_16BIT(SUMEXT);                            /* Sum Extend */
214
 
215
/************************************************************
216
* DIGITAL I/O Port1/2
217
************************************************************/
218
#define __MSP430_HAS_PORT1__                  /* Definition to show that Module is available */
219
#define __MSP430_HAS_PORT2__                  /* Definition to show that Module is available */
220
 
221
SFR_8BIT(P1IN);                               /* Port 1 Input */
222
SFR_8BIT(P1OUT);                              /* Port 1 Output */
223
SFR_8BIT(P1DIR);                              /* Port 1 Direction */
224
SFR_8BIT(P1IFG);                              /* Port 1 Interrupt Flag */
225
SFR_8BIT(P1IES);                              /* Port 1 Interrupt Edge Select */
226
SFR_8BIT(P1IE);                               /* Port 1 Interrupt Enable */
227
SFR_8BIT(P1SEL);                              /* Port 1 Selection */
228
 
229
SFR_8BIT(P2IN);                               /* Port 2 Input */
230
SFR_8BIT(P2OUT);                              /* Port 2 Output */
231
SFR_8BIT(P2DIR);                              /* Port 2 Direction */
232
SFR_8BIT(P2IFG);                              /* Port 2 Interrupt Flag */
233
SFR_8BIT(P2IES);                              /* Port 2 Interrupt Edge Select */
234
SFR_8BIT(P2IE);                               /* Port 2 Interrupt Enable */
235
SFR_8BIT(P2SEL);                              /* Port 2 Selection */
236
 
237
/************************************************************
238
* DIGITAL I/O Port3/4
239
************************************************************/
240
#define __MSP430_HAS_PORT3__                  /* Definition to show that Module is available */
241
#define __MSP430_HAS_PORT4__                  /* Definition to show that Module is available */
242
 
243
SFR_8BIT(P3IN);                               /* Port 3 Input */
244
SFR_8BIT(P3OUT);                              /* Port 3 Output */
245
SFR_8BIT(P3DIR);                              /* Port 3 Direction */
246
SFR_8BIT(P3SEL);                              /* Port 3 Selection */
247
 
248
SFR_8BIT(P4IN);                               /* Port 4 Input */
249
SFR_8BIT(P4OUT);                              /* Port 4 Output */
250
SFR_8BIT(P4DIR);                              /* Port 4 Direction */
251
SFR_8BIT(P4SEL);                              /* Port 4 Selection */
252
 
253
/************************************************************
254
* DIGITAL I/O Port5/6
255
************************************************************/
256
#define __MSP430_HAS_PORT5__                  /* Definition to show that Module is available */
257
#define __MSP430_HAS_PORT6__                  /* Definition to show that Module is available */
258
 
259
SFR_8BIT(P5IN);                               /* Port 5 Input */
260
SFR_8BIT(P5OUT);                              /* Port 5 Output */
261
SFR_8BIT(P5DIR);                              /* Port 5 Direction */
262
SFR_8BIT(P5SEL);                              /* Port 5 Selection */
263
 
264
SFR_8BIT(P6IN);                               /* Port 6 Input */
265
SFR_8BIT(P6OUT);                              /* Port 6 Output */
266
SFR_8BIT(P6DIR);                              /* Port 6 Direction */
267
SFR_8BIT(P6SEL);                              /* Port 6 Selection */
268
 
269
/************************************************************
270
* USART
271
************************************************************/
272
 
273
/* UxCTL */
274
#define PENA                   (0x80)         /* Parity enable */
275
#define PEV                    (0x40)         /* Parity 0:odd / 1:even */
276
#define SPB                    (0x20)         /* Stop Bits 0:one / 1: two */
277
#define CHAR                   (0x10)         /* Data 0:7-bits / 1:8-bits */
278
#define LISTEN                 (0x08)         /* Listen mode */
279
#define SYNC                   (0x04)         /* UART / SPI mode */
280
#define MM                     (0x02)         /* Master Mode off/on */
281
#define SWRST                  (0x01)         /* USART Software Reset */
282
 
283
/* UxTCTL */
284
#define CKPH                   (0x80)         /* SPI: Clock Phase */
285
#define CKPL                   (0x40)         /* Clock Polarity */
286
#define SSEL1                  (0x20)         /* Clock Source Select 1 */
287
#define SSEL0                  (0x10)         /* Clock Source Select 0 */
288
#define URXSE                  (0x08)         /* Receive Start edge select */
289
#define TXWAKE                 (0x04)         /* TX Wake up mode */
290
#define STC                    (0x02)         /* SPI: STC enable 0:on / 1:off */
291
#define TXEPT                  (0x01)         /* TX Buffer empty */
292
 
293
/* UxRCTL */
294
#define FE                     (0x80)         /* Frame Error */
295
#define PE                     (0x40)         /* Parity Error */
296
#define OE                     (0x20)         /* Overrun Error */
297
#define BRK                    (0x10)         /* Break detected */
298
#define URXEIE                 (0x08)         /* RX Error interrupt enable */
299
#define URXWIE                 (0x04)         /* RX Wake up interrupt enable */
300
#define RXWAKE                 (0x02)         /* RX Wake up detect */
301
#define RXERR                  (0x01)         /* RX Error Error */
302
 
303
/************************************************************
304
* USART 0
305
************************************************************/
306
#define __MSP430_HAS_UART0__                  /* Definition to show that Module is available */
307
 
308
SFR_8BIT(U0CTL);                              /* USART 0 Control */
309
SFR_8BIT(U0TCTL);                             /* USART 0 Transmit Control */
310
SFR_8BIT(U0RCTL);                             /* USART 0 Receive Control */
311
SFR_8BIT(U0MCTL);                             /* USART 0 Modulation Control */
312
SFR_8BIT(U0BR0);                              /* USART 0 Baud Rate 0 */
313
SFR_8BIT(U0BR1);                              /* USART 0 Baud Rate 1 */
314
SFR_8BIT(U0RXBUF);                            /* USART 0 Receive Buffer */
315
SFR_8BIT(U0TXBUF);                            /* USART 0 Transmit Buffer */
316
 
317
/* Alternate register names */
318
 
319
#define UCTL0                  U0CTL          /* USART 0 Control */
320
#define UTCTL0                 U0TCTL         /* USART 0 Transmit Control */
321
#define URCTL0                 U0RCTL         /* USART 0 Receive Control */
322
#define UMCTL0                 U0MCTL         /* USART 0 Modulation Control */
323
#define UBR00                  U0BR0          /* USART 0 Baud Rate 0 */
324
#define UBR10                  U0BR1          /* USART 0 Baud Rate 1 */
325
#define RXBUF0                 U0RXBUF        /* USART 0 Receive Buffer */
326
#define TXBUF0                 U0TXBUF        /* USART 0 Transmit Buffer */
327
#define UCTL0_                 U0CTL_         /* USART 0 Control */
328
#define UTCTL0_                U0TCTL_        /* USART 0 Transmit Control */
329
#define URCTL0_                U0RCTL_        /* USART 0 Receive Control */
330
#define UMCTL0_                U0MCTL_        /* USART 0 Modulation Control */
331
#define UBR00_                 U0BR0_         /* USART 0 Baud Rate 0 */
332
#define UBR10_                 U0BR1_         /* USART 0 Baud Rate 1 */
333
#define RXBUF0_                U0RXBUF_       /* USART 0 Receive Buffer */
334
#define TXBUF0_                U0TXBUF_       /* USART 0 Transmit Buffer */
335
#define UCTL_0                 U0CTL          /* USART 0 Control */
336
#define UTCTL_0                U0TCTL         /* USART 0 Transmit Control */
337
#define URCTL_0                U0RCTL         /* USART 0 Receive Control */
338
#define UMCTL_0                U0MCTL         /* USART 0 Modulation Control */
339
#define UBR0_0                 U0BR0          /* USART 0 Baud Rate 0 */
340
#define UBR1_0                 U0BR1          /* USART 0 Baud Rate 1 */
341
#define RXBUF_0                U0RXBUF        /* USART 0 Receive Buffer */
342
#define TXBUF_0                U0TXBUF        /* USART 0 Transmit Buffer */
343
#define UCTL_0_                U0CTL_         /* USART 0 Control */
344
#define UTCTL_0_               U0TCTL_        /* USART 0 Transmit Control */
345
#define URCTL_0_               U0RCTL_        /* USART 0 Receive Control */
346
#define UMCTL_0_               U0MCTL_        /* USART 0 Modulation Control */
347
#define UBR0_0_                U0BR0_         /* USART 0 Baud Rate 0 */
348
#define UBR1_0_                U0BR1_         /* USART 0 Baud Rate 1 */
349
#define RXBUF_0_               U0RXBUF_       /* USART 0 Receive Buffer */
350
#define TXBUF_0_               U0TXBUF_       /* USART 0 Transmit Buffer */
351
 
352
/************************************************************
353
* USART 1
354
************************************************************/
355
#define __MSP430_HAS_UART1__                  /* Definition to show that Module is available */
356
 
357
SFR_8BIT(U1CTL);                              /* USART 1 Control */
358
SFR_8BIT(U1TCTL);                             /* USART 1 Transmit Control */
359
SFR_8BIT(U1RCTL);                             /* USART 1 Receive Control */
360
SFR_8BIT(U1MCTL);                             /* USART 1 Modulation Control */
361
SFR_8BIT(U1BR0);                              /* USART 1 Baud Rate 0 */
362
SFR_8BIT(U1BR1);                              /* USART 1 Baud Rate 1 */
363
SFR_8BIT(U1RXBUF);                            /* USART 1 Receive Buffer */
364
SFR_8BIT(U1TXBUF);                            /* USART 1 Transmit Buffer */
365
 
366
/* Alternate register names */
367
 
368
#define UCTL1                  U1CTL          /* USART 1 Control */
369
#define UTCTL1                 U1TCTL         /* USART 1 Transmit Control */
370
#define URCTL1                 U1RCTL         /* USART 1 Receive Control */
371
#define UMCTL1                 U1MCTL         /* USART 1 Modulation Control */
372
#define UBR01                  U1BR0          /* USART 1 Baud Rate 0 */
373
#define UBR11                  U1BR1          /* USART 1 Baud Rate 1 */
374
#define RXBUF1                 U1RXBUF        /* USART 1 Receive Buffer */
375
#define TXBUF1                 U1TXBUF        /* USART 1 Transmit Buffer */
376
#define UCTL1_                 U1CTL_         /* USART 1 Control */
377
#define UTCTL1_                U1TCTL_        /* USART 1 Transmit Control */
378
#define URCTL1_                U1RCTL_        /* USART 1 Receive Control */
379
#define UMCTL1_                U1MCTL_        /* USART 1 Modulation Control */
380
#define UBR01_                 U1BR0_         /* USART 1 Baud Rate 0 */
381
#define UBR11_                 U1BR1_         /* USART 1 Baud Rate 1 */
382
#define RXBUF1_                U1RXBUF_       /* USART 1 Receive Buffer */
383
#define TXBUF1_                U1TXBUF_       /* USART 1 Transmit Buffer */
384
#define UCTL_1                 U1CTL          /* USART 1 Control */
385
#define UTCTL_1                U1TCTL         /* USART 1 Transmit Control */
386
#define URCTL_1                U1RCTL         /* USART 1 Receive Control */
387
#define UMCTL_1                U1MCTL         /* USART 1 Modulation Control */
388
#define UBR0_1                 U1BR0          /* USART 1 Baud Rate 0 */
389
#define UBR1_1                 U1BR1          /* USART 1 Baud Rate 1 */
390
#define RXBUF_1                U1RXBUF        /* USART 1 Receive Buffer */
391
#define TXBUF_1                U1TXBUF        /* USART 1 Transmit Buffer */
392
#define UCTL_1_                U1CTL_         /* USART 1 Control */
393
#define UTCTL_1_               U1TCTL_        /* USART 1 Transmit Control */
394
#define URCTL_1_               U1RCTL_        /* USART 1 Receive Control */
395
#define UMCTL_1_               U1MCTL_        /* USART 1 Modulation Control */
396
#define UBR0_1_                U1BR0_         /* USART 1 Baud Rate 0 */
397
#define UBR1_1_                U1BR1_         /* USART 1 Baud Rate 1 */
398
#define RXBUF_1_               U1RXBUF_       /* USART 1 Receive Buffer */
399
#define TXBUF_1_               U1TXBUF_       /* USART 1 Transmit Buffer */
400
 
401
/************************************************************
402
* USART0  I2C
403
************************************************************/
404
#define __MSP430_HAS_I2C__                    /* Definition to show that Module is available */
405
 
406
SFR_8BIT(I2CIE);                              /* I2C Interrupt Enable */
407
#define ALIE                   (0x01)         /* Arbitration lost */
408
#define NACKIE                 (0x02)         /* No acknowledge */
409
#define OAIE                   (0x04)         /* Own address */
410
#define ARDYIE                 (0x08)         /* Access ready (opeation complete) */
411
#define RXRDYIE                (0x10)         /* Receive ready (data received) */
412
#define TXRDYIE                (0x20)         /* Transmit ready (transmit register empty) */
413
#define GCIE                   (0x40)         /* General call */
414
#define STTIE                  (0x80)         /* Start condition */
415
 
416
SFR_8BIT(I2CIFG);                             /* I2C Interrupt Flag */
417
#define ALIFG                  (0x01)         /* Arbitration lost */
418
#define NACKIFG                (0x02)         /* No acknowledge */
419
#define OAIFG                  (0x04)         /* Own address */
420
#define ARDYIFG                (0x08)         /* Access ready (opeation complete) */
421
#define RXRDYIFG               (0x10)         /* Receive ready (data received) */
422
#define TXRDYIFG               (0x20)         /* Transmit ready (transmit register empty) */
423
#define GCIFG                  (0x40)         /* General call */
424
#define STTIFG                 (0x80)         /* Start condition */
425
 
426
SFR_8BIT(I2CNDAT);                            /* I2C Data Count */
427
 
428
/* USART 0 Control */
429
#define I2CEN                  (0x01)         /* I2C enable */
430
#define MST                    (0x02)         /* I2C master */
431
#define XA                     (0x10)         /* I2C extended addressing */
432
#define I2C                    (0x20)         /* USART I2C */
433
#define TXDMAEN                (0x40)         /* Transmit DMA enable */
434
#define RXDMAEN                (0x80)         /* Receive DMA enable */
435
 
436
SFR_8BIT(I2CTCTL);                            /* I2C Transfer Control */
437
#define I2CSTT                 (0x01)         /* Start bit */
438
#define I2CSTP                 (0x02)         /* Stop bit */
439
#define I2CSTB                 (0x04)         /* Start byte mode */
440
#define I2CTRX                 (0x08)         /* Transmit */
441
#define I2CSSEL0               (0x10)         /* Clock select bit 0 */
442
#define I2CSSEL1               (0x20)         /* Clock select bit 1 */
443
#define I2CRM                  (0x40)         /* Repeat mode */
444
#define I2CWORD                (0x80)         /* Word data mode */
445
 
446
#define I2CSSEL_0              (0*0x10u)      /* I2C clock select 0: UCLK */
447
#define I2CSSEL_1              (1*0x10u)      /* I2C clock select 1: ACLK */
448
#define I2CSSEL_2              (2*0x10u)      /* I2C clock select 2: SMCLK */
449
#define I2CSSEL_3              (3*0x10u)      /* I2C clock select 3: SMCLK */
450
 
451
#define I2CMM_0                (0x00)         /* Master mode 0 */
452
#define I2CMM_1                (I2CSTT)       /* Master mode 1 */
453
#define I2CMM_2             (I2CSTP+I2CSTT) /* Master mode 2 */
454
#define I2CMM_3                (I2CRM+I2CSTT) /* Master mode 3 */
455
#define I2CMM_4                (I2CSTP)       /* Master mode 4 */
456
 
457
SFR_8BIT(I2CDCTL);                            /* I2C Data Control */
458
#define I2CBB                  (0x01)         /* Bus busy */
459
#define I2CRXOVR               (0x02)         /* Receiver overrun */
460
#define I2CTXUDF               (0x04)         /* Transmit underflow */
461
#define I2CSBD                 (0x08)         /* Received byte */
462
#define I2CSCLLOW              (0x10)         /* SCL being held low */
463
#define I2CBUSY                (0x20)         /* I2C Busy Flag */
464
 
465
SFR_8BIT(I2CPSC);                             /* I2C Pre-scaler */
466
SFR_8BIT(I2CSCLH);                            /* I2C SCL High */
467
SFR_8BIT(I2CSCLL);                            /* I2C SCL Low */
468
SFR_8BIT(I2CDRB);                             /* I2C Data for Byte access */
469
SFR_16BIT(I2CDRW);                            /* I2C Data for Word access */
470
 
471
SFR_16BIT(I2COA);                             /* I2C Own Address */
472
SFR_16BIT(I2CSA);                             /* I2C Slave Address */
473
 
474
SFR_16BIT(I2CIV);                             /* I2C Interrupt Vector */
475
#define I2CIV_NONE             (0x0000)       /* I2C interrupt vector: No interrupt pending */
476
#define I2CIV_AL               (0x0002)       /* I2C interrupt vector: Arbitration lost (ALIFG) */
477
#define I2CIV_NACK             (0x0004)       /* I2C interrupt vector: No acknowledge (NACKIFG) */
478
#define I2CIV_OA               (0x0006)       /* I2C interrupt vector: Own address (OAIFG) */
479
#define I2CIV_ARDY             (0x0008)       /* I2C interrupt vector: Access ready (ARDYIFG) */
480
#define I2CIV_RXRDY            (0x000A)       /* I2C interrupt vector: Receive ready (RXRDYIFG) */
481
#define I2CIV_TXRDY            (0x000C)       /* I2C interrupt vector: Transmit ready (TXRDYIFG) */
482
#define I2CIV_GC               (0x000E)       /* I2C interrupt vector: General call (GCIFG) */
483
#define I2CIV_STT              (0x0010)       /* I2C interrupt vector: Start condition (STTIFG) */
484
 
485
/************************************************************
486
* Timer A3
487
************************************************************/
488
#define __MSP430_HAS_TA3__                    /* Definition to show that Module is available */
489
 
490
SFR_16BIT(TAIV);                              /* Timer A Interrupt Vector Word */
491
SFR_16BIT(TACTL);                             /* Timer A Control */
492
SFR_16BIT(TACCTL0);                           /* Timer A Capture/Compare Control 0 */
493
SFR_16BIT(TACCTL1);                           /* Timer A Capture/Compare Control 1 */
494
SFR_16BIT(TACCTL2);                           /* Timer A Capture/Compare Control 2 */
495
SFR_16BIT(TAR);                               /* Timer A Counter Register */
496
SFR_16BIT(TACCR0);                            /* Timer A Capture/Compare 0 */
497
SFR_16BIT(TACCR1);                            /* Timer A Capture/Compare 1 */
498
SFR_16BIT(TACCR2);                            /* Timer A Capture/Compare 2 */
499
 
500
/* Alternate register names */
501
#define CCTL0                  TACCTL0        /* Timer A Capture/Compare Control 0 */
502
#define CCTL1                  TACCTL1        /* Timer A Capture/Compare Control 1 */
503
#define CCTL2                  TACCTL2        /* Timer A Capture/Compare Control 2 */
504
#define CCR0                   TACCR0         /* Timer A Capture/Compare 0 */
505
#define CCR1                   TACCR1         /* Timer A Capture/Compare 1 */
506
#define CCR2                   TACCR2         /* Timer A Capture/Compare 2 */
507
#define CCTL0_                 TACCTL0_       /* Timer A Capture/Compare Control 0 */
508
#define CCTL1_                 TACCTL1_       /* Timer A Capture/Compare Control 1 */
509
#define CCTL2_                 TACCTL2_       /* Timer A Capture/Compare Control 2 */
510
#define CCR0_                  TACCR0_        /* Timer A Capture/Compare 0 */
511
#define CCR1_                  TACCR1_        /* Timer A Capture/Compare 1 */
512
#define CCR2_                  TACCR2_        /* Timer A Capture/Compare 2 */
513
/* Alternate register names - 5xx style */
514
#define TA0IV                  TAIV           /* Timer A Interrupt Vector Word */
515
#define TA0CTL                 TACTL          /* Timer A Control */
516
#define TA0CCTL0               TACCTL0        /* Timer A Capture/Compare Control 0 */
517
#define TA0CCTL1               TACCTL1        /* Timer A Capture/Compare Control 1 */
518
#define TA0CCTL2               TACCTL2        /* Timer A Capture/Compare Control 2 */
519
#define TA0R                   TAR            /* Timer A Counter Register */
520
#define TA0CCR0                TACCR0         /* Timer A Capture/Compare 0 */
521
#define TA0CCR1                TACCR1         /* Timer A Capture/Compare 1 */
522
#define TA0CCR2                TACCR2         /* Timer A Capture/Compare 2 */
523
#define TA0IV_                 TAIV_          /* Timer A Interrupt Vector Word */
524
#define TA0CTL_                TACTL_         /* Timer A Control */
525
#define TA0CCTL0_              TACCTL0_       /* Timer A Capture/Compare Control 0 */
526
#define TA0CCTL1_              TACCTL1_       /* Timer A Capture/Compare Control 1 */
527
#define TA0CCTL2_              TACCTL2_       /* Timer A Capture/Compare Control 2 */
528
#define TA0R_                  TAR_           /* Timer A Counter Register */
529
#define TA0CCR0_               TACCR0_        /* Timer A Capture/Compare 0 */
530
#define TA0CCR1_               TACCR1_        /* Timer A Capture/Compare 1 */
531
#define TA0CCR2_               TACCR2_        /* Timer A Capture/Compare 2 */
532
 
533
#define TASSEL1                (0x0200)       /* Timer A clock source select 0 */
534
#define TASSEL0                (0x0100)       /* Timer A clock source select 1 */
535
#define ID1                    (0x0080)       /* Timer A clock input divider 1 */
536
#define ID0                    (0x0040)       /* Timer A clock input divider 0 */
537
#define MC1                    (0x0020)       /* Timer A mode control 1 */
538
#define MC0                    (0x0010)       /* Timer A mode control 0 */
539
#define TACLR                  (0x0004)       /* Timer A counter clear */
540
#define TAIE                   (0x0002)       /* Timer A counter interrupt enable */
541
#define TAIFG                  (0x0001)       /* Timer A counter interrupt flag */
542
 
543
#define MC_0                   (0*0x10u)      /* Timer A mode control: 0 - Stop */
544
#define MC_1                   (1*0x10u)      /* Timer A mode control: 1 - Up to CCR0 */
545
#define MC_2                   (2*0x10u)      /* Timer A mode control: 2 - Continous up */
546
#define MC_3                   (3*0x10u)      /* Timer A mode control: 3 - Up/Down */
547
#define ID_0                   (0*0x40u)      /* Timer A input divider: 0 - /1 */
548
#define ID_1                   (1*0x40u)      /* Timer A input divider: 1 - /2 */
549
#define ID_2                   (2*0x40u)      /* Timer A input divider: 2 - /4 */
550
#define ID_3                   (3*0x40u)      /* Timer A input divider: 3 - /8 */
551
#define TASSEL_0               (0*0x100u)     /* Timer A clock source select: 0 - TACLK */
552
#define TASSEL_1               (1*0x100u)     /* Timer A clock source select: 1 - ACLK  */
553
#define TASSEL_2               (2*0x100u)     /* Timer A clock source select: 2 - SMCLK */
554
#define TASSEL_3               (3*0x100u)     /* Timer A clock source select: 3 - INCLK */
555
 
556
#define CM1                    (0x8000)       /* Capture mode 1 */
557
#define CM0                    (0x4000)       /* Capture mode 0 */
558
#define CCIS1                  (0x2000)       /* Capture input select 1 */
559
#define CCIS0                  (0x1000)       /* Capture input select 0 */
560
#define SCS                    (0x0800)       /* Capture sychronize */
561
#define SCCI                   (0x0400)       /* Latched capture signal (read) */
562
#define CAP                    (0x0100)       /* Capture mode: 1 /Compare mode : 0 */
563
#define OUTMOD2                (0x0080)       /* Output mode 2 */
564
#define OUTMOD1                (0x0040)       /* Output mode 1 */
565
#define OUTMOD0                (0x0020)       /* Output mode 0 */
566
#define CCIE                   (0x0010)       /* Capture/compare interrupt enable */
567
#define CCI                    (0x0008)       /* Capture input signal (read) */
568
#define OUT                    (0x0004)       /* PWM Output signal if output mode 0 */
569
#define COV                    (0x0002)       /* Capture/compare overflow flag */
570
#define CCIFG                  (0x0001)       /* Capture/compare interrupt flag */
571
 
572
#define OUTMOD_0               (0*0x20u)      /* PWM output mode: 0 - output only */
573
#define OUTMOD_1               (1*0x20u)      /* PWM output mode: 1 - set */
574
#define OUTMOD_2               (2*0x20u)      /* PWM output mode: 2 - PWM toggle/reset */
575
#define OUTMOD_3               (3*0x20u)      /* PWM output mode: 3 - PWM set/reset */
576
#define OUTMOD_4               (4*0x20u)      /* PWM output mode: 4 - toggle */
577
#define OUTMOD_5               (5*0x20u)      /* PWM output mode: 5 - Reset */
578
#define OUTMOD_6               (6*0x20u)      /* PWM output mode: 6 - PWM toggle/set */
579
#define OUTMOD_7               (7*0x20u)      /* PWM output mode: 7 - PWM reset/set */
580
#define CCIS_0                 (0*0x1000u)    /* Capture input select: 0 - CCIxA */
581
#define CCIS_1                 (1*0x1000u)    /* Capture input select: 1 - CCIxB */
582
#define CCIS_2                 (2*0x1000u)    /* Capture input select: 2 - GND */
583
#define CCIS_3                 (3*0x1000u)    /* Capture input select: 3 - Vcc */
584
#define CM_0                   (0*0x4000u)    /* Capture mode: 0 - disabled */
585
#define CM_1                   (1*0x4000u)    /* Capture mode: 1 - pos. edge */
586
#define CM_2                   (2*0x4000u)    /* Capture mode: 1 - neg. edge */
587
#define CM_3                   (3*0x4000u)    /* Capture mode: 1 - both edges */
588
 
589
/* TA3IV Definitions */
590
#define TAIV_NONE              (0x0000)       /* No Interrupt pending */
591
#define TAIV_TACCR1            (0x0002)       /* TACCR1_CCIFG */
592
#define TAIV_TACCR2            (0x0004)       /* TACCR2_CCIFG */
593
#define TAIV_6                 (0x0006)       /* Reserved */
594
#define TAIV_8                 (0x0008)       /* Reserved */
595
#define TAIV_TAIFG             (0x000A)       /* TAIFG */
596
 
597
/************************************************************
598
* Timer B7
599
************************************************************/
600
#define __MSP430_HAS_TB7__                    /* Definition to show that Module is available */
601
 
602
SFR_16BIT(TBIV);                              /* Timer B Interrupt Vector Word */
603
SFR_16BIT(TBCTL);                             /* Timer B Control */
604
SFR_16BIT(TBCCTL0);                           /* Timer B Capture/Compare Control 0 */
605
SFR_16BIT(TBCCTL1);                           /* Timer B Capture/Compare Control 1 */
606
SFR_16BIT(TBCCTL2);                           /* Timer B Capture/Compare Control 2 */
607
SFR_16BIT(TBCCTL3);                           /* Timer B Capture/Compare Control 3 */
608
SFR_16BIT(TBCCTL4);                           /* Timer B Capture/Compare Control 4 */
609
SFR_16BIT(TBCCTL5);                           /* Timer B Capture/Compare Control 5 */
610
SFR_16BIT(TBCCTL6);                           /* Timer B Capture/Compare Control 6 */
611
SFR_16BIT(TBR);                               /* Timer B Counter Register */
612
SFR_16BIT(TBCCR0);                            /* Timer B Capture/Compare 0 */
613
SFR_16BIT(TBCCR1);                            /* Timer B Capture/Compare 1 */
614
SFR_16BIT(TBCCR2);                            /* Timer B Capture/Compare 2 */
615
SFR_16BIT(TBCCR3);                            /* Timer B Capture/Compare 3 */
616
SFR_16BIT(TBCCR4);                            /* Timer B Capture/Compare 4 */
617
SFR_16BIT(TBCCR5);                            /* Timer B Capture/Compare 5 */
618
SFR_16BIT(TBCCR6);                            /* Timer B Capture/Compare 6 */
619
 
620
/* Alternate register names - 5xx style */
621
#define TB0IV                  TBIV           /* Timer B Interrupt Vector Word */
622
#define TB0CTL                 TBCTL          /* Timer B Control */
623
#define TB0CCTL0               TBCCTL0        /* Timer B Capture/Compare Control 0 */
624
#define TB0CCTL1               TBCCTL1        /* Timer B Capture/Compare Control 1 */
625
#define TB0CCTL2               TBCCTL2        /* Timer B Capture/Compare Control 2 */
626
#define TB0CCTL3               TBCCTL3        /* Timer B Capture/Compare Control 3 */
627
#define TB0CCTL4               TBCCTL4        /* Timer B Capture/Compare Control 4 */
628
#define TB0CCTL5               TBCCTL5        /* Timer B Capture/Compare Control 5 */
629
#define TB0CCTL6               TBCCTL6        /* Timer B Capture/Compare Control 6 */
630
#define TB0R                   TBR            /* Timer B Counter Register */
631
#define TB0CCR0                TBCCR0         /* Timer B Capture/Compare 0 */
632
#define TB0CCR1                TBCCR1         /* Timer B Capture/Compare 1 */
633
#define TB0CCR2                TBCCR2         /* Timer B Capture/Compare 2 */
634
#define TB0CCR3                TBCCR3         /* Timer B Capture/Compare 3 */
635
#define TB0CCR4                TBCCR4         /* Timer B Capture/Compare 4 */
636
#define TB0CCR5                TBCCR5         /* Timer B Capture/Compare 5 */
637
#define TB0CCR6                TBCCR6         /* Timer B Capture/Compare 6 */
638
#define TB0IV_                 TBIV_          /* Timer B Interrupt Vector Word */
639
#define TB0CTL_                TBCTL_         /* Timer B Control */
640
#define TB0CCTL0_              TBCCTL0_       /* Timer B Capture/Compare Control 0 */
641
#define TB0CCTL1_              TBCCTL1_       /* Timer B Capture/Compare Control 1 */
642
#define TB0CCTL2_              TBCCTL2_       /* Timer B Capture/Compare Control 2 */
643
#define TB0CCTL3_              TBCCTL3_       /* Timer B Capture/Compare Control 3 */
644
#define TB0CCTL4_              TBCCTL4_       /* Timer B Capture/Compare Control 4 */
645
#define TB0CCTL5_              TBCCTL5_       /* Timer B Capture/Compare Control 5 */
646
#define TB0CCTL6_              TBCCTL6_       /* Timer B Capture/Compare Control 6 */
647
#define TB0R_                  TBR_           /* Timer B Counter Register */
648
#define TB0CCR0_               TBCCR0_        /* Timer B Capture/Compare 0 */
649
#define TB0CCR1_               TBCCR1_        /* Timer B Capture/Compare 1 */
650
#define TB0CCR2_               TBCCR2_        /* Timer B Capture/Compare 2 */
651
#define TB0CCR3_               TBCCR3_        /* Timer B Capture/Compare 3 */
652
#define TB0CCR4_               TBCCR4_        /* Timer B Capture/Compare 4 */
653
#define TB0CCR5_               TBCCR5_        /* Timer B Capture/Compare 5 */
654
#define TB0CCR6_               TBCCR6_        /* Timer B Capture/Compare 6 */
655
 
656
#define TBCLGRP1               (0x4000)       /* Timer B Compare latch load group 1 */
657
#define TBCLGRP0               (0x2000)       /* Timer B Compare latch load group 0 */
658
#define CNTL1                  (0x1000)       /* Counter lenght 1 */
659
#define CNTL0                  (0x0800)       /* Counter lenght 0 */
660
#define TBSSEL1                (0x0200)       /* Clock source 1 */
661
#define TBSSEL0                (0x0100)       /* Clock source 0 */
662
#define TBCLR                  (0x0004)       /* Timer B counter clear */
663
#define TBIE                   (0x0002)       /* Timer B interrupt enable */
664
#define TBIFG                  (0x0001)       /* Timer B interrupt flag */
665
 
666
#define SHR1                   (0x4000)       /* Timer B Compare latch load group 1 */
667
#define SHR0                   (0x2000)       /* Timer B Compare latch load group 0 */
668
 
669
#define TBSSEL_0               (0*0x0100u)    /* Clock Source: TBCLK */
670
#define TBSSEL_1               (1*0x0100u)    /* Clock Source: ACLK  */
671
#define TBSSEL_2               (2*0x0100u)    /* Clock Source: SMCLK */
672
#define TBSSEL_3               (3*0x0100u)    /* Clock Source: INCLK */
673
#define CNTL_0                 (0*0x0800u)    /* Counter lenght: 16 bit */
674
#define CNTL_1                 (1*0x0800u)    /* Counter lenght: 12 bit */
675
#define CNTL_2                 (2*0x0800u)    /* Counter lenght: 10 bit */
676
#define CNTL_3                 (3*0x0800u)    /* Counter lenght:  8 bit */
677
#define SHR_0                  (0*0x2000u)    /* Timer B Group: 0 - individually */
678
#define SHR_1                  (1*0x2000u)    /* Timer B Group: 1 - 3 groups (1-2, 3-4, 5-6) */
679
#define SHR_2                  (2*0x2000u)    /* Timer B Group: 2 - 2 groups (1-3, 4-6)*/
680
#define SHR_3                  (3*0x2000u)    /* Timer B Group: 3 - 1 group (all) */
681
#define TBCLGRP_0              (0*0x2000u)    /* Timer B Group: 0 - individually */
682
#define TBCLGRP_1              (1*0x2000u)    /* Timer B Group: 1 - 3 groups (1-2, 3-4, 5-6) */
683
#define TBCLGRP_2              (2*0x2000u)    /* Timer B Group: 2 - 2 groups (1-3, 4-6)*/
684
#define TBCLGRP_3              (3*0x2000u)    /* Timer B Group: 3 - 1 group (all) */
685
 
686
/* Additional Timer B Control Register bits are defined in Timer A */
687
#define CLLD1                  (0x0400)       /* Compare latch load source 1 */
688
#define CLLD0                  (0x0200)       /* Compare latch load source 0 */
689
 
690
#define SLSHR1                 (0x0400)       /* Compare latch load source 1 */
691
#define SLSHR0                 (0x0200)       /* Compare latch load source 0 */
692
 
693
#define SLSHR_0                (0*0x0200u)    /* Compare latch load sourec : 0 - immediate */
694
#define SLSHR_1                (1*0x0200u)    /* Compare latch load sourec : 1 - TBR counts to 0 */
695
#define SLSHR_2                (2*0x0200u)    /* Compare latch load sourec : 2 - up/down */
696
#define SLSHR_3                (3*0x0200u)    /* Compare latch load sourec : 3 - TBR counts to TBCTL0 */
697
 
698
#define CLLD_0                 (0*0x0200u)    /* Compare latch load sourec : 0 - immediate */
699
#define CLLD_1                 (1*0x0200u)    /* Compare latch load sourec : 1 - TBR counts to 0 */
700
#define CLLD_2                 (2*0x0200u)    /* Compare latch load sourec : 2 - up/down */
701
#define CLLD_3                 (3*0x0200u)    /* Compare latch load sourec : 3 - TBR counts to TBCTL0 */
702
 
703
/* TB7IV Definitions */
704
#define TBIV_NONE              (0x0000)       /* No Interrupt pending */
705
#define TBIV_TBCCR1            (0x0002)       /* TBCCR1_CCIFG */
706
#define TBIV_TBCCR2            (0x0004)       /* TBCCR2_CCIFG */
707
#define TBIV_TBCCR3            (0x0006)       /* TBCCR3_CCIFG */
708
#define TBIV_TBCCR4            (0x0008)       /* TBCCR4_CCIFG */
709
#define TBIV_TBCCR5            (0x000A)       /* TBCCR3_CCIFG */
710
#define TBIV_TBCCR6            (0x000C)       /* TBCCR4_CCIFG */
711
#define TBIV_TBIFG             (0x000E)       /* TBIFG */
712
 
713
/************************************************************
714
* Basic Clock Module
715
************************************************************/
716
#define __MSP430_HAS_BASIC_CLOCK__                /* Definition to show that Module is available */
717
 
718
SFR_8BIT(DCOCTL);                             /* DCO Clock Frequency Control */
719
SFR_8BIT(BCSCTL1);                            /* Basic Clock System Control 1 */
720
SFR_8BIT(BCSCTL2);                            /* Basic Clock System Control 2 */
721
 
722
#define MOD0                   (0x01)         /* Modulation Bit 0 */
723
#define MOD1                   (0x02)         /* Modulation Bit 1 */
724
#define MOD2                   (0x04)         /* Modulation Bit 2 */
725
#define MOD3                   (0x08)         /* Modulation Bit 3 */
726
#define MOD4                   (0x10)         /* Modulation Bit 4 */
727
#define DCO0                   (0x20)         /* DCO Select Bit 0 */
728
#define DCO1                   (0x40)         /* DCO Select Bit 1 */
729
#define DCO2                   (0x80)         /* DCO Select Bit 2 */
730
 
731
#define RSEL0                  (0x01)         /* Range Select Bit 0 */
732
#define RSEL1                  (0x02)         /* Range Select Bit 1 */
733
#define RSEL2                  (0x04)         /* Range Select Bit 2 */
734
#define XT5V                   (0x08)         /* XT5V should always be reset */
735
#define DIVA0                  (0x10)         /* ACLK Divider 0 */
736
#define DIVA1                  (0x20)         /* ACLK Divider 1 */
737
#define XTS                    (0x40)         /* LFXTCLK 0:Low Freq. / 1: High Freq. */
738
#define XT2OFF                 (0x80)         /* Enable XT2CLK */
739
 
740
#define DIVA_0                 (0x00)         /* ACLK Divider 0: /1 */
741
#define DIVA_1                 (0x10)         /* ACLK Divider 1: /2 */
742
#define DIVA_2                 (0x20)         /* ACLK Divider 2: /4 */
743
#define DIVA_3                 (0x30)         /* ACLK Divider 3: /8 */
744
 
745
#define DCOR                   (0x01)         /* Enable External Resistor : 1 */
746
#define DIVS0                  (0x02)         /* SMCLK Divider 0 */
747
#define DIVS1                  (0x04)         /* SMCLK Divider 1 */
748
#define SELS                   (0x08)         /* SMCLK Source Select 0:DCOCLK / 1:XT2CLK/LFXTCLK */
749
#define DIVM0                  (0x10)         /* MCLK Divider 0 */
750
#define DIVM1                  (0x20)         /* MCLK Divider 1 */
751
#define SELM0                  (0x40)         /* MCLK Source Select 0 */
752
#define SELM1                  (0x80)         /* MCLK Source Select 1 */
753
 
754
#define DIVS_0                 (0x00)         /* SMCLK Divider 0: /1 */
755
#define DIVS_1                 (0x02)         /* SMCLK Divider 1: /2 */
756
#define DIVS_2                 (0x04)         /* SMCLK Divider 2: /4 */
757
#define DIVS_3                 (0x06)         /* SMCLK Divider 3: /8 */
758
 
759
#define DIVM_0                 (0x00)         /* MCLK Divider 0: /1 */
760
#define DIVM_1                 (0x10)         /* MCLK Divider 1: /2 */
761
#define DIVM_2                 (0x20)         /* MCLK Divider 2: /4 */
762
#define DIVM_3                 (0x30)         /* MCLK Divider 3: /8 */
763
 
764
#define SELM_0                 (0x00)         /* MCLK Source Select 0: DCOCLK */
765
#define SELM_1                 (0x40)         /* MCLK Source Select 1: DCOCLK */
766
#define SELM_2                 (0x80)         /* MCLK Source Select 2: XT2CLK/LFXTCLK */
767
#define SELM_3                 (0xC0)         /* MCLK Source Select 3: LFXTCLK */
768
 
769
/************************************************************
770
* Brown-Out, Supply Voltage Supervision (SVS)
771
************************************************************/
772
#define __MSP430_HAS_SVS__                    /* Definition to show that Module is available */
773
 
774
SFR_8BIT(SVSCTL);                             /* SVS Control */
775
#define SVSFG                  (0x01)         /* SVS Flag */
776
#define SVSOP                  (0x02)         /* SVS output (read only) */
777
#define SVSON                  (0x04)         /* Switches the SVS on/off */
778
#define PORON                  (0x08)         /* Enable POR Generation if Low Voltage */
779
#define VLD0                   (0x10)
780
#define VLD1                   (0x20)
781
#define VLD2                   (0x40)
782
#define VLD3                   (0x80)
783
 
784
#define VLDON                  (0x10)
785
#define VLDOFF                 (0x00)
786
#define VLD_1_8V               (0x10)
787
 
788
/*************************************************************
789
* Flash Memory
790
*************************************************************/
791
#define __MSP430_HAS_FLASH__                  /* Definition to show that Module is available */
792
 
793
SFR_16BIT(FCTL1);                             /* FLASH Control 1 */
794
SFR_16BIT(FCTL2);                             /* FLASH Control 2 */
795
SFR_16BIT(FCTL3);                             /* FLASH Control 3 */
796
 
797
#define FRKEY                  (0x9600)       /* Flash key returned by read */
798
#define FWKEY                  (0xA500)       /* Flash key for write */
799
#define FXKEY                  (0x3300)       /* for use with XOR instruction */
800
 
801
#define ERASE                  (0x0002)       /* Enable bit for Flash segment erase */
802
#define MERAS                  (0x0004)       /* Enable bit for Flash mass erase */
803
#define WRT                    (0x0040)       /* Enable bit for Flash write */
804
#define BLKWRT                 (0x0080)       /* Enable bit for Flash segment write */
805
#define SEGWRT                 (0x0080)       /* old definition */ /* Enable bit for Flash segment write */
806
 
807
#define FN0                    (0x0001)       /* Divide Flash clock by 1 to 64 using FN0 to FN5 according to: */
808
#define FN1                    (0x0002)       /*  32*FN5 + 16*FN4 + 8*FN3 + 4*FN2 + 2*FN1 + FN0 + 1 */
809
#ifndef FN2
810
#define FN2                    (0x0004)
811
#endif
812
#ifndef FN3
813
#define FN3                    (0x0008)
814
#endif
815
#ifndef FN4
816
#define FN4                    (0x0010)
817
#endif
818
#define FN5                    (0x0020)
819
#define FSSEL0                 (0x0040)       /* Flash clock select 0 */        /* to distinguish from USART SSELx */
820
#define FSSEL1                 (0x0080)       /* Flash clock select 1 */
821
 
822
#define FSSEL_0                (0x0000)       /* Flash clock select: 0 - ACLK */
823
#define FSSEL_1                (0x0040)       /* Flash clock select: 1 - MCLK */
824
#define FSSEL_2                (0x0080)       /* Flash clock select: 2 - SMCLK */
825
#define FSSEL_3                (0x00C0)       /* Flash clock select: 3 - SMCLK */
826
 
827
#define BUSY                   (0x0001)       /* Flash busy: 1 */
828
#define KEYV                   (0x0002)       /* Flash Key violation flag */
829
#define ACCVIFG                (0x0004)       /* Flash Access violation flag */
830
#define WAIT                   (0x0008)       /* Wait flag for segment write */
831
#define LOCK                   (0x0010)       /* Lock bit: 1 - Flash is locked (read only) */
832
#define EMEX                   (0x0020)       /* Flash Emergency Exit */
833
 
834
/************************************************************
835
* Comparator A
836
************************************************************/
837
#define __MSP430_HAS_COMPA__                  /* Definition to show that Module is available */
838
 
839
SFR_8BIT(CACTL1);                             /* Comparator A Control 1 */
840
SFR_8BIT(CACTL2);                             /* Comparator A Control 2 */
841
SFR_8BIT(CAPD);                               /* Comparator A Port Disable */
842
 
843
#define CAIFG                  (0x01)         /* Comp. A Interrupt Flag */
844
#define CAIE                   (0x02)         /* Comp. A Interrupt Enable */
845
#define CAIES                  (0x04)         /* Comp. A Int. Edge Select: 0:rising / 1:falling */
846
#define CAON                   (0x08)         /* Comp. A enable */
847
#define CAREF0                 (0x10)         /* Comp. A Internal Reference Select 0 */
848
#define CAREF1                 (0x20)         /* Comp. A Internal Reference Select 1 */
849
#define CARSEL                 (0x40)         /* Comp. A Internal Reference Enable */
850
#define CAEX                   (0x80)         /* Comp. A Exchange Inputs */
851
 
852
#define CAREF_0                (0x00)         /* Comp. A Int. Ref. Select 0 : Off */
853
#define CAREF_1                (0x10)         /* Comp. A Int. Ref. Select 1 : 0.25*Vcc */
854
#define CAREF_2                (0x20)         /* Comp. A Int. Ref. Select 2 : 0.5*Vcc */
855
#define CAREF_3                (0x30)         /* Comp. A Int. Ref. Select 3 : Vt*/
856
 
857
#define CAOUT                  (0x01)         /* Comp. A Output */
858
#define CAF                    (0x02)         /* Comp. A Enable Output Filter */
859
#define P2CA0                  (0x04)         /* Comp. A Connect External Signal to CA0 : 1 */
860
#define P2CA1                  (0x08)         /* Comp. A Connect External Signal to CA1 : 1 */
861
#define CACTL24                (0x10)
862
#define CACTL25                (0x20)
863
#define CACTL26                (0x40)
864
#define CACTL27                (0x80)
865
 
866
#define CAPD0                  (0x01)         /* Comp. A Disable Input Buffer of Port Register .0 */
867
#define CAPD1                  (0x02)         /* Comp. A Disable Input Buffer of Port Register .1 */
868
#define CAPD2                  (0x04)         /* Comp. A Disable Input Buffer of Port Register .2 */
869
#define CAPD3                  (0x08)         /* Comp. A Disable Input Buffer of Port Register .3 */
870
#define CAPD4                  (0x10)         /* Comp. A Disable Input Buffer of Port Register .4 */
871
#define CAPD5                  (0x20)         /* Comp. A Disable Input Buffer of Port Register .5 */
872
#define CAPD6                  (0x40)         /* Comp. A Disable Input Buffer of Port Register .6 */
873
#define CAPD7                  (0x80)         /* Comp. A Disable Input Buffer of Port Register .7 */
874
 
875
/************************************************************
876
* ADC12
877
************************************************************/
878
#define __MSP430_HAS_ADC12__                  /* Definition to show that Module is available */
879
 
880
SFR_16BIT(ADC12CTL0);                         /* ADC12 Control 0 */
881
SFR_16BIT(ADC12CTL1);                         /* ADC12 Control 1 */
882
SFR_16BIT(ADC12IFG);                          /* ADC12 Interrupt Flag */
883
SFR_16BIT(ADC12IE);                           /* ADC12 Interrupt Enable */
884
SFR_16BIT(ADC12IV);                           /* ADC12 Interrupt Vector Word */
885
 
886
#define ADC12MEM_              (0x0140)       /* ADC12 Conversion Memory */
887
#ifdef __ASM_HEADER__
888
#define ADC12MEM               (ADC12MEM_)    /* ADC12 Conversion Memory (for assembler) */
889
#else
890
#define ADC12MEM               ((int*)        ADC12MEM_) /* ADC12 Conversion Memory (for C) */
891
#endif
892
SFR_16BIT(ADC12MEM0);                         /* ADC12 Conversion Memory 0 */
893
SFR_16BIT(ADC12MEM1);                         /* ADC12 Conversion Memory 1 */
894
SFR_16BIT(ADC12MEM2);                         /* ADC12 Conversion Memory 2 */
895
SFR_16BIT(ADC12MEM3);                         /* ADC12 Conversion Memory 3 */
896
SFR_16BIT(ADC12MEM4);                         /* ADC12 Conversion Memory 4 */
897
SFR_16BIT(ADC12MEM5);                         /* ADC12 Conversion Memory 5 */
898
SFR_16BIT(ADC12MEM6);                         /* ADC12 Conversion Memory 6 */
899
SFR_16BIT(ADC12MEM7);                         /* ADC12 Conversion Memory 7 */
900
SFR_16BIT(ADC12MEM8);                         /* ADC12 Conversion Memory 8 */
901
SFR_16BIT(ADC12MEM9);                         /* ADC12 Conversion Memory 9 */
902
SFR_16BIT(ADC12MEM10);                        /* ADC12 Conversion Memory 10 */
903
SFR_16BIT(ADC12MEM11);                        /* ADC12 Conversion Memory 11 */
904
SFR_16BIT(ADC12MEM12);                        /* ADC12 Conversion Memory 12 */
905
SFR_16BIT(ADC12MEM13);                        /* ADC12 Conversion Memory 13 */
906
SFR_16BIT(ADC12MEM14);                        /* ADC12 Conversion Memory 14 */
907
SFR_16BIT(ADC12MEM15);                        /* ADC12 Conversion Memory 15 */
908
 
909
#define ADC12MCTL_             (0x0080)       /* ADC12 Memory Control */
910
#ifdef __ASM_HEADER__
911
#define ADC12MCTL              (ADC12MCTL_)   /* ADC12 Memory Control (for assembler) */
912
#else
913
#define ADC12MCTL              ((char*)       ADC12MCTL_) /* ADC12 Memory Control (for C) */
914
#endif
915
SFR_8BIT(ADC12MCTL0);                         /* ADC12 Memory Control 0 */
916
SFR_8BIT(ADC12MCTL1);                         /* ADC12 Memory Control 1 */
917
SFR_8BIT(ADC12MCTL2);                         /* ADC12 Memory Control 2 */
918
SFR_8BIT(ADC12MCTL3);                         /* ADC12 Memory Control 3 */
919
SFR_8BIT(ADC12MCTL4);                         /* ADC12 Memory Control 4 */
920
SFR_8BIT(ADC12MCTL5);                         /* ADC12 Memory Control 5 */
921
SFR_8BIT(ADC12MCTL6);                         /* ADC12 Memory Control 6 */
922
SFR_8BIT(ADC12MCTL7);                         /* ADC12 Memory Control 7 */
923
SFR_8BIT(ADC12MCTL8);                         /* ADC12 Memory Control 8 */
924
SFR_8BIT(ADC12MCTL9);                         /* ADC12 Memory Control 9 */
925
SFR_8BIT(ADC12MCTL10);                        /* ADC12 Memory Control 10 */
926
SFR_8BIT(ADC12MCTL11);                        /* ADC12 Memory Control 11 */
927
SFR_8BIT(ADC12MCTL12);                        /* ADC12 Memory Control 12 */
928
SFR_8BIT(ADC12MCTL13);                        /* ADC12 Memory Control 13 */
929
SFR_8BIT(ADC12MCTL14);                        /* ADC12 Memory Control 14 */
930
SFR_8BIT(ADC12MCTL15);                        /* ADC12 Memory Control 15 */
931
 
932
/* ADC12CTL0 */
933
#define ADC12SC                (0x001)        /* ADC12 Start Conversion */
934
#define ENC                    (0x002)        /* ADC12 Enable Conversion */
935
#define ADC12TOVIE             (0x004)        /* ADC12 Timer Overflow interrupt enable */
936
#define ADC12OVIE              (0x008)        /* ADC12 Overflow interrupt enable */
937
#define ADC12ON                (0x010)        /* ADC12 On/enable */
938
#define REFON                  (0x020)        /* ADC12 Reference on */
939
#define REF2_5V                (0x040)        /* ADC12 Ref 0:1.5V / 1:2.5V */
940
#define MSC                    (0x080)        /* ADC12 Multiple SampleConversion */
941
#define SHT00                  (0x0100)       /* ADC12 Sample Hold 0 Select 0 */
942
#define SHT01                  (0x0200)       /* ADC12 Sample Hold 0 Select 1 */
943
#define SHT02                  (0x0400)       /* ADC12 Sample Hold 0 Select 2 */
944
#define SHT03                  (0x0800)       /* ADC12 Sample Hold 0 Select 3 */
945
#define SHT10                  (0x1000)       /* ADC12 Sample Hold 0 Select 0 */
946
#define SHT11                  (0x2000)       /* ADC12 Sample Hold 1 Select 1 */
947
#define SHT12                  (0x4000)       /* ADC12 Sample Hold 2 Select 2 */
948
#define SHT13                  (0x8000)       /* ADC12 Sample Hold 3 Select 3 */
949
#define MSH                    (0x080)
950
 
951
#define SHT0_0                 (0*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 0 */
952
#define SHT0_1                 (1*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 1 */
953
#define SHT0_2                 (2*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 2 */
954
#define SHT0_3                 (3*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 3 */
955
#define SHT0_4                 (4*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 4 */
956
#define SHT0_5                 (5*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 5 */
957
#define SHT0_6                 (6*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 6 */
958
#define SHT0_7                 (7*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 7 */
959
#define SHT0_8                 (8*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 8 */
960
#define SHT0_9                 (9*0x100u)     /* ADC12 Sample Hold 0 Select Bit: 9 */
961
#define SHT0_10                (10*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 10 */
962
#define SHT0_11                (11*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 11 */
963
#define SHT0_12                (12*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 12 */
964
#define SHT0_13                (13*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 13 */
965
#define SHT0_14                (14*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 14 */
966
#define SHT0_15                (15*0x100u)    /* ADC12 Sample Hold 0 Select Bit: 15 */
967
 
968
#define SHT1_0                 (0*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 0 */
969
#define SHT1_1                 (1*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 1 */
970
#define SHT1_2                 (2*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 2 */
971
#define SHT1_3                 (3*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 3 */
972
#define SHT1_4                 (4*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 4 */
973
#define SHT1_5                 (5*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 5 */
974
#define SHT1_6                 (6*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 6 */
975
#define SHT1_7                 (7*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 7 */
976
#define SHT1_8                 (8*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 8 */
977
#define SHT1_9                 (9*0x1000u)    /* ADC12 Sample Hold 1 Select Bit: 9 */
978
#define SHT1_10                (10*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 10 */
979
#define SHT1_11                (11*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 11 */
980
#define SHT1_12                (12*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 12 */
981
#define SHT1_13                (13*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 13 */
982
#define SHT1_14                (14*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 14 */
983
#define SHT1_15                (15*0x1000u)   /* ADC12 Sample Hold 1 Select Bit: 15 */
984
 
985
/* ADC12CTL1 */
986
#define ADC12BUSY              (0x0001)       /* ADC12 Busy */
987
#define CONSEQ0                (0x0002)       /* ADC12 Conversion Sequence Select 0 */
988
#define CONSEQ1                (0x0004)       /* ADC12 Conversion Sequence Select 1 */
989
#define ADC12SSEL0             (0x0008)       /* ADC12 Clock Source Select 0 */
990
#define ADC12SSEL1             (0x0010)       /* ADC12 Clock Source Select 1 */
991
#define ADC12DIV0              (0x0020)       /* ADC12 Clock Divider Select 0 */
992
#define ADC12DIV1              (0x0040)       /* ADC12 Clock Divider Select 1 */
993
#define ADC12DIV2              (0x0080)       /* ADC12 Clock Divider Select 2 */
994
#define ISSH                   (0x0100)       /* ADC12 Invert Sample Hold Signal */
995
#define SHP                    (0x0200)       /* ADC12 Sample/Hold Pulse Mode */
996
#define SHS0                   (0x0400)       /* ADC12 Sample/Hold Source 0 */
997
#define SHS1                   (0x0800)       /* ADC12 Sample/Hold Source 1 */
998
#define CSTARTADD0             (0x1000)       /* ADC12 Conversion Start Address 0 */
999
#define CSTARTADD1             (0x2000)       /* ADC12 Conversion Start Address 1 */
1000
#define CSTARTADD2             (0x4000)       /* ADC12 Conversion Start Address 2 */
1001
#define CSTARTADD3             (0x8000)       /* ADC12 Conversion Start Address 3 */
1002
 
1003
#define CONSEQ_0               (0*2u)         /* ADC12 Conversion Sequence Select: 0 */
1004
#define CONSEQ_1               (1*2u)         /* ADC12 Conversion Sequence Select: 1 */
1005
#define CONSEQ_2               (2*2u)         /* ADC12 Conversion Sequence Select: 2 */
1006
#define CONSEQ_3               (3*2u)         /* ADC12 Conversion Sequence Select: 3 */
1007
#define ADC12SSEL_0            (0*8u)         /* ADC12 Clock Source Select: 0 */
1008
#define ADC12SSEL_1            (1*8u)         /* ADC12 Clock Source Select: 1 */
1009
#define ADC12SSEL_2            (2*8u)         /* ADC12 Clock Source Select: 2 */
1010
#define ADC12SSEL_3            (3*8u)         /* ADC12 Clock Source Select: 3 */
1011
#define ADC12DIV_0             (0*0x20u)      /* ADC12 Clock Divider Select: 0 */
1012
#define ADC12DIV_1             (1*0x20u)      /* ADC12 Clock Divider Select: 1 */
1013
#define ADC12DIV_2             (2*0x20u)      /* ADC12 Clock Divider Select: 2 */
1014
#define ADC12DIV_3             (3*0x20u)      /* ADC12 Clock Divider Select: 3 */
1015
#define ADC12DIV_4             (4*0x20u)      /* ADC12 Clock Divider Select: 4 */
1016
#define ADC12DIV_5             (5*0x20u)      /* ADC12 Clock Divider Select: 5 */
1017
#define ADC12DIV_6             (6*0x20u)      /* ADC12 Clock Divider Select: 6 */
1018
#define ADC12DIV_7             (7*0x20u)      /* ADC12 Clock Divider Select: 7 */
1019
#define SHS_0                  (0*0x400u)     /* ADC12 Sample/Hold Source: 0 */
1020
#define SHS_1                  (1*0x400u)     /* ADC12 Sample/Hold Source: 1 */
1021
#define SHS_2                  (2*0x400u)     /* ADC12 Sample/Hold Source: 2 */
1022
#define SHS_3                  (3*0x400u)     /* ADC12 Sample/Hold Source: 3 */
1023
#define CSTARTADD_0            (0*0x1000u)    /* ADC12 Conversion Start Address: 0 */
1024
#define CSTARTADD_1            (1*0x1000u)    /* ADC12 Conversion Start Address: 1 */
1025
#define CSTARTADD_2            (2*0x1000u)    /* ADC12 Conversion Start Address: 2 */
1026
#define CSTARTADD_3            (3*0x1000u)    /* ADC12 Conversion Start Address: 3 */
1027
#define CSTARTADD_4            (4*0x1000u)    /* ADC12 Conversion Start Address: 4 */
1028
#define CSTARTADD_5            (5*0x1000u)    /* ADC12 Conversion Start Address: 5 */
1029
#define CSTARTADD_6            (6*0x1000u)    /* ADC12 Conversion Start Address: 6 */
1030
#define CSTARTADD_7            (7*0x1000u)    /* ADC12 Conversion Start Address: 7 */
1031
#define CSTARTADD_8            (8*0x1000u)    /* ADC12 Conversion Start Address: 8 */
1032
#define CSTARTADD_9            (9*0x1000u)    /* ADC12 Conversion Start Address: 9 */
1033
#define CSTARTADD_10           (10*0x1000u)   /* ADC12 Conversion Start Address: 10 */
1034
#define CSTARTADD_11           (11*0x1000u)   /* ADC12 Conversion Start Address: 11 */
1035
#define CSTARTADD_12           (12*0x1000u)   /* ADC12 Conversion Start Address: 12 */
1036
#define CSTARTADD_13           (13*0x1000u)   /* ADC12 Conversion Start Address: 13 */
1037
#define CSTARTADD_14           (14*0x1000u)   /* ADC12 Conversion Start Address: 14 */
1038
#define CSTARTADD_15           (15*0x1000u)   /* ADC12 Conversion Start Address: 15 */
1039
 
1040
/* ADC12MCTLx */
1041
#define INCH0                  (0x0001)       /* ADC12 Input Channel Select Bit 0 */
1042
#define INCH1                  (0x0002)       /* ADC12 Input Channel Select Bit 1 */
1043
#define INCH2                  (0x0004)       /* ADC12 Input Channel Select Bit 2 */
1044
#define INCH3                  (0x0008)       /* ADC12 Input Channel Select Bit 3 */
1045
#define SREF0                  (0x0010)       /* ADC12 Select Reference Bit 0 */
1046
#define SREF1                  (0x0020)       /* ADC12 Select Reference Bit 1 */
1047
#define SREF2                  (0x0040)       /* ADC12 Select Reference Bit 2 */
1048
#define EOS                    (0x0080)       /* ADC12 End of Sequence */
1049
 
1050
#define INCH_0                 (0)            /* ADC12 Input Channel 0 */
1051
#define INCH_1                 (1)            /* ADC12 Input Channel 1 */
1052
#define INCH_2                 (2)            /* ADC12 Input Channel 2 */
1053
#define INCH_3                 (3)            /* ADC12 Input Channel 3 */
1054
#define INCH_4                 (4)            /* ADC12 Input Channel 4 */
1055
#define INCH_5                 (5)            /* ADC12 Input Channel 5 */
1056
#define INCH_6                 (6)            /* ADC12 Input Channel 6 */
1057
#define INCH_7                 (7)            /* ADC12 Input Channel 7 */
1058
#define INCH_8                 (8)            /* ADC12 Input Channel 8 */
1059
#define INCH_9                 (9)            /* ADC12 Input Channel 9 */
1060
#define INCH_10                (10)           /* ADC12 Input Channel 10 */
1061
#define INCH_11                (11)           /* ADC12 Input Channel 11 */
1062
#define INCH_12                (12)           /* ADC12 Input Channel 12 */
1063
#define INCH_13                (13)           /* ADC12 Input Channel 13 */
1064
#define INCH_14                (14)           /* ADC12 Input Channel 14 */
1065
#define INCH_15                (15)           /* ADC12 Input Channel 15 */
1066
 
1067
#define SREF_0                 (0*0x10u)      /* ADC12 Select Reference 0 */
1068
#define SREF_1                 (1*0x10u)      /* ADC12 Select Reference 1 */
1069
#define SREF_2                 (2*0x10u)      /* ADC12 Select Reference 2 */
1070
#define SREF_3                 (3*0x10u)      /* ADC12 Select Reference 3 */
1071
#define SREF_4                 (4*0x10u)      /* ADC12 Select Reference 4 */
1072
#define SREF_5                 (5*0x10u)      /* ADC12 Select Reference 5 */
1073
#define SREF_6                 (6*0x10u)      /* ADC12 Select Reference 6 */
1074
#define SREF_7                 (7*0x10u)      /* ADC12 Select Reference 7 */
1075
 
1076
/* ADC12IV Definitions */
1077
#define ADC12IV_NONE           (0x0000)       /* No Interrupt pending */
1078
#define ADC12IV_ADC12OVIFG     (0x0002)       /* ADC12OVIFG */
1079
#define ADC12IV_ADC12TOVIFG    (0x0004)       /* ADC12TOVIFG */
1080
#define ADC12IV_ADC12IFG0      (0x0006)       /* ADC12IFG0 */
1081
#define ADC12IV_ADC12IFG1      (0x0008)       /* ADC12IFG1 */
1082
#define ADC12IV_ADC12IFG2      (0x000A)       /* ADC12IFG2 */
1083
#define ADC12IV_ADC12IFG3      (0x000C)       /* ADC12IFG3 */
1084
#define ADC12IV_ADC12IFG4      (0x000E)       /* ADC12IFG4 */
1085
#define ADC12IV_ADC12IFG5      (0x0010)       /* ADC12IFG5 */
1086
#define ADC12IV_ADC12IFG6      (0x0012)       /* ADC12IFG6 */
1087
#define ADC12IV_ADC12IFG7      (0x0014)       /* ADC12IFG7 */
1088
#define ADC12IV_ADC12IFG8      (0x0016)       /* ADC12IFG8 */
1089
#define ADC12IV_ADC12IFG9      (0x0018)       /* ADC12IFG9 */
1090
#define ADC12IV_ADC12IFG10     (0x001A)       /* ADC12IFG10 */
1091
#define ADC12IV_ADC12IFG11     (0x001C)       /* ADC12IFG11 */
1092
#define ADC12IV_ADC12IFG12     (0x001E)       /* ADC12IFG12 */
1093
#define ADC12IV_ADC12IFG13     (0x0020)       /* ADC12IFG13 */
1094
#define ADC12IV_ADC12IFG14     (0x0022)       /* ADC12IFG14 */
1095
#define ADC12IV_ADC12IFG15     (0x0024)       /* ADC12IFG15 */
1096
 
1097
/************************************************************
1098
* DAC12
1099
************************************************************/
1100
#define __MSP430_HAS_DAC12_2__                /* Definition to show that Module is available */
1101
 
1102
SFR_16BIT(DAC12_0CTL);                        /* DAC12_0 Control */
1103
SFR_16BIT(DAC12_1CTL);                        /* DAC12_1 Control */
1104
 
1105
#define DAC12GRP               (0x0001)       /* DAC12 group */
1106
#define DAC12ENC               (0x0002)       /* DAC12 enable conversion */
1107
#define DAC12IFG               (0x0004)       /* DAC12 interrupt flag */
1108
#define DAC12IE                (0x0008)       /* DAC12 interrupt enable */
1109
#define DAC12DF                (0x0010)       /* DAC12 data format */
1110
#define DAC12AMP0              (0x0020)       /* DAC12 amplifier bit 0 */
1111
#define DAC12AMP1              (0x0040)       /* DAC12 amplifier bit 1 */
1112
#define DAC12AMP2              (0x0080)       /* DAC12 amplifier bit 2 */
1113
#define DAC12IR                (0x0100)       /* DAC12 input reference and output range */
1114
#define DAC12CALON             (0x0200)       /* DAC12 calibration */
1115
#define DAC12LSEL0             (0x0400)       /* DAC12 load select bit 0 */
1116
#define DAC12LSEL1             (0x0800)       /* DAC12 load select bit 1 */
1117
#define DAC12RES               (0x1000)       /* DAC12 resolution */
1118
#define DAC12SREF0             (0x2000)       /* DAC12 reference bit 0 */
1119
#define DAC12SREF1             (0x4000)       /* DAC12 reference bit 1 */
1120
 
1121
#define DAC12AMP_0             (0*0x0020u)    /* DAC12 amplifier 0: off,    3-state */
1122
#define DAC12AMP_1             (1*0x0020u)    /* DAC12 amplifier 1: off,    off */
1123
#define DAC12AMP_2             (2*0x0020u)    /* DAC12 amplifier 2: low,    low */
1124
#define DAC12AMP_3             (3*0x0020u)    /* DAC12 amplifier 3: low,    medium */
1125
#define DAC12AMP_4             (4*0x0020u)    /* DAC12 amplifier 4: low,    high */
1126
#define DAC12AMP_5             (5*0x0020u)    /* DAC12 amplifier 5: medium, medium */
1127
#define DAC12AMP_6             (6*0x0020u)    /* DAC12 amplifier 6: medium, high */
1128
#define DAC12AMP_7             (7*0x0020u)    /* DAC12 amplifier 7: high,   high */
1129
 
1130
#define DAC12LSEL_0            (0*0x0400u)    /* DAC12 load select 0: direct */
1131
#define DAC12LSEL_1            (1*0x0400u)    /* DAC12 load select 1: latched with DAT */
1132
#define DAC12LSEL_2            (2*0x0400u)    /* DAC12 load select 2: latched with pos. Timer_A3.OUT1 */
1133
#define DAC12LSEL_3            (3*0x0400u)    /* DAC12 load select 3: latched with pos. Timer_B7.OUT1 */
1134
 
1135
#define DAC12SREF_0            (0*0x2000u)    /* DAC12 reference 0: Vref+ */
1136
#define DAC12SREF_1            (1*0x2000u)    /* DAC12 reference 1: Vref+ */
1137
#define DAC12SREF_2            (2*0x2000u)    /* DAC12 reference 2: Veref+ */
1138
#define DAC12SREF_3            (3*0x2000u)    /* DAC12 reference 3: Veref+ */
1139
 
1140
SFR_16BIT(DAC12_0DAT);                        /* DAC12_0 Data */
1141
SFR_16BIT(DAC12_1DAT);                        /* DAC12_1 Data */
1142
/************************************************************
1143
* DMA
1144
************************************************************/
1145
#define __MSP430_HAS_DMA_3__                  /* Definition to show that Module is available */
1146
 
1147
SFR_16BIT(DMACTL0);                           /* DMA Module Control 0 */
1148
#define DMA0TSEL0              (0x0001)       /* DMA channel 0 transfer select bit 0 */
1149
#define DMA0TSEL1              (0x0002)       /* DMA channel 0 transfer select bit 1 */
1150
#define DMA0TSEL2              (0x0004)       /* DMA channel 0 transfer select bit 2 */
1151
#define DMA0TSEL3              (0x0008)       /* DMA channel 0 transfer select bit 3 */
1152
#define DMA1TSEL0              (0x0010)       /* DMA channel 1 transfer select bit 0 */
1153
#define DMA1TSEL1              (0x0020)       /* DMA channel 1 transfer select bit 1 */
1154
#define DMA1TSEL2              (0x0040)       /* DMA channel 1 transfer select bit 2 */
1155
#define DMA1TSEL3              (0x0080)       /* DMA channel 1 transfer select bit 3 */
1156
#define DMA2TSEL0              (0x0100)       /* DMA channel 2 transfer select bit 0 */
1157
#define DMA2TSEL1              (0x0200)       /* DMA channel 2 transfer select bit 1 */
1158
#define DMA2TSEL2              (0x0400)       /* DMA channel 2 transfer select bit 2 */
1159
#define DMA2TSEL3              (0x0800)       /* DMA channel 2 transfer select bit 3 */
1160
 
1161
#define DMA0TSEL_0             (0*0x0001u)    /* DMA channel 0 transfer select 0:  DMA_REQ (sw)*/
1162
#define DMA0TSEL_1             (1*0x0001u)    /* DMA channel 0 transfer select 1:  Timer_A (TACCR2.IFG) */
1163
#define DMA0TSEL_2             (2*0x0001u)    /* DMA channel 0 transfer select 2:  Timer_B (TBCCR2.IFG) */
1164
#define DMA0TSEL_3             (3*0x0001u)    /* DMA channel 0 transfer select 3:  UART0/I2C receive */
1165
#define DMA0TSEL_4             (4*0x0001u)    /* DMA channel 0 transfer select 4:  UART0/I2C transmit */
1166
#define DMA0TSEL_5             (5*0x0001u)    /* DMA channel 0 transfer select 5:  DAC12_0CTL.DAC12IFG */
1167
#define DMA0TSEL_6             (6*0x0001u)    /* DMA channel 0 transfer select 6:  ADC12 (ADC12IFG) */
1168
#define DMA0TSEL_7             (7*0x0001u)    /* DMA channel 0 transfer select 7:  Timer_A (TACCR0.IFG) */
1169
#define DMA0TSEL_8             (8*0x0001u)    /* DMA channel 0 transfer select 8:  Timer_B (TBCCR0.IFG) */
1170
#define DMA0TSEL_9             (9*0x0001u)    /* DMA channel 0 transfer select 9:  UART1 receive */
1171
#define DMA0TSEL_10            (10*0x0001u)   /* DMA channel 0 transfer select 10: UART1 transmit */
1172
#define DMA0TSEL_11            (11*0x0001u)   /* DMA channel 0 transfer select 11: Multiplier ready */
1173
#define DMA0TSEL_14            (14*0x0001u)   /* DMA channel 0 transfer select 14: previous DMA channel DMA2IFG */
1174
#define DMA0TSEL_15            (15*0x0001u)   /* DMA channel 0 transfer select 15: ext. Trigger (DMAE0) */
1175
 
1176
#define DMA1TSEL_0             (0*0x0010u)    /* DMA channel 1 transfer select 0:  DMA_REQ */
1177
#define DMA1TSEL_1             (1*0x0010u)    /* DMA channel 1 transfer select 1:  Timer_A CCRIFG.2 */
1178
#define DMA1TSEL_2             (2*0x0010u)    /* DMA channel 1 transfer select 2:  Timer_B CCRIFG.2 */
1179
#define DMA1TSEL_3             (3*0x0010u)    /* DMA channel 1 transfer select 3:  UART0/I2C receive */
1180
#define DMA1TSEL_4             (4*0x0010u)    /* DMA channel 1 transfer select 4:  UART0/I2C transmit */
1181
#define DMA1TSEL_5             (5*0x0010u)    /* DMA channel 1 transfer select 5:  DAC12.0IFG */
1182
#define DMA1TSEL_6             (6*0x0010u)    /* DMA channel 1 transfer select 6:  ADC12 (ADC12IFG) */
1183
#define DMA1TSEL_7             (7*0x0010u)    /* DMA channel 1 transfer select 7:  Timer_A (TACCR0.IFG) */
1184
#define DMA1TSEL_8             (8*0x0010u)    /* DMA channel 1 transfer select 8:  Timer_B (TBCCR0.IFG) */
1185
#define DMA1TSEL_9             (9*0x0010u)    /* DMA channel 1 transfer select 9:  UART1 receive */
1186
#define DMA1TSEL_10            (10*0x0010u)   /* DMA channel 1 transfer select 10: UART1 transmit */
1187
#define DMA1TSEL_11            (11*0x0010u)   /* DMA channel 1 transfer select 11: Multiplier ready */
1188
#define DMA1TSEL_14            (14*0x0010u)   /* DMA channel 1 transfer select 14: previous DMA channel DMA0IFG */
1189
#define DMA1TSEL_15            (15*0x0010u)   /* DMA channel 1 transfer select 15: ext. Trigger (DMAE0) */
1190
 
1191
#define DMA2TSEL_0             (0*0x0100u)    /* DMA channel 2 transfer select 0:  DMA_REQ */
1192
#define DMA2TSEL_1             (1*0x0100u)    /* DMA channel 2 transfer select 1:  Timer_A CCRIFG.2 */
1193
#define DMA2TSEL_2             (2*0x0100u)    /* DMA channel 2 transfer select 2:  Timer_B CCRIFG.2 */
1194
#define DMA2TSEL_3             (3*0x0100u)    /* DMA channel 2 transfer select 3:  UART0/I2C receive */
1195
#define DMA2TSEL_4             (4*0x0100u)    /* DMA channel 2 transfer select 4:  UART0/I2C transmit */
1196
#define DMA2TSEL_5             (5*0x0100u)    /* DMA channel 2 transfer select 5:  DAC12.0IFG */
1197
#define DMA2TSEL_6             (6*0x0100u)    /* DMA channel 2 transfer select 6:  ADC12 (ADC12IFG) */
1198
#define DMA2TSEL_7             (7*0x0100u)    /* DMA channel 2 transfer select 7:  Timer_A (TACCR0.IFG) */
1199
#define DMA2TSEL_8             (8*0x0100u)    /* DMA channel 2 transfer select 8:  Timer_B (TBCCR0.IFG) */
1200
#define DMA2TSEL_9             (9*0x0100u)    /* DMA channel 2 transfer select 9:  UART1 receive */
1201
#define DMA2TSEL_10            (10*0x0100u)   /* DMA channel 2 transfer select 10: UART1 transmit */
1202
#define DMA2TSEL_11            (11*0x0100u)   /* DMA channel 2 transfer select 11: Multiplier ready */
1203
#define DMA2TSEL_14            (14*0x0100u)   /* DMA channel 2 transfer select 14: previous DMA channel DMA1IFG */
1204
#define DMA2TSEL_15            (15*0x0100u)   /* DMA channel 2 transfer select 15: ext. Trigger (DMAE0) */
1205
 
1206
SFR_16BIT(DMACTL1);                           /* DMA Module Control 1 */
1207
#define ENNMI                  (0x0001)       /* Enable NMI interruption of DMA */
1208
#define ROUNDROBIN             (0x0002)       /* Round-Robin DMA channel priorities */
1209
#define DMAONFETCH             (0x0004)       /* DMA transfer on instruction fetch */
1210
 
1211
SFR_16BIT(DMA0CTL);                           /* DMA Channel 0 Control */
1212
SFR_16BIT(DMA1CTL);                           /* DMA Channel 1 Control */
1213
SFR_16BIT(DMA2CTL);                           /* DMA Channel 2 Control */
1214
 
1215
#define DMAREQ                 (0x0001)       /* Initiate DMA transfer with DMATSEL */
1216
#define DMAABORT               (0x0002)       /* DMA transfer aborted by NMI */
1217
#define DMAIE                  (0x0004)       /* DMA interrupt enable */
1218
#define DMAIFG                 (0x0008)       /* DMA interrupt flag */
1219
#define DMAEN                  (0x0010)       /* DMA enable */
1220
#define DMALEVEL               (0x0020)       /* DMA level sensitive trigger select */
1221
#define DMASRCBYTE             (0x0040)       /* DMA source byte */
1222
#define DMADSTBYTE             (0x0080)       /* DMA destination byte */
1223
#define DMASRCINCR0            (0x0100)       /* DMA source increment bit 0 */
1224
#define DMASRCINCR1            (0x0200)       /* DMA source increment bit 1 */
1225
#define DMADSTINCR0            (0x0400)       /* DMA destination increment bit 0 */
1226
#define DMADSTINCR1            (0x0800)       /* DMA destination increment bit 1 */
1227
#define DMADT0                 (0x1000)       /* DMA transfer mode bit 0 */
1228
#define DMADT1                 (0x2000)       /* DMA transfer mode bit 1 */
1229
#define DMADT2                 (0x4000)       /* DMA transfer mode bit 2 */
1230
 
1231
#define DMASWDW                (0*0x0040u)    /* DMA transfer: source word to destination word */
1232
#define DMASBDW                (1*0x0040u)    /* DMA transfer: source byte to destination word */
1233
#define DMASWDB                (2*0x0040u)    /* DMA transfer: source word to destination byte */
1234
#define DMASBDB                (3*0x0040u)    /* DMA transfer: source byte to destination byte */
1235
 
1236
#define DMASRCINCR_0           (0*0x0100u)    /* DMA source increment 0: source address unchanged */
1237
#define DMASRCINCR_1           (1*0x0100u)    /* DMA source increment 1: source address unchanged */
1238
#define DMASRCINCR_2           (2*0x0100u)    /* DMA source increment 2: source address decremented */
1239
#define DMASRCINCR_3           (3*0x0100u)    /* DMA source increment 3: source address incremented */
1240
 
1241
#define DMADSTINCR_0           (0*0x0400u)    /* DMA destination increment 0: destination address unchanged */
1242
#define DMADSTINCR_1           (1*0x0400u)    /* DMA destination increment 1: destination address unchanged */
1243
#define DMADSTINCR_2           (2*0x0400u)    /* DMA destination increment 2: destination address decremented */
1244
#define DMADSTINCR_3           (3*0x0400u)    /* DMA destination increment 3: destination address incremented */
1245
 
1246
#define DMADT_0                (0*0x1000u)    /* DMA transfer mode 0: single */
1247
#define DMADT_1                (1*0x1000u)    /* DMA transfer mode 1: block */
1248
#define DMADT_2                (2*0x1000u)    /* DMA transfer mode 2: interleaved */
1249
#define DMADT_3                (3*0x1000u)    /* DMA transfer mode 3: interleaved */
1250
#define DMADT_4                (4*0x1000u)    /* DMA transfer mode 4: single, repeat */
1251
#define DMADT_5                (5*0x1000u)    /* DMA transfer mode 5: block, repeat */
1252
#define DMADT_6                (6*0x1000u)    /* DMA transfer mode 6: interleaved, repeat */
1253
#define DMADT_7                (7*0x1000u)    /* DMA transfer mode 7: interleaved, repeat */
1254
 
1255
SFR_16BIT(DMA0SA);                            /* DMA Channel 0 Source Address */
1256
SFR_16BIT(DMA0DA);                            /* DMA Channel 0 Destination Address */
1257
SFR_16BIT(DMA0SZ);                            /* DMA Channel 0 Transfer Size */
1258
SFR_16BIT(DMA1SA);                            /* DMA Channel 1 Source Address */
1259
SFR_16BIT(DMA1DA);                            /* DMA Channel 1 Destination Address */
1260
SFR_16BIT(DMA1SZ);                            /* DMA Channel 1 Transfer Size */
1261
SFR_16BIT(DMA2SA);                            /* DMA Channel 2 Source Address */
1262
SFR_16BIT(DMA2DA);                            /* DMA Channel 2 Destination Address */
1263
SFR_16BIT(DMA2SZ);                            /* DMA Channel 2 Transfer Size */
1264
 
1265
/************************************************************
1266
* Interrupt Vectors (offset from 0xFFE0)
1267
************************************************************/
1268
 
1269
#define VECTOR_NAME(name)       name##_ptr
1270
#define EMIT_PRAGMA(x)          _Pragma(#x)
1271
#define CREATE_VECTOR(name)     void (* const VECTOR_NAME(name))(void) = &name
1272
#define PLACE_VECTOR(vector,section) EMIT_PRAGMA(DATA_SECTION(vector,section))
1273
#define ISR_VECTOR(func,offset) CREATE_VECTOR(func); \
1274
                                PLACE_VECTOR(VECTOR_NAME(func), offset)
1275
 
1276
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1277
#define DACDMA_VECTOR           ".int00"                    /* 0xFFE0 DAC/DMA */
1278
#else
1279
#define DACDMA_VECTOR           (0 * 1u)                     /* 0xFFE0 DAC/DMA */
1280
/*#define DACDMA_ISR(func)        ISR_VECTOR(func, ".int00")  */ /* 0xFFE0 DAC/DMA */ /* CCE V2 Style */
1281
#endif
1282
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1283
#define PORT2_VECTOR            ".int01"                    /* 0xFFE2 Port 2 */
1284
#else
1285
#define PORT2_VECTOR            (1 * 1u)                     /* 0xFFE2 Port 2 */
1286
/*#define PORT2_ISR(func)         ISR_VECTOR(func, ".int01")  */ /* 0xFFE2 Port 2 */ /* CCE V2 Style */
1287
#endif
1288
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1289
#define USART1TX_VECTOR         ".int02"                    /* 0xFFE4 USART 1 Transmit */
1290
#else
1291
#define USART1TX_VECTOR         (2 * 1u)                     /* 0xFFE4 USART 1 Transmit */
1292
/*#define USART1TX_ISR(func)      ISR_VECTOR(func, ".int02")  */ /* 0xFFE4 USART 1 Transmit */ /* CCE V2 Style */
1293
#endif
1294
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1295
#define USART1RX_VECTOR         ".int03"                    /* 0xFFE6 USART 1 Receive */
1296
#else
1297
#define USART1RX_VECTOR         (3 * 1u)                     /* 0xFFE6 USART 1 Receive */
1298
/*#define USART1RX_ISR(func)      ISR_VECTOR(func, ".int03")  */ /* 0xFFE6 USART 1 Receive */ /* CCE V2 Style */
1299
#endif
1300
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1301
#define PORT1_VECTOR            ".int04"                    /* 0xFFE8 Port 1 */
1302
#else
1303
#define PORT1_VECTOR            (4 * 1u)                     /* 0xFFE8 Port 1 */
1304
/*#define PORT1_ISR(func)         ISR_VECTOR(func, ".int04")  */ /* 0xFFE8 Port 1 */ /* CCE V2 Style */
1305
#endif
1306
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1307
#define TIMERA1_VECTOR          ".int05"                    /* 0xFFEA Timer A CC1-2, TA */
1308
#else
1309
#define TIMERA1_VECTOR          (5 * 1u)                     /* 0xFFEA Timer A CC1-2, TA */
1310
/*#define TIMERA1_ISR(func)       ISR_VECTOR(func, ".int05")  */ /* 0xFFEA Timer A CC1-2, TA */ /* CCE V2 Style */
1311
#endif
1312
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1313
#define TIMERA0_VECTOR          ".int06"                    /* 0xFFEC Timer A CC0 */
1314
#else
1315
#define TIMERA0_VECTOR          (6 * 1u)                     /* 0xFFEC Timer A CC0 */
1316
/*#define TIMERA0_ISR(func)       ISR_VECTOR(func, ".int06")  */ /* 0xFFEC Timer A CC0 */ /* CCE V2 Style */
1317
#endif
1318
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1319
#define ADC12_VECTOR            ".int07"                    /* 0xFFEE ADC */
1320
#else
1321
#define ADC12_VECTOR            (7 * 1u)                     /* 0xFFEE ADC */
1322
/*#define ADC12_ISR(func)         ISR_VECTOR(func, ".int07")  */ /* 0xFFEE ADC */ /* CCE V2 Style */
1323
#endif
1324
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1325
#define USART0TX_VECTOR         ".int08"                    /* 0xFFF0 USART 0 Transmit */
1326
#else
1327
#define USART0TX_VECTOR         (8 * 1u)                     /* 0xFFF0 USART 0 Transmit */
1328
/*#define USART0TX_ISR(func)      ISR_VECTOR(func, ".int08")  */ /* 0xFFF0 USART 0 Transmit */ /* CCE V2 Style */
1329
#endif
1330
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1331
#define USART0RX_VECTOR         ".int09"                    /* 0xFFF2 USART 0 Receive */
1332
#else
1333
#define USART0RX_VECTOR         (9 * 1u)                     /* 0xFFF2 USART 0 Receive */
1334
/*#define USART0RX_ISR(func)      ISR_VECTOR(func, ".int09")  */ /* 0xFFF2 USART 0 Receive */ /* CCE V2 Style */
1335
#endif
1336
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1337
#define WDT_VECTOR              ".int10"                    /* 0xFFF4 Watchdog Timer */
1338
#else
1339
#define WDT_VECTOR              (10 * 1u)                    /* 0xFFF4 Watchdog Timer */
1340
/*#define WDT_ISR(func)           ISR_VECTOR(func, ".int10")  */ /* 0xFFF4 Watchdog Timer */ /* CCE V2 Style */
1341
#endif
1342
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1343
#define COMPARATORA_VECTOR      ".int11"                    /* 0xFFF6 Comparator A */
1344
#else
1345
#define COMPARATORA_VECTOR      (11 * 1u)                    /* 0xFFF6 Comparator A */
1346
/*#define COMPARATORA_ISR(func)   ISR_VECTOR(func, ".int11")  */ /* 0xFFF6 Comparator A */ /* CCE V2 Style */
1347
#endif
1348
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1349
#define TIMERB1_VECTOR          ".int12"                    /* 0xFFF8 Timer B CC1-6, TB */
1350
#else
1351
#define TIMERB1_VECTOR          (12 * 1u)                    /* 0xFFF8 Timer B CC1-6, TB */
1352
/*#define TIMERB1_ISR(func)       ISR_VECTOR(func, ".int12")  */ /* 0xFFF8 Timer B CC1-6, TB */ /* CCE V2 Style */
1353
#endif
1354
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1355
#define TIMERB0_VECTOR          ".int13"                    /* 0xFFFA Timer B CC0 */
1356
#else
1357
#define TIMERB0_VECTOR          (13 * 1u)                    /* 0xFFFA Timer B CC0 */
1358
/*#define TIMERB0_ISR(func)       ISR_VECTOR(func, ".int13")  */ /* 0xFFFA Timer B CC0 */ /* CCE V2 Style */
1359
#endif
1360
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1361
#define NMI_VECTOR              ".int14"                    /* 0xFFFC Non-maskable */
1362
#else
1363
#define NMI_VECTOR              (14 * 1u)                    /* 0xFFFC Non-maskable */
1364
/*#define NMI_ISR(func)           ISR_VECTOR(func, ".int14")  */ /* 0xFFFC Non-maskable */ /* CCE V2 Style */
1365
#endif
1366
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1367
#define RESET_VECTOR            ".reset"                    /* 0xFFFE Reset [Highest Priority] */
1368
#else
1369
#define RESET_VECTOR            (15 * 1u)                    /* 0xFFFE Reset [Highest Priority] */
1370
/*#define RESET_ISR(func)         ISR_VECTOR(func, ".int15")  */ /* 0xFFFE Reset [Highest Priority] */ /* CCE V2 Style */
1371
#endif
1372
 
1373
 
1374
/************************************************************
1375
* End of Modules
1376
************************************************************/
1377
 
1378
#ifdef __cplusplus
1379
}
1380
#endif /* extern "C" */
1381
 
1382
#endif /* #ifndef __msp430x16x */
1383