TelosB platform target.
[goodfet] / firmware / include / platform.h
1 /*! \file platform.h
2   \author Travis Goodspeed
3   \brief Port and baud rate definitions.
4   
5   The functions specified here are defined in the platform
6   definition file, such as msp430x1612.c or msp430x2618.c.
7 */
8
9 #include "gfports.h"
10
11 #ifdef telosb
12 //TelosB uses second serial port.
13 #define serial_tx serial1_tx
14 #define serial_rx serial1_rx
15 #define setbaud setbaud1
16 #define msp430_init_uart msp430_init_uart1
17 #else
18 //Other targets use first.
19 #define serial_tx serial0_tx
20 #define serial_rx serial0_rx
21 #define setbaud setbaud0
22 #define msp430_init_uart msp430_init_uart0
23 #endif
24
25 unsigned char serial0_rx();
26 void serial0_tx(unsigned char);
27
28 unsigned char serial1_rx();
29 void serial1_tx(unsigned char);
30
31 void setbaud0(unsigned char);
32 void setbaud1(unsigned char);
33
34 //! Initialize the UART
35 void msp430_init_uart0();
36 //! Initialize the UART
37 void msp430_init_uart1();
38
39 //! Initialize the DCO Clock
40 void msp430_init_dco();
41 //! Called by monitor() when the DCO is correct and communication established.
42 void msp430_init_dco_done();
43
44 //LED on P1.0
45 #define PLEDOUT P1OUT
46 #define PLEDDIR P1DIR
47 #define PLEDPIN BIT0
48