59fe4cef983f3969c8103253c17643310d6771c6
[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 #include <io.h>
10
11 // N.B., only asm-clean CPP definitions allowed.
12
13 //Use P3 instead of P5 for target I/O on chips without P5.
14 #ifndef __MSP430_HAS_PORT5__
15 #ifndef __MSP430_HAS_PORT5_R__
16 #warning "No P5, using P3 instead.  Will break 2618 and 1612 support."
17 #define P5OUT P3OUT
18 #define P5DIR P3DIR
19 #define P5REN P3REN
20 #define P5IN P3IN
21
22 #endif
23 #endif
24
25 //Use false P5REN for 1612.
26 #ifdef __MSP430_HAS_PORT5__
27 #ifndef __MSP430_HAS_PORT5_R__
28 #warning "1xx, using fake P5REN for external pulling resistors."
29 #define P5REN P5OUT
30 #endif
31 #endif
32
33
34 #endif //GFPORTS