Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

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