d421bd727c0699a38fbd5b8ebc3bdecb6972240f
[goodfet] / firmware / platforms / goodfet.h
1 /*! \file goodfet.h
2   \author Travis Goodspeed
3   \brief Port descriptions for the GoodFET platform.
4 */
5
6 #include <signal.h>
7 #include <io.h>
8 #include <iomacros.h>
9
10
11 //LED on P1.0
12 #define PLEDOUT P1OUT
13 #define PLEDDIR P1DIR
14 #define PLEDPIN BIT0
15
16 //Use P3 instead of P5 for target I/O on chips without P5.
17 #ifdef msp430x2274
18 //#warning "No P5, using P3 instead.  Will break 2618 and 1612 support."
19 #define P5OUT P3OUT
20 #define P5DIR P3DIR
21 #define P5IN P3IN
22 #define P5REN P3REN
23
24 #define SPIOUT P3OUT
25 #define SPIDIR P3DIR
26 #define SPIIN  P3IN
27 #define SPIREN P3REN
28 #else
29
30 #define SPIOUT P5OUT
31 #define SPIDIR P5DIR
32 #define SPIIN  P5IN
33 #define SPIREN P5REN
34
35 #endif
36
37 //This is how things used to work, don't do it anymore.
38 //#ifdef msp430x1612
39 //#define P5REN somedamnedextern
40 //#endif
41
42 //No longer works for Hope badge.
43 #define SETSS P5OUT|=BIT0
44 #define CLRSS P5OUT&=~BIT0
45 #define DIRSS P5DIR|=BIT0;
46
47 //BIT5 is Chip Enable.  Need to document this
48 //#define RADIOACTIVE  P5OUT|=BIT5
49 //#define RADIOPASSIVE P5OUT&=~BIT5
50 #define SETCE P5OUT|=BIT5
51 #define CLRCE P5OUT&=~BIT5
52 #define DIRCE P5DIR|=BIT5
53