Fixed 2274 support.
[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 "config.h"
10 #include "gfports.h"
11
12 #ifdef telosb
13 //TelosB uses second serial port.
14 #define serial_tx serial1_tx
15 #define serial_rx serial1_rx
16 #define setbaud setbaud1
17 #define msp430_init_uart msp430_init_uart1
18 #else
19 //Other targets use first.
20 #define serial_tx serial0_tx
21 #define serial_rx serial0_rx
22 #define setbaud setbaud0
23 #define msp430_init_uart msp430_init_uart0
24 #endif
25
26 unsigned char serial0_rx();
27 void serial0_tx(unsigned char);
28
29 unsigned char serial1_rx();
30 void serial1_tx(unsigned char);
31
32 void setbaud0(unsigned char);
33 void setbaud1(unsigned char);
34
35 //! Initialize the UART
36 void msp430_init_uart0();
37 //! Initialize the UART
38 void msp430_init_uart1();
39
40 //! Initialize the DCO Clock
41 void msp430_init_dco();
42 //! Called by monitor() when the DCO is correct and communication established.
43 void msp430_init_dco_done();
44