call TXD.selectModuleFunc();
}
+ /* Reset important state variables */
+ m_robuf = 0;
+ m_sobuf = 0;
+
/* Clear interrupts; we'll add them as needed */
call Registers.clrIeRx();
call Registers.clrIeTx();
/* Enable the device */
call Registers.clrCtl1(UCSWRST);
+
+ /* TOS convention is for receive interrupts on by default. */
+ call Registers.clrIfgRx();
+ call Registers.setIeRx();
}
}
call Registers.clrIeTx();
call Registers.clrIfgRx();
+ /* Reset important state variables */
+ m_robuf = 0;
+ m_sobuf = 0;
+
/* Restore pins to their pre-configure state */
if (m_pins & PINS_RXD)
call RXD.selectIOFunc();