Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2850 dpurdie 1
/********************************************************************
2
*
3
* Standard register and bit definitions for the Texas Instruments
4
* MSP430 microcontroller.
5
*
6
* This file supports assembler and C development for
7
* MSP430x33x devices.
8
*
9
* Texas Instruments, Version 2.3
10
*
11
* Rev. 1.2, Added definition of USPIE.
12
*
13
* Rev. 1.3, Removed leading 0 to aviod interpretation as octal
14
*            values under C
15
*           Changed definition of LPM4 bits (device effect not changed)
16
*           Corrected LPMx_EXIT to reference new intrinsic    _bic_SR_register_on_exit
17
*           The file contents were reordered
18
*           Changed TAIV to be read-only
19
* Rev. 1.4, Enclose all #define statements with parentheses
20
* Rev. 1.5, Added sfrb for TCDAT and TCPLD
21
* Rev. 1.6, Defined vectors for USART (in addition to UART)
22
* Rev. 1.7, Removed incorrect label 'BTRESET'
23
* Rev. 2.1, Alignment of defintions in Users Guide and of version numbers
24
* Rev. 2.2, Removed unused def of TASSEL2
25
* Rev. 2.3, Removed definitions for BTRESET
26
*
27
********************************************************************/
28
 
29
#ifndef __msp430x33x
30
#define __msp430x33x
31
 
32
#ifdef __cplusplus
33
extern "C" {
34
#endif
35
 
36
 
37
/*----------------------------------------------------------------------------*/
38
/* PERIPHERAL FILE MAP                                                        */
39
/*----------------------------------------------------------------------------*/
40
 
41
/* External references resolved by a device-specific linker command file */
42
#define SFR_8BIT(address)   extern volatile unsigned char address
43
#define SFR_16BIT(address)  extern volatile unsigned int address
44
 
45
 
46
/************************************************************
47
* STANDARD BITS
48
************************************************************/
49
 
50
#define BIT0                   (0x0001)
51
#define BIT1                   (0x0002)
52
#define BIT2                   (0x0004)
53
#define BIT3                   (0x0008)
54
#define BIT4                   (0x0010)
55
#define BIT5                   (0x0020)
56
#define BIT6                   (0x0040)
57
#define BIT7                   (0x0080)
58
#define BIT8                   (0x0100)
59
#define BIT9                   (0x0200)
60
#define BITA                   (0x0400)
61
#define BITB                   (0x0800)
62
#define BITC                   (0x1000)
63
#define BITD                   (0x2000)
64
#define BITE                   (0x4000)
65
#define BITF                   (0x8000)
66
 
67
/************************************************************
68
* STATUS REGISTER BITS
69
************************************************************/
70
 
71
#define C                      (0x0001)
72
#define Z                      (0x0002)
73
#define N                      (0x0004)
74
#define V                      (0x0100)
75
#define GIE                    (0x0008)
76
#define CPUOFF                 (0x0010)
77
#define OSCOFF                 (0x0020)
78
#define SCG0                   (0x0040)
79
#define SCG1                   (0x0080)
80
 
81
/* Low Power Modes coded with Bits 4-7 in SR */
82
 
83
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
84
#define LPM0                   (CPUOFF)
85
#define LPM1                   (SCG0+CPUOFF)
86
#define LPM2                   (SCG1+CPUOFF)
87
#define LPM3                   (SCG1+SCG0+CPUOFF)
88
#define LPM4                   (SCG1+SCG0+OSCOFF+CPUOFF)
89
/* End #defines for assembler */
90
 
91
#else /* Begin #defines for C */
92
#define LPM0_bits              (CPUOFF)
93
#define LPM1_bits              (SCG0+CPUOFF)
94
#define LPM2_bits              (SCG1+CPUOFF)
95
#define LPM3_bits              (SCG1+SCG0+CPUOFF)
96
#define LPM4_bits              (SCG1+SCG0+OSCOFF+CPUOFF)
97
 
98
#include "in430.h"
99
 
100
#define LPM0         _bis_SR_register(LPM0_bits)         /* Enter Low Power Mode 0 */
101
#define LPM0_EXIT    _bic_SR_register_on_exit(LPM0_bits) /* Exit Low Power Mode 0 */
102
#define LPM1         _bis_SR_register(LPM1_bits)         /* Enter Low Power Mode 1 */
103
#define LPM1_EXIT    _bic_SR_register_on_exit(LPM1_bits) /* Exit Low Power Mode 1 */
104
#define LPM2         _bis_SR_register(LPM2_bits)         /* Enter Low Power Mode 2 */
105
#define LPM2_EXIT    _bic_SR_register_on_exit(LPM2_bits) /* Exit Low Power Mode 2 */
106
#define LPM3         _bis_SR_register(LPM3_bits)         /* Enter Low Power Mode 3 */
107
#define LPM3_EXIT    _bic_SR_register_on_exit(LPM3_bits) /* Exit Low Power Mode 3 */
108
#define LPM4         _bis_SR_register(LPM4_bits)         /* Enter Low Power Mode 4 */
109
#define LPM4_EXIT    _bic_SR_register_on_exit(LPM4_bits) /* Exit Low Power Mode 4 */
110
#endif /* End #defines for C */
111
 
112
/************************************************************
113
* PERIPHERAL FILE MAP
114
************************************************************/
115
 
116
/************************************************************
117
* SPECIAL FUNCTION REGISTER ADDRESSES + CONTROL BITS
118
************************************************************/
119
 
120
SFR_8BIT(IE1);                                /* Interrupt Enable 1 */
121
#define WDTIE                  (0x01)
122
#define OFIE                   (0x02)
123
#define P0IE_0                 (0x04)
124
#define P0IE_1                 (0x08)
125
 
126
SFR_8BIT(IFG1);                               /* Interrupt Flag 1 */
127
#define WDTIFG                 (0x01)
128
#define OFIFG                  (0x02)
129
#define P0IFG_0                (0x04)
130
#define P0IFG_1                (0x08)
131
#define NMIIFG                 (0x10)
132
 
133
SFR_8BIT(IE2);                                /* Interrupt Enable 2 */
134
#define URXIE                  (0x01)
135
#define UTXIE                  (0x02)
136
#define TPIE                   (0x08)
137
#define BTIE                   (0x80)
138
 
139
SFR_8BIT(IFG2);                               /* Interrupt Flag 2 */
140
#define URXIFG                 (0x01)
141
#define UTXIFG                 (0x02)
142
#define BTIFG                  (0x80)
143
 
144
SFR_8BIT(ME2);                                /* Module Enable 2 */
145
#define URXE                   (0x01)
146
#define USPIE                  (0x01)
147
#define UTXE                   (0x02)
148
 
149
/************************************************************
150
* WATCHDOG TIMER
151
************************************************************/
152
#define __MSP430_HAS_WDT__                    /* Definition to show that Module is available */
153
 
154
SFR_16BIT(WDTCTL);                            /* Watchdog Timer Control */
155
/* The bit names have been prefixed with "WDT" */
156
#define WDTIS0                 (0x0001)
157
#define WDTIS1                 (0x0002)
158
#define WDTSSEL                (0x0004)
159
#define WDTCNTCL               (0x0008)
160
#define WDTTMSEL               (0x0010)
161
#define WDTNMI                 (0x0020)
162
#define WDTNMIES               (0x0040)
163
#define WDTHOLD                (0x0080)
164
 
165
#define WDTPW                  (0x5A00)
166
 
167
/* WDT-interval times [1ms] coded with Bits 0-2 */
168
/* WDT is clocked by fSMCLK (assumed 1MHz) */
169
#define WDT_MDLY_32         (WDTPW+WDTTMSEL+WDTCNTCL)                         /* 32ms interval (default) */
170
#define WDT_MDLY_8          (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS0)                  /* 8ms     " */
171
#define WDT_MDLY_0_5        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS1)                  /* 0.5ms   " */
172
#define WDT_MDLY_0_064      (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS1+WDTIS0)           /* 0.064ms " */
173
/* WDT is clocked by fACLK (assumed 32KHz) */
174
#define WDT_ADLY_1000       (WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL)                 /* 1000ms  " */
175
#define WDT_ADLY_250        (WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS0)          /* 250ms   " */
176
#define WDT_ADLY_16         (WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS1)          /* 16ms    " */
177
#define WDT_ADLY_1_9        (WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS1+WDTIS0)   /* 1.9ms   " */
178
/* Watchdog mode -> reset after expired time */
179
/* WDT is clocked by fSMCLK (assumed 1MHz) */
180
#define WDT_MRST_32         (WDTPW+WDTCNTCL)                                  /* 32ms interval (default) */
181
#define WDT_MRST_8          (WDTPW+WDTCNTCL+WDTIS0)                           /* 8ms     " */
182
#define WDT_MRST_0_5        (WDTPW+WDTCNTCL+WDTIS1)                           /* 0.5ms   " */
183
#define WDT_MRST_0_064      (WDTPW+WDTCNTCL+WDTIS1+WDTIS0)                    /* 0.064ms " */
184
/* WDT is clocked by fACLK (assumed 32KHz) */
185
#define WDT_ARST_1000       (WDTPW+WDTCNTCL+WDTSSEL)                          /* 1000ms  " */
186
#define WDT_ARST_250        (WDTPW+WDTCNTCL+WDTSSEL+WDTIS0)                   /* 250ms   " */
187
#define WDT_ARST_16         (WDTPW+WDTCNTCL+WDTSSEL+WDTIS1)                   /* 16ms    " */
188
#define WDT_ARST_1_9        (WDTPW+WDTCNTCL+WDTSSEL+WDTIS1+WDTIS0)            /* 1.9ms   " */
189
 
190
/* INTERRUPT CONTROL */
191
/* These two bits are defined in the Special Function Registers */
192
/* #define WDTIE               0x01 */
193
/* #define WDTIFG              0x01 */
194
 
195
/************************************************************
196
* HARDWARE MULTIPLIER
197
************************************************************/
198
#define __MSP430_HAS_MPY__                    /* Definition to show that Module is available */
199
 
200
SFR_16BIT(MPY);                               /* Multiply Unsigned/Operand 1 */
201
SFR_16BIT(MPYS);                              /* Multiply Signed/Operand 1 */
202
SFR_16BIT(MAC);                               /* Multiply Unsigned and Accumulate/Operand 1 */
203
SFR_16BIT(MACS);                              /* Multiply Signed and Accumulate/Operand 1 */
204
SFR_16BIT(OP2);                               /* Operand 2 */
205
SFR_16BIT(RESLO);                             /* Result Low Word */
206
SFR_16BIT(RESHI);                             /* Result High Word */
207
SFR_16BIT(SUMEXT);                            /* Sum Extend */
208
 
209
/************************************************************
210
* DIGITAL I/O PORT0
211
************************************************************/
212
#define __MSP430_HAS_PORT0__                  /* Definition to show that Module is available */
213
 
214
SFR_8BIT(P0IN);                               /* Port 0 Input */
215
#define P0IN_0                 (0x01)
216
#define P0IN_1                 (0x02)
217
#define P0IN_2                 (0x04)
218
#define P0IN_3                 (0x08)
219
#define P0IN_4                 (0x10)
220
#define P0IN_5                 (0x20)
221
#define P0IN_6                 (0x40)
222
#define P0IN_7                 (0x80)
223
 
224
SFR_8BIT(P0OUT);                              /* Port 0 Output */
225
#define P0OUT_0                (0x01)
226
#define P0OUT_1                (0x02)
227
#define P0OUT_2                (0x04)
228
#define P0OUT_3                (0x08)
229
#define P0OUT_4                (0x10)
230
#define P0OUT_5                (0x20)
231
#define P0OUT_6                (0x40)
232
#define P0OUT_7                (0x80)
233
 
234
SFR_8BIT(P0DIR);                              /* Port 0 Direction */
235
#define P0DIR_0                (0x01)
236
#define P0DIR_1                (0x02)
237
#define P0DIR_2                (0x04)
238
#define P0DIR_3                (0x08)
239
#define P0DIR_4                (0x10)
240
#define P0DIR_5                (0x20)
241
#define P0DIR_6                (0x40)
242
#define P0DIR_7                (0x80)
243
 
244
SFR_8BIT(P0IFG);                              /* Port 0 Interrupt Flag */
245
/* These two bits are defined in Interrupt Flag 1 */
246
/* #define P0IFG_0             0x01 */
247
/* #define P0IFG_1             0x02 */
248
#define P0IFG_2                (0x04)
249
#define P0IFG_3                (0x08)
250
#define P0IFG_4                (0x10)
251
#define P0IFG_5                (0x20)
252
#define P0IFG_6                (0x40)
253
#define P0IFG_7                (0x80)
254
 
255
SFR_8BIT(P0IES);                              /* Port 0 Interrupt Edge Select */
256
#define P0IES_0                (0x01)
257
#define P0IES_1                (0x02)
258
#define P0IES_2                (0x04)
259
#define P0IES_3                (0x08)
260
#define P0IES_4                (0x10)
261
#define P0IES_5                (0x20)
262
#define P0IES_6                (0x40)
263
#define P0IES_7                (0x80)
264
 
265
SFR_8BIT(P0IE);                               /* Port 0 Interrupt Enable */
266
/* These two bits are defined in Interrupt Enable 1 */
267
/* #define P0IE_0              0x01 */
268
/* #define P0IE_1              0x02 */
269
#define P0IE_2                 (0x04)
270
#define P0IE_3                 (0x08)
271
#define P0IE_4                 (0x10)
272
#define P0IE_5                 (0x20)
273
#define P0IE_6                 (0x40)
274
#define P0IE_7                 (0x80)
275
 
276
/************************************************************
277
* DIGITAL I/O Port1/2
278
************************************************************/
279
#define __MSP430_HAS_PORT1__                  /* Definition to show that Module is available */
280
#define __MSP430_HAS_PORT2__                  /* Definition to show that Module is available */
281
 
282
SFR_8BIT(P1IN);                               /* Port 1 Input */
283
SFR_8BIT(P1OUT);                              /* Port 1 Output */
284
SFR_8BIT(P1DIR);                              /* Port 1 Direction */
285
SFR_8BIT(P1IFG);                              /* Port 1 Interrupt Flag */
286
SFR_8BIT(P1IES);                              /* Port 1 Interrupt Edge Select */
287
SFR_8BIT(P1IE);                               /* Port 1 Interrupt Enable */
288
SFR_8BIT(P1SEL);                              /* Port 1 Selection */
289
 
290
SFR_8BIT(P2IN);                               /* Port 2 Input */
291
SFR_8BIT(P2OUT);                              /* Port 2 Output */
292
SFR_8BIT(P2DIR);                              /* Port 2 Direction */
293
SFR_8BIT(P2IFG);                              /* Port 2 Interrupt Flag */
294
SFR_8BIT(P2IES);                              /* Port 2 Interrupt Edge Select */
295
SFR_8BIT(P2IE);                               /* Port 2 Interrupt Enable */
296
SFR_8BIT(P2SEL);                              /* Port 2 Selection */
297
 
298
/************************************************************
299
* DIGITAL I/O Port3/4
300
************************************************************/
301
#define __MSP430_HAS_PORT3__                  /* Definition to show that Module is available */
302
#define __MSP430_HAS_PORT4__                  /* Definition to show that Module is available */
303
 
304
SFR_8BIT(P3IN);                               /* Port 3 Input */
305
SFR_8BIT(P3OUT);                              /* Port 3 Output */
306
SFR_8BIT(P3DIR);                              /* Port 3 Direction */
307
SFR_8BIT(P3SEL);                              /* Port 3 Selection */
308
 
309
SFR_8BIT(P4IN);                               /* Port 4 Input */
310
SFR_8BIT(P4OUT);                              /* Port 4 Output */
311
SFR_8BIT(P4DIR);                              /* Port 4 Direction */
312
SFR_8BIT(P4SEL);                              /* Port 4 Selection */
313
 
314
/************************************************************
315
* BASIC TIMER
316
************************************************************/
317
#define __MSP430_HAS_BT__                     /* Definition to show that Module is available */
318
 
319
SFR_8BIT(BTCTL);                              /* Basic Timer Control */
320
/* The bit names have been prefixed with "BT" */
321
#define BTIP0                  (0x01)
322
#define BTIP1                  (0x02)
323
#define BTIP2                  (0x04)
324
#define BTFRFQ0                (0x08)
325
#define BTFRFQ1                (0x10)
326
#define BTDIV                  (0x20)         /* fCLK2 = ACLK:256 */
327
#define BTHOLD                 (0x40)         /* BT1 is held if this bit is set */
328
#define BTSSEL                 (0x80)         /* fBT = fMCLK (main clock) */
329
 
330
SFR_8BIT(BTCNT1);                             /* Basic Timer Count 1 */
331
SFR_8BIT(BTCNT2);                             /* Basic Timer Count 2 */
332
 
333
/* Frequency of the BTCNT2 coded with Bit 5 and 7 in BTCTL */
334
#define BT_fCLK2_ACLK          (0x00)
335
#define BT_fCLK2_ACLK_DIV256   (BTDIV)
336
#define BT_fCLK2_MCLK          (BTSSEL)
337
 
338
/* Interrupt interval time fINT coded with Bits 0-2 in BTCTL */
339
#define BT_fCLK2_DIV2          (0x00)         /* fINT = fCLK2:2 (default) */
340
#define BT_fCLK2_DIV4          (BTIP0)        /* fINT = fCLK2:4 */
341
#define BT_fCLK2_DIV8          (BTIP1)        /* fINT = fCLK2:8 */
342
#define BT_fCLK2_DIV16         (BTIP1+BTIP0)  /* fINT = fCLK2:16 */
343
#define BT_fCLK2_DIV32         (BTIP2)        /* fINT = fCLK2:32 */
344
#define BT_fCLK2_DIV64         (BTIP2+BTIP0)  /* fINT = fCLK2:64 */
345
#define BT_fCLK2_DIV128        (BTIP2+BTIP1)  /* fINT = fCLK2:128 */
346
#define BT_fCLK2_DIV256     (BTIP2+BTIP1+BTIP0)       /* fINT = fCLK2:256 */
347
/* Frequency of LCD coded with Bits 3-4 */
348
#define BT_fLCD_DIV32          (0x00)         /* fLCD = fACLK:32 (default) */
349
#define BT_fLCD_DIV64          (BTFRFQ0)      /* fLCD = fACLK:64 */
350
#define BT_fLCD_DIV128         (BTFRFQ1)      /* fLCD = fACLK:128 */
351
#define BT_fLCD_DIV256      (BTFRFQ1+BTFRFQ0)         /* fLCD = fACLK:256 */
352
/* LCD frequency values with fBT=fACLK */
353
#define BT_fLCD_1K             (0x00)         /* fACLK:32 (default) */
354
#define BT_fLCD_512            (BTFRFQ0)      /* fACLK:64 */
355
#define BT_fLCD_256            (BTFRFQ1)      /* fACLK:128 */
356
#define BT_fLCD_128         (BTFRFQ1+BTFRFQ0)         /* fACLK:256 */
357
/* LCD frequency values with fBT=fMCLK */
358
#define BT_fLCD_31K            (BTSSEL)       /* fMCLK:32 */
359
#define BT_fLCD_15_5K       (BTSSEL+BTFRFQ0)          /* fMCLK:64 */
360
#define BT_fLCD_7_8K        (BTSSEL+BTFRFQ1+BTFRFQ0)  /* fMCLK:256 */
361
/* with assumed vlues of fACLK=32KHz, fMCLK=1MHz */
362
/* fBT=fACLK is thought for longer interval times */
363
#define BT_ADLY_0_064          (0x00)         /* 0.064ms interval (default) */
364
#define BT_ADLY_0_125          (BTIP0)        /* 0.125ms    " */
365
#define BT_ADLY_0_25           (BTIP1)        /* 0.25ms     " */
366
#define BT_ADLY_0_5            (BTIP1+BTIP0)  /* 0.5ms      " */
367
#define BT_ADLY_1              (BTIP2)        /* 1ms        " */
368
#define BT_ADLY_2              (BTIP2+BTIP0)  /* 2ms        " */
369
#define BT_ADLY_4              (BTIP2+BTIP1)  /* 4ms        " */
370
#define BT_ADLY_8           (BTIP2+BTIP1+BTIP0)       /* 8ms        " */
371
#define BT_ADLY_16             (BTDIV)        /* 16ms       " */
372
#define BT_ADLY_32             (BTDIV+BTIP0)  /* 32ms       " */
373
#define BT_ADLY_64             (BTDIV+BTIP1)  /* 64ms       " */
374
#define BT_ADLY_125         (BTDIV+BTIP1+BTIP0)       /* 125ms      " */
375
#define BT_ADLY_250            (BTDIV+BTIP2)  /* 250ms      " */
376
#define BT_ADLY_500         (BTDIV+BTIP2+BTIP0)       /* 500ms      " */
377
#define BT_ADLY_1000        (BTDIV+BTIP2+BTIP1)       /* 1000ms     " */
378
#define BT_ADLY_2000        (BTDIV+BTIP2+BTIP1+BTIP0) /* 2000ms     " */
379
/* fCLK2=fMCLK (1MHz) is thought for short interval times */
380
/* the timing for short intervals is more precise than ACLK */
381
/* NOTE */
382
/* Be sure that the SCFQCTL-Register is set to 01Fh so that fMCLK=1MHz */
383
/* Too low interval time results in interrupts too frequent for the processor to handle! */
384
#define BT_MDLY_0_002          (BTSSEL)       /* 0.002ms interval       *** interval times */
385
#define BT_MDLY_0_004          (BTSSEL+BTIP0) /* 0.004ms    "           *** too short for */
386
#define BT_MDLY_0_008          (BTSSEL+BTIP1) /* 0.008ms    "           *** interrupt */
387
#define BT_MDLY_0_016       (BTSSEL+BTIP1+BTIP0)      /* 0.016ms    "           *** handling */
388
#define BT_MDLY_0_032          (BTSSEL+BTIP2) /* 0.032ms    " */
389
#define BT_MDLY_0_064       (BTSSEL+BTIP2+BTIP0)      /* 0.064ms    " */
390
#define BT_MDLY_0_125       (BTSSEL+BTIP2+BTIP1)      /* 0.125ms    " */
391
#define BT_MDLY_0_25        (BTSSEL+BTIP2+BTIP1+BTIP0)/* 0.25ms     " */
392
 
393
/* Reset/Hold coded with Bits 6-7 in BT(1)CTL */
394
/* this is for BT */
395
//#define BTRESET_CNT1        (BTRESET)           /* BTCNT1 is reset while BTRESET is set */
396
//#define BTRESET_CNT1_2      (BTRESET+BTDIV)     /* BTCNT1 .AND. BTCNT2 are reset while ~ is set */
397
/* this is for BT1 */
398
#define BTHOLD_CNT1            (BTHOLD)       /* BTCNT1 is held while BTHOLD is set */
399
#define BTHOLD_CNT1_2          (BTHOLD+BTDIV) /* BT1CNT1 .AND. BT1CNT2 are held while ~ is set */
400
 
401
/* INTERRUPT CONTROL BITS */
402
/* #define BTIE                0x80 */
403
/* #define BTIFG               0x80 */
404
 
405
/************************************************************
406
* SYSTEM CLOCK GENERATOR
407
************************************************************/
408
#define __MSP430_HAS_FLL__                    /* Definition to show that Module is available */
409
 
410
SFR_8BIT(SCFI0);                              /* System Clock Frequency Integrator 0 */
411
#define FN_2                   (0x04)
412
#define FN_3                   (0x08)
413
#define FN_4                   (0x10)
414
 
415
SFR_8BIT(SCFI1);                              /* System Clock Frequency Integrator 1 */
416
SFR_8BIT(SCFQCTL);                            /* System Clock Frequency Control */
417
/* System clock frequency values fMCLK coded with Bits 0-6 in SCFQCTL */
418
/* #define SCFQ_32K            0x00                        fMCLK=1*fACLK          only a range from */
419
/* #define SCFQ_64K            0x01                        fMCLK=2*fACLK          3+1 to 127+1 is possible */
420
#define SCFQ_128K              (0x03)         /* fMCLK=4*fACLK */
421
#define SCFQ_256K              (0x07)         /* fMCLK=8*fACLK */
422
#define SCFQ_512K              (0x0F)         /* fMCLK=16*fACLK */
423
#define SCFQ_1M                (0x1F)         /* fMCLK=32*fACLK */
424
#define SCFQ_2M                (0x3F)         /* fMCLK=64*fACLK */
425
#define SCFQ_4M                (0x7F)         /* fMCLK=128*fACLK        not possible for ICE */
426
 
427
SFR_8BIT(CBCTL);                              /* Crystal Buffer Control *** WRITE-ONLY *** */
428
#define CBE                    (0x01)
429
#define CBSEL0                 (0x02)
430
#define CBSEL1                 (0x04)
431
/* Source select of frequency at output pin XBUF coded with Bits 1-2 in CBCTL */
432
#define CBSEL_ACLK             (0x00)         /* source is ACLK         (default after POR) */
433
#define CBSEL_ACLK_DIV2        (CBSEL0)       /* source is ACLK/2 */
434
#define CBSEL_ACLK_DIV4        (CBSEL1)       /* source is ACLK/4 */
435
#define CBSEL_MCLK          (CBSEL1+CBSEL0)           /* source is MCLK */
436
 
437
/* INTERRUPT CONTROL BITS */
438
/* These two bits are defined in the Special Function Registers */
439
/* #define OFIFG               0x02 */
440
/* #define OFIE                0x02 */
441
 
442
/************************************************************
443
* LCD REGISTER
444
************************************************************/
445
#define __MSP430_HAS_LCD__                    /* Definition to show that Module is available */
446
 
447
SFR_8BIT(LCDCTL);                             /* LCD Control */
448
/* the names of the mode bits are different from the spec */
449
#define LCDON                  (0x01)
450
#define LCDLOWR                (0x02)
451
#define LCDSON                 (0x04)
452
#define LCDMX0                 (0x08)
453
#define LCDMX1                 (0x10)
454
#define LCDP0                  (0x20)
455
#define LCDP1                  (0x40)
456
#define LCDP2                  (0x80)
457
/* Display modes coded with Bits 2-4 */
458
#define LCDSTATIC              (LCDSON)
459
#define LCD2MUX                (LCDMX0+LCDSON)
460
#define LCD3MUX                (LCDMX1+LCDSON)
461
#define LCD4MUX                (LCDMX1+LCDMX0+LCDSON)
462
/* Group select code with Bits 5-7                     Seg.lines   Dig.output */
463
#define LCDSG0                 (0x00)         /* S0  - S1    O2  - O29 (default) */
464
#define LCDSG0_1               (LCDP0)        /* S0  - S5    O6  - O29 */
465
#define LCDSG0_2               (LCDP1)        /* S0  - S9    O10 - O29 */
466
#define LCDSG0_3               (LCDP1+LCDP0)  /* S0  - S13   O14 - O29 */
467
#define LCDSG0_4               (LCDP2)        /* S0  - S17   O18 - O29 */
468
#define LCDSG0_5               (LCDP2+LCDP0)  /* S0  - S21   O22 - O29 */
469
#define LCDSG0_6               (LCDP2+LCDP1)  /* S0  - S25   O26 - O29 */
470
#define LCDSG0_7            (LCDP2+LCDP1+LCDP0)       /* S0  - S29   --------- */
471
/* NOTE: YOU CAN ONLY USE THE 'S' OR 'G' DECLARATIONS FOR A COMMAND */
472
/* MOV  #LCDSG0_3+LCDOG2_7,&LCDCTL ACTUALY MEANS MOV  #LCDP1,&LCDCTL! */
473
#define LCDOG1_7               (0x00)         /* S0  - S1    O2  - O29 (default) */
474
#define LCDOG2_7               (LCDP0)        /* S0  - S5    O6  - O29 */
475
#define LCDOG3_7               (LCDP1)        /* S0  - S9    O10 - O29 */
476
#define LCDOG4_7               (LCDP1+LCDP0)  /* S0  - S13   O14 - O29 */
477
#define LCDOG5_7               (LCDP2)        /* S0  - S17   O18 - O29 */
478
#define LCDOG6_7               (LCDP2+LCDP0)  /* S0  - S21   O22 - O29 */
479
#define LCDOG7                 (LCDP2+LCDP1)  /* S0  - S25   O26 - O29 */
480
#define LCDOGOFF            (LCDP2+LCDP1+LCDP0)       /* S0  - S29   --------- */
481
 
482
#define LCDMEM_                (0x0031)       /* LCD Memory */
483
#ifdef __ASM_HEADER__
484
#define LCDMEM                 (LCDMEM_)      /* LCD Memory (for assembler) */
485
#else
486
#define LCDMEM                 ((char*)       LCDMEM_) /* LCD Memory (for C) */
487
#endif
488
SFR_8BIT(LCDM1);                              /* LCD Memory 1 */
489
SFR_8BIT(LCDM2);                              /* LCD Memory 2 */
490
SFR_8BIT(LCDM3);                              /* LCD Memory 3 */
491
SFR_8BIT(LCDM4);                              /* LCD Memory 4 */
492
SFR_8BIT(LCDM5);                              /* LCD Memory 5 */
493
SFR_8BIT(LCDM6);                              /* LCD Memory 6 */
494
SFR_8BIT(LCDM7);                              /* LCD Memory 7 */
495
SFR_8BIT(LCDM8);                              /* LCD Memory 8 */
496
SFR_8BIT(LCDM9);                              /* LCD Memory 9 */
497
SFR_8BIT(LCDM10);                             /* LCD Memory 10 */
498
SFR_8BIT(LCDM11);                             /* LCD Memory 11 */
499
SFR_8BIT(LCDM12);                             /* LCD Memory 12 */
500
SFR_8BIT(LCDM13);                             /* LCD Memory 13 */
501
SFR_8BIT(LCDM14);                             /* LCD Memory 14 */
502
SFR_8BIT(LCDM15);                             /* LCD Memory 15 */
503
 
504
#define LCDMA                  (LCDM10)       /* LCD Memory A */
505
#define LCDMB                  (LCDM11)       /* LCD Memory B */
506
#define LCDMC                  (LCDM12)       /* LCD Memory C */
507
#define LCDMD                  (LCDM13)       /* LCD Memory D */
508
#define LCDME                  (LCDM14)       /* LCD Memory E */
509
#define LCDMF                  (LCDM15)       /* LCD Memory F */
510
 
511
/************************************************************
512
* USART
513
************************************************************/
514
#define __MSP430_HAS_UART0__                  /* Definition to show that Module is available */
515
 
516
SFR_8BIT(UCTL);                               /* USART Control */
517
SFR_8BIT(UTCTL);                              /* USART Transmit Control */
518
SFR_8BIT(URCTL);                              /* USART Receive Control */
519
SFR_8BIT(UMCTL);                              /* USART Modulation Control */
520
SFR_8BIT(UBR0);                               /* USART Baud Rate 0 */
521
SFR_8BIT(UBR1);                               /* USART Buad Rate 1 */
522
SFR_8BIT(RXBUF);                              /* USART Receive Buffer */
523
SFR_8BIT(TXBUF);                              /* USART Transmit Buffer */
524
 
525
#define PENA                   (0x80)         /* UCTL */
526
#define PEV                    (0x40)
527
#define SPB                    (0x20)         /* to distinguish from stackpointer SP */
528
#define CHAR                   (0x10)
529
#define LISTEN                 (0x08)
530
#define SYNC                   (0x04)
531
#define MM                     (0x02)
532
#define SWRST                  (0x01)
533
 
534
#define CKPH                   (0x80)         /* UTCTL */
535
#define CKPL                   (0x40)
536
#define SSEL1                  (0x20)
537
#define SSEL0                  (0x10)
538
#define URXSE                  (0x08)
539
#define TXWAKE                 (0x04)
540
#define STC                    (0x02)
541
#define TXEPT                  (0x01)
542
 
543
#define FE                     (0x80)         /* URCTL */
544
#define PE                     (0x40)
545
#define OE                     (0x20)
546
#define BRK                    (0x10)
547
#define URXEIE                 (0x08)
548
#define URXWIE                 (0x04)
549
#define RXWAKE                 (0x02)
550
#define RXERR                  (0x01)
551
 
552
/************************************************************
553
* Timer A5
554
************************************************************/
555
#define __MSP430_HAS_TA5__                    /* Definition to show that Module is available */
556
 
557
SFR_16BIT(TAIV);                              /* Timer A Interrupt Vector Word */
558
SFR_16BIT(TACTL);                             /* Timer A Control */
559
SFR_16BIT(TACCTL0);                           /* Timer A Capture/Compare Control 0 */
560
SFR_16BIT(TACCTL1);                           /* Timer A Capture/Compare Control 1 */
561
SFR_16BIT(TACCTL2);                           /* Timer A Capture/Compare Control 2 */
562
SFR_16BIT(TACCTL3);                           /* Timer A Capture/Compare Control 3 */
563
SFR_16BIT(TACCTL4);                           /* Timer A Capture/Compare Control 4 */
564
SFR_16BIT(TAR);                               /* Timer A Counter Register */
565
SFR_16BIT(TACCR0);                            /* Timer A Capture/Compare 0 */
566
SFR_16BIT(TACCR1);                            /* Timer A Capture/Compare 1 */
567
SFR_16BIT(TACCR2);                            /* Timer A Capture/Compare 2 */
568
SFR_16BIT(TACCR3);                            /* Timer A Capture/Compare 3 */
569
SFR_16BIT(TACCR4);                            /* Timer A Capture/Compare 4 */
570
 
571
/* Alternate register names */
572
#define CCTL0                  TACCTL0        /* Timer A Capture/Compare Control 0 */
573
#define CCTL1                  TACCTL1        /* Timer A Capture/Compare Control 1 */
574
#define CCTL2                  TACCTL2        /* Timer A Capture/Compare Control 2 */
575
#define CCTL3                  TACCTL3        /* Timer A Capture/Compare Control 3 */
576
#define CCTL4                  TACCTL4        /* Timer A Capture/Compare Control 4 */
577
#define CCR0                   TACCR0         /* Timer A Capture/Compare 0 */
578
#define CCR1                   TACCR1         /* Timer A Capture/Compare 1 */
579
#define CCR2                   TACCR2         /* Timer A Capture/Compare 2 */
580
#define CCR3                   TACCR3         /* Timer A Capture/Compare 3 */
581
#define CCR4                   TACCR4         /* Timer A Capture/Compare 4 */
582
#define CCTL0_                 TACCTL0_       /* Timer A Capture/Compare Control 0 */
583
#define CCTL1_                 TACCTL1_       /* Timer A Capture/Compare Control 1 */
584
#define CCTL2_                 TACCTL2_       /* Timer A Capture/Compare Control 2 */
585
#define CCTL3_                 TACCTL3_       /* Timer A Capture/Compare Control 3 */
586
#define CCTL4_                 TACCTL4_       /* Timer A Capture/Compare Control 4 */
587
#define CCR0_                  TACCR0_        /* Timer A Capture/Compare 0 */
588
#define CCR1_                  TACCR1_        /* Timer A Capture/Compare 1 */
589
#define CCR2_                  TACCR2_        /* Timer A Capture/Compare 2 */
590
#define CCR3_                  TACCR3_        /* Timer A Capture/Compare 3 */
591
#define CCR4_                  TACCR4_        /* Timer A Capture/Compare 4 */
592
/* Alternate register names - 5xx style */
593
#define TA0IV                  TAIV           /* Timer A Interrupt Vector Word */
594
#define TA0CTL                 TACTL          /* Timer A Control */
595
#define TA0CCTL0               TACCTL0        /* Timer A Capture/Compare Control 0 */
596
#define TA0CCTL1               TACCTL1        /* Timer A Capture/Compare Control 1 */
597
#define TA0CCTL2               TACCTL2        /* Timer A Capture/Compare Control 2 */
598
#define TA0CCTL3               TACCTL3        /* Timer A Capture/Compare Control 3 */
599
#define TA0CCTL4               TACCTL4        /* Timer A Capture/Compare Control 4 */
600
#define TA0R                   TAR            /* Timer A Counter Register */
601
#define TA0CCR0                TACCR0         /* Timer A Capture/Compare 0 */
602
#define TA0CCR1                TACCR1         /* Timer A Capture/Compare 1 */
603
#define TA0CCR2                TACCR2         /* Timer A Capture/Compare 2 */
604
#define TA0CCR3                TACCR3         /* Timer A Capture/Compare 3 */
605
#define TA0CCR4                TACCR4         /* Timer A Capture/Compare 4 */
606
#define TA0IV_                 TAIV_          /* Timer A Interrupt Vector Word */
607
#define TA0CTL_                TACTL_         /* Timer A Control */
608
#define TA0CCTL0_              TACCTL0_       /* Timer A Capture/Compare Control 0 */
609
#define TA0CCTL1_              TACCTL1_       /* Timer A Capture/Compare Control 1 */
610
#define TA0CCTL2_              TACCTL2_       /* Timer A Capture/Compare Control 2 */
611
#define TA0CCTL3_              TACCTL3_       /* Timer A Capture/Compare Control 3 */
612
#define TA0CCTL4_              TACCTL4_       /* Timer A Capture/Compare Control 4 */
613
#define TA0R_                  TAR_           /* Timer A Counter Register */
614
#define TA0CCR0_               TACCR0_        /* Timer A Capture/Compare 0 */
615
#define TA0CCR1_               TACCR1_        /* Timer A Capture/Compare 1 */
616
#define TA0CCR2_               TACCR2_        /* Timer A Capture/Compare 2 */
617
#define TA0CCR3_               TACCR3_        /* Timer A Capture/Compare 3 */
618
#define TA0CCR4_               TACCR4_        /* Timer A Capture/Compare 4 */
619
 
620
#define TASSEL1                (0x0200)       /* Timer A clock source select 0 */
621
#define TASSEL0                (0x0100)       /* Timer A clock source select 1 */
622
#define ID1                    (0x0080)       /* Timer A clock input divider 1 */
623
#define ID0                    (0x0040)       /* Timer A clock input divider 0 */
624
#define MC1                    (0x0020)       /* Timer A mode control 1 */
625
#define MC0                    (0x0010)       /* Timer A mode control 0 */
626
#define TACLR                  (0x0004)       /* Timer A counter clear */
627
#define TAIE                   (0x0002)       /* Timer A counter interrupt enable */
628
#define TAIFG                  (0x0001)       /* Timer A counter interrupt flag */
629
 
630
#define MC_0                   (0*0x10u)      /* Timer A mode control: 0 - Stop */
631
#define MC_1                   (1*0x10u)      /* Timer A mode control: 1 - Up to CCR0 */
632
#define MC_2                   (2*0x10u)      /* Timer A mode control: 2 - Continous up */
633
#define MC_3                   (3*0x10u)      /* Timer A mode control: 3 - Up/Down */
634
#define ID_0                   (0*0x40u)      /* Timer A input divider: 0 - /1 */
635
#define ID_1                   (1*0x40u)      /* Timer A input divider: 1 - /2 */
636
#define ID_2                   (2*0x40u)      /* Timer A input divider: 2 - /4 */
637
#define ID_3                   (3*0x40u)      /* Timer A input divider: 3 - /8 */
638
#define TASSEL_0               (0*0x100u)     /* Timer A clock source select: 0 - TACLK */
639
#define TASSEL_1               (1*0x100u)     /* Timer A clock source select: 1 - ACLK  */
640
#define TASSEL_2               (2*0x100u)     /* Timer A clock source select: 2 - SMCLK */
641
#define TASSEL_3               (3*0x100u)     /* Timer A clock source select: 3 - INCLK */
642
 
643
#define CM1                    (0x8000)       /* Capture mode 1 */
644
#define CM0                    (0x4000)       /* Capture mode 0 */
645
#define CCIS1                  (0x2000)       /* Capture input select 1 */
646
#define CCIS0                  (0x1000)       /* Capture input select 0 */
647
#define SCS                    (0x0800)       /* Capture sychronize */
648
#define SCCI                   (0x0400)       /* Latched capture signal (read) */
649
#define CAP                    (0x0100)       /* Capture mode: 1 /Compare mode : 0 */
650
#define OUTMOD2                (0x0080)       /* Output mode 2 */
651
#define OUTMOD1                (0x0040)       /* Output mode 1 */
652
#define OUTMOD0                (0x0020)       /* Output mode 0 */
653
#define CCIE                   (0x0010)       /* Capture/compare interrupt enable */
654
#define CCI                    (0x0008)       /* Capture input signal (read) */
655
#define OUT                    (0x0004)       /* PWM Output signal if output mode 0 */
656
#define COV                    (0x0002)       /* Capture/compare overflow flag */
657
#define CCIFG                  (0x0001)       /* Capture/compare interrupt flag */
658
 
659
#define OUTMOD_0               (0*0x20u)      /* PWM output mode: 0 - output only */
660
#define OUTMOD_1               (1*0x20u)      /* PWM output mode: 1 - set */
661
#define OUTMOD_2               (2*0x20u)      /* PWM output mode: 2 - PWM toggle/reset */
662
#define OUTMOD_3               (3*0x20u)      /* PWM output mode: 3 - PWM set/reset */
663
#define OUTMOD_4               (4*0x20u)      /* PWM output mode: 4 - toggle */
664
#define OUTMOD_5               (5*0x20u)      /* PWM output mode: 5 - Reset */
665
#define OUTMOD_6               (6*0x20u)      /* PWM output mode: 6 - PWM toggle/set */
666
#define OUTMOD_7               (7*0x20u)      /* PWM output mode: 7 - PWM reset/set */
667
#define CCIS_0                 (0*0x1000u)    /* Capture input select: 0 - CCIxA */
668
#define CCIS_1                 (1*0x1000u)    /* Capture input select: 1 - CCIxB */
669
#define CCIS_2                 (2*0x1000u)    /* Capture input select: 2 - GND */
670
#define CCIS_3                 (3*0x1000u)    /* Capture input select: 3 - Vcc */
671
#define CM_0                   (0*0x4000u)    /* Capture mode: 0 - disabled */
672
#define CM_1                   (1*0x4000u)    /* Capture mode: 1 - pos. edge */
673
#define CM_2                   (2*0x4000u)    /* Capture mode: 1 - neg. edge */
674
#define CM_3                   (3*0x4000u)    /* Capture mode: 1 - both edges */
675
 
676
/* TA5IV Definitions */
677
#define TAIV_NONE              (0x0000)       /* No Interrupt pending */
678
#define TAIV_TACCR1            (0x0002)       /* TACCR1_CCIFG */
679
#define TAIV_TACCR2            (0x0004)       /* TACCR2_CCIFG */
680
#define TAIV_TACCR3            (0x0006)       /* TACCR3_CCIFG */
681
#define TAIV_TACCR4            (0x0008)       /* TACCR4_CCIFG */
682
#define TAIV_TAIFG             (0x000A)       /* TAIFG */
683
 
684
/************************************************************
685
* 8BIT TIMER/COUNTER
686
************************************************************/
687
#define __MSP430_HAS_8BTC__                   /* Definition to show that Module is available */
688
 
689
SFR_8BIT(TCCTL);                              /* Timer/Counter Control */
690
/* The bit names have been prefixed with "TC" */
691
#define TCRXD                  (0x01)
692
#define TCTXD                  (0x02)
693
#define TCRXACT                (0x04)
694
#define TCENCNT                (0x08)
695
#define TCTXE                  (0x10)
696
#define TCISCTL                (0x20)
697
#define TCSSEL0                (0x40)
698
#define TCSSEL1                (0x80)
699
/* Source select of clock input coded with Bits 6-7 */
700
#define TCSSEL_P01             (0x00)         /* source is signal at pin P0.1 (default) */
701
#define TCSSEL_ACLK            (TCSSEL0)      /* source is ACLK */
702
#define TCSSEL_MCLK            (TCSSEL1)      /* source is MCLK */
703
#define TCSSEL_P01_MCLK     (TCSSEL1+TCSSEL0)         /* source is signal pin P0.1 .AND. MCLK */
704
 
705
SFR_8BIT(TCPLD);                              /* Timer/Counter Preload */
706
SFR_8BIT(TCDAT);                              /* Timer/Counter Data */
707
 
708
/************************************************************
709
* TIMER/PORT
710
************************************************************/
711
#define __MSP430_HAS_TP__                     /* Definition to show that Module is available */
712
 
713
SFR_8BIT(TPCTL);                              /* Timer/Port Control */
714
#define EN1FG                  (0x01)
715
#define RC1FG                  (0x02)
716
#define RC2FG                  (0x04)
717
#define EN1                    (0x08)
718
#define ENA                    (0x10)
719
#define ENB                    (0x20)
720
#define TPSSEL0                (0x40)
721
#define TPSSEL1                (0x80)
722
/* The EN1 signal of TPCNT1 is coded with with Bits 3-5 in TPCTL */
723
#define TPCNT1_EN_OFF          (0x00)         /* TPCNT1 is disabled */
724
#define TPCNT1_EN_ON           (ENA)          /*   "    is enabled */
725
#define TPCNT1_EN_nTPIN5       (ENB)          /*   "    is enabled with ~TPIN.5 */
726
#define TPCNT1_EN_TPIN5        (TPSSEL0+ENB)  /*   "    is enabled with TPIN.5 */
727
#define TPCNT1_EN_nCIN         (ENB+ENA)      /*   "    is enabled with ~CIN */
728
#define TPCNT1_EN_CIN        (TPSSEL0+ENB+ENA)       /*   "    is enabled with CIN */
729
 
730
/* Source select of clock input coded with Bits 6-7 in TPCTL */
731
#define TPSSEL_CLK1_CIN        (0x00)         /* CLK1 source is signal at CIN   (default) */
732
#define TPSSEL_CLK1_ACLK       (TPSSEL0)      /* CLK1 source is ACLK */
733
#define TPSSEL_CLK1_MCLK       (TPSSEL1)      /* CLK1 source is MCLK */
734
 
735
/* DATA REGISTER ADDRESSES */
736
SFR_8BIT(TPCNT1);                             /* Timer/Port Counter 1 */
737
SFR_8BIT(TPCNT2);                             /* Timer/Port Counter 2 */
738
 
739
SFR_8BIT(TPD);                                /* Timer/Port Data */
740
#define TPD_0                  (0x01)
741
#define TPD_1                  (0x02)
742
#define TPD_2                  (0x04)
743
#define TPD_3                  (0x08)
744
#define TPD_4                  (0x10)
745
#define TPD_5                  (0x20)
746
#define CPON                   (0x40)
747
#define B16                    (0x80)
748
 
749
SFR_8BIT(TPE);                                /* Timer/Port Enable */
750
#define TPE_0                  (0x01)
751
#define TPE_1                  (0x02)
752
#define TPE_2                  (0x04)
753
#define TPE_3                  (0x08)
754
#define TPE_4                  (0x10)
755
#define TPE_5                  (0x20)
756
#define TPSSEL2                (0x40)
757
#define TPSSEL3                (0x80)
758
/* Source select of clock input coded with Bits 6-7 in TPE
759
   NOTE: If the control bit B16 in TPD is set, TPSSEL2/3
760
         are 'don't care' and the clock source of counter
761
         TPCNT2 is the same as of the counter TPCNT1. */
762
#define TPSSEL_CLK2_TPIN5      (0x00)         /* CLK2 source is signal TPIN.5 (default) */
763
#define TPSSEL_CLK2_ACLK       (TPSSEL2)      /* CLK2 source is ACLK */
764
#define TPSSEL_CLK2_MCLK       (TPSSEL3)      /* CLK2 source is MCLK */
765
#define TPSSEL_CLK2_OFF     (TPSSEL3+TPSSEL2)/* CLK2 source is disabled  */
766
 
767
/************************************************************
768
* EPROM CONTROL
769
************************************************************/
770
#define __MSP430_HAS_EPROM__                  /* Definition to show that Module is available */
771
 
772
SFR_8BIT(EPCTL);                              /* EPROM Control */
773
#define EPEXE                  (0x01)
774
#define EPVPPS                 (0x02)
775
 
776
/************************************************************
777
* Interrupt Vectors (offset from 0xFFE0)
778
************************************************************/
779
 
780
#define VECTOR_NAME(name)       name##_ptr
781
#define EMIT_PRAGMA(x)          _Pragma(#x)
782
#define CREATE_VECTOR(name)     void (* const VECTOR_NAME(name))(void) = &name
783
#define PLACE_VECTOR(vector,section) EMIT_PRAGMA(DATA_SECTION(vector,section))
784
#define ISR_VECTOR(func,offset) CREATE_VECTOR(func); \
785
                                PLACE_VECTOR(VECTOR_NAME(func), offset)
786
 
787
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
788
#define PORT0_VECTOR            ".int00"                    /* 0xFFE0 Port 0 Bits 2-7 [Lowest Priority] */
789
#else
790
#define PORT0_VECTOR            (0 * 1u)                     /* 0xFFE0 Port 0 Bits 2-7 [Lowest Priority] */
791
/*#define PORT0_ISR(func)         ISR_VECTOR(func, ".int00")  */ /* 0xFFE0 Port 0 Bits 2-7 [Lowest Priority] */ /* CCE V2 Style */
792
#endif
793
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
794
#define BASICTIMER_VECTOR       ".int01"                    /* 0xFFE2 Basic Timer */
795
#else
796
#define BASICTIMER_VECTOR       (1 * 1u)                     /* 0xFFE2 Basic Timer */
797
/*#define BASICTIMER_ISR(func)    ISR_VECTOR(func, ".int01")  */ /* 0xFFE2 Basic Timer */ /* CCE V2 Style */
798
#endif
799
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
800
#define PORT1_VECTOR            ".int02"                    /* 0xFFE4 Port 1 */
801
#else
802
#define PORT1_VECTOR            (2 * 1u)                     /* 0xFFE4 Port 1 */
803
/*#define PORT1_ISR(func)         ISR_VECTOR(func, ".int02")  */ /* 0xFFE4 Port 1 */ /* CCE V2 Style */
804
#endif
805
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
806
#define PORT2_VECTOR            ".int03"                    /* 0xFFE6 Port 2 */
807
#else
808
#define PORT2_VECTOR            (3 * 1u)                     /* 0xFFE6 Port 2 */
809
/*#define PORT2_ISR(func)         ISR_VECTOR(func, ".int03")  */ /* 0xFFE6 Port 2 */ /* CCE V2 Style */
810
#endif
811
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
812
#define TIMERPORT_VECTOR        ".int04"                    /* 0xFFE8 Timer/Port */
813
#else
814
#define TIMERPORT_VECTOR        (4 * 1u)                     /* 0xFFE8 Timer/Port */
815
/*#define TIMERPORT_ISR(func)     ISR_VECTOR(func, ".int04")  */ /* 0xFFE8 Timer/Port */ /* CCE V2 Style */
816
#endif
817
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
818
#define USARTTX_VECTOR          ".int06"                    /* 0xFFEC USART Transmit */
819
#else
820
#define USARTTX_VECTOR          (6 * 1u)                     /* 0xFFEC USART Transmit */
821
/*#define USARTTX_ISR(func)       ISR_VECTOR(func, ".int06")  */ /* 0xFFEC USART Transmit */ /* CCE V2 Style */
822
#endif
823
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
824
#define USARTRX_VECTOR          ".int07"                    /* 0xFFEE USART Receive */
825
#else
826
#define USARTRX_VECTOR          (7 * 1u)                     /* 0xFFEE USART Receive */
827
/*#define USARTRX_ISR(func)       ISR_VECTOR(func, ".int07")  */ /* 0xFFEE USART Receive */ /* CCE V2 Style */
828
#endif
829
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
830
#define TIMERA1_VECTOR          ".int08"                    /* 0xFFF0 Timer A CC1-4, TA */
831
#else
832
#define TIMERA1_VECTOR          (8 * 1u)                     /* 0xFFF0 Timer A CC1-4, TA */
833
/*#define TIMERA1_ISR(func)       ISR_VECTOR(func, ".int08")  */ /* 0xFFF0 Timer A CC1-4, TA */ /* CCE V2 Style */
834
#endif
835
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
836
#define TIMERA0_VECTOR          ".int09"                    /* 0xFFF2 Timer A CC0 */
837
#else
838
#define TIMERA0_VECTOR          (9 * 1u)                     /* 0xFFF2 Timer A CC0 */
839
/*#define TIMERA0_ISR(func)       ISR_VECTOR(func, ".int09")  */ /* 0xFFF2 Timer A CC0 */ /* CCE V2 Style */
840
#endif
841
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
842
#define WDT_VECTOR              ".int10"                    /* 0xFFF4 Watchdog Timer */
843
#else
844
#define WDT_VECTOR              (10 * 1u)                    /* 0xFFF4 Watchdog Timer */
845
/*#define WDT_ISR(func)           ISR_VECTOR(func, ".int10")  */ /* 0xFFF4 Watchdog Timer */ /* CCE V2 Style */
846
#endif
847
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
848
#define IO1_VECTOR              ".int12"                    /* 0xFFF8 Dedicated IO (P0.1) */
849
#else
850
#define IO1_VECTOR              (12 * 1u)                    /* 0xFFF8 Dedicated IO (P0.1) */
851
/*#define IO1_ISR(func)           ISR_VECTOR(func, ".int12")  */ /* 0xFFF8 Dedicated IO (P0.1) */ /* CCE V2 Style */
852
#endif
853
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
854
#define IO0_VECTOR              ".int13"                    /* 0xFFFA Dedicated IO (P0.0) */
855
#else
856
#define IO0_VECTOR              (13 * 1u)                    /* 0xFFFA Dedicated IO (P0.0) */
857
/*#define IO0_ISR(func)           ISR_VECTOR(func, ".int13")  */ /* 0xFFFA Dedicated IO (P0.0) */ /* CCE V2 Style */
858
#endif
859
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
860
#define NMI_VECTOR              ".int14"                    /* 0xFFFC Non-maskable */
861
#else
862
#define NMI_VECTOR              (14 * 1u)                    /* 0xFFFC Non-maskable */
863
/*#define NMI_ISR(func)           ISR_VECTOR(func, ".int14")  */ /* 0xFFFC Non-maskable */ /* CCE V2 Style */
864
#endif
865
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
866
#define RESET_VECTOR            ".reset"                    /* 0xFFFE Reset [Highest Priority] */
867
#else
868
#define RESET_VECTOR            (15 * 1u)                    /* 0xFFFE Reset [Highest Priority] */
869
/*#define RESET_ISR(func)         ISR_VECTOR(func, ".int15")  */ /* 0xFFFE Reset [Highest Priority] */ /* CCE V2 Style */
870
#endif
871
 
872
 
873
/************************************************************
874
* End of Modules
875
************************************************************/
876
 
877
#ifdef __cplusplus
878
}
879
#endif /* extern "C" */
880
 
881
#endif /* #ifndef __msp430x33x */
882