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