MSP430X2 client connects but reads garbage from ram.
[goodfet] / firmware / include / platform.h
1 //! \file platform.h
2
3 #include <signal.h>
4 #include <io.h>
5 #include <iomacros.h>
6
7
8 //Use P3 instead of P5 for target I/O on chips without P5.
9 #ifndef __MSP430_HAS_PORT5__
10 #ifndef __MSP430_HAS_PORT5_R__
11 //#warning "No P5, using P3 instead.  Will break 2618 and 1612 support."
12 #define P5OUT P3OUT
13 #define P5DIR P3DIR
14 #define P5REN P3REN
15 #define P5IN P3IN
16
17 #endif
18 #endif
19
20 //Use false P5REN for 1612.
21 #ifdef __MSP430_HAS_PORT5__
22 #ifndef __MSP430_HAS_PORT5_R__
23 //#warning "1xx, using fake P5REN for external pulling resistors."
24 #define P5REN P5OUT
25 #endif
26 #endif
27
28 unsigned char serial_rx();
29 void serial_tx(unsigned char);
30
31 unsigned char serial1_rx();
32 void serial1_tx(unsigned char);
33
34 void setbaud(unsigned char);
35 void setbaud1(unsigned char);
36
37 //! Initialize the UART
38 void msp430_init_uart();
39 //! Initialize the DCO Clock
40 void msp430_init_dco();
41
42 //LED on P1.0
43 #define PLEDOUT P1OUT
44 #define PLEDDIR P1DIR
45 #define PLEDPIN 0x1
46