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