36795faf1c9177d5e0644d6928f7103dd3e4c0ae
[goodfet] / firmware / lib / atmega168.c
1 //! MSP430F1612/1611 clock and I/O definitions
2
3 #include "platform.h"
4
5 //! Receive a byte.
6 unsigned char serial0_rx(){
7   return 0;
8 }
9
10 //! Receive a byte.
11 unsigned char serial1_rx(){
12   return 0;
13 }
14
15 //! Transmit a byte.
16 void serial0_tx(unsigned char x){
17 }
18
19 //! Transmit a byte on the second UART.
20 void serial1_tx(unsigned char x){
21 }
22
23 //! Set the baud rate.
24 void setbaud0(unsigned char rate){
25   
26   //http://mspgcc.sourceforge.net/baudrate.html
27   switch(rate){
28   case 1://9600 baud
29     
30     break;
31   case 2://19200 baud
32     
33     break;
34   case 3://38400 baud
35     
36     break;
37   case 4://57600 baud
38     
39     break;
40   default:
41   case 5://115200 baud
42     
43     break;
44   }
45 }
46
47 //! Set the baud rate of the second uart.
48 void setbaud1(unsigned char rate){
49   //http://mspgcc.sourceforge.net/baudrate.html
50   switch(rate){
51   case 1://9600 baud
52     
53     break;
54   case 2://19200 baud
55     
56     break;
57   case 3://38400 baud
58     
59     break;
60   case 4://57600 baud
61     
62     break;
63   default:
64   case 5://115200 baud
65     
66     break;
67   }
68 }
69
70
71 void msp430_init_uart0(){
72 }
73
74
75 void msp430_init_uart1(){
76 }
77
78
79
80 //! Initialization is correct.
81 void msp430_init_dco_done(){
82   //Nothing to do for the 1612.
83 }
84
85
86 void msp430_init_dco() {
87
88 }
89