#include <iomacros.h>
//! Receive a byte.
-unsigned char serial_rx(){
+unsigned char serial0_rx(){
char c;
while(!(IFG2&UCA0RXIFG));//wait for a byte
}
//! 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));
}
//! 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){
#endif
+ #ifdef STATICDCO
+ BCSCTL1 = (STATICDCO>>8);
+ DCOCTL = (STATICDCO&0xFF);
+ #else
if(CALBC1_16MHZ!=0xFF){
//Info is intact, use it.
BCSCTL1 = CALBC1_16MHZ;
choice[0]++;
choice[0]%=dco_calibrations_count;
}
+ #endif
//Minor delay.
while(i--);