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