Clear P2SEL to disable XIN on MSP430F2274.
[goodfet] / firmware / include / gfports.h
1 /*! \file gfports.h
2   \author Travis Goodspeed
3   \brief GoodFET Port Definitions
4 */
5
6 #ifndef GFPORTS
7 #define GFPORTS
8
9 #ifdef MSP430
10 #include <io.h>
11 #endif
12
13 // N.B., only asm-clean CPP definitions allowed.
14
15
16 //Use P3 instead of P5 for target I/O on chips without P5.
17 #ifndef __MSP430_HAS_PORT5__
18 #ifndef __MSP430_HAS_PORT5_R__
19 //#warning "No P5, using P3 instead.  Will break 2618 and 1612 support."
20 #define P5OUT P3OUT
21 #define P5DIR P3DIR
22 #define P5REN P3REN
23 #define P5IN P3IN
24 #endif
25 #endif
26
27
28 //Use false P5REN for 1612.
29 #ifdef __MSP430_HAS_PORT5__
30 #ifndef __MSP430_HAS_PORT5_R__
31 //#warning "1xx, using fake P5REN for external pulling resistors."
32 #define P5REN P5OUT
33 #endif
34 #endif
35
36 /*
37 //Use these instead of the explicit names.
38 #ifdef MSP430
39 #define gfout P5OUT
40 #define gfin  P5IN
41 #define gfdir P5DIR
42 #define gfren P5REN
43 #endif
44 */
45
46
47 #endif //GFPORTS