updates.
[goodfet] / firmware / lib / msp430x2618.c
index 426106d..dcdafd5 100644 (file)
@@ -11,7 +11,7 @@
 #include <iomacros.h>
 
 //! Receive a byte.
-unsigned char serial_rx(){
+unsigned char serial0_rx(){
   char c;
   
   while(!(IFG2&UCA0RXIFG));//wait for a byte
@@ -29,7 +29,7 @@ unsigned char serial1_rx(){
 }
 
 //! Transmit a byte.
-void serial_tx(unsigned char x){
+void serial0_tx(unsigned char x){
   while ((IFG2 & UCA0TXIFG) == 0); //loop until buffer is free
   UCA0TXBUF = x;       /* send the character */
   while(!(IFG2 & UCA0TXIFG));
@@ -47,7 +47,7 @@ void serial1_tx(unsigned char x){
 }
 
 //! Set the baud rate.
-void setbaud(unsigned char rate){
+void setbaud0(unsigned char rate){
   
   //Table 15-4, page 481 of 2xx Family Guide
   switch(rate){
@@ -120,10 +120,17 @@ void msp430_init_dco_done(){
 void msp430_init_dco() {
   int i=1000;
   char *choice=(char *) 0x200; //First word of RAM.
+  
   #ifdef __MSP430_HAS_PORT8__
   P8SEL = 0; // disable XT2 on P8.7/8
   #endif
   
+  //Set P2.6 mode for MSP430F2274
+  #ifndef __MSP430_HAS_PORT5__
+  P2SEL = 0; //disable XIN on 2274
+  #endif
+  
+  
   if(CALBC1_16MHZ!=0xFF){
     //Info is intact, use it.
     BCSCTL1 = CALBC1_16MHZ;
@@ -146,6 +153,8 @@ void msp430_init_dco() {
   //Minor delay.
   while(i--);
   
+  
+  
   return;
 }