+void msp430_init_uart1(){
+
+ /* RS232 */
+ P3DIR &= ~0x80; /* Select P37 for input (UART1RX) */
+ P3DIR |= 0x40; /* Select P36 for output (UART1TX) */
+ P3SEL |= 0xC0; /* Select P36,P37 for UART1{TX,RX} */
+
+ UCTL1 = SWRST | CHAR; /* 8-bit character, UART mode */
+ UTCTL1 = SSEL1; /* UCLK = MCLK */
+
+ setbaud1(0);
+
+ ME2 &= ~USPIE1; /* USART1 SPI module disable */
+ ME2 |= (UTXE1 | URXE1); /* Enable USART1 TXD/RXD */
+
+ UCTL1 &= ~SWRST;
+
+ /* XXX Clear pending interrupts before enable!!! */
+ U1TCTL |= URXSE;
+
+ //IE2 |= URXIE1; /* Enable USART1 RX interrupt */
+}
+
+
+/** For EZ430/FETUIF
+ void msp430_init_dco() {
+ WDTCTL = WDTPW + WDTHOLD; //stop WDT
+
+ BCSCTL1 = 0;
+
+ do {
+ int i;
+ IFG1 &= ~OFIFG;
+ for (i=0; i<1000; i++);
+
+ } while (IFG1 & OFIFG);
+
+ BCSCTL2 = SELM1 | DIVM1 | SELS;
+
+}
+ */
+
+
+//! Initialization is correct.
+void msp430_init_dco_done(){
+ //Nothing to do for the 1612.
+}
+
+