X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fmsp430%2Fusci%2FMsp430UartP.nc;h=a35dd92eb8d4b05a2296b1612ecde05f79d30b44;hb=dfbae4ae464c8990d122cc07951edcdbc1983ac4;hp=cdc08089793142d70ef6892dfe40ece057697dce;hpb=2fc550ecfc8fb03f258b5a692c8e7e90793aced2;p=tinyos-2.x.git diff --git a/tos/chips/msp430/usci/Msp430UartP.nc b/tos/chips/msp430/usci/Msp430UartP.nc index cdc08089..a35dd92e 100644 --- a/tos/chips/msp430/usci/Msp430UartP.nc +++ b/tos/chips/msp430/usci/Msp430UartP.nc @@ -104,6 +104,10 @@ implementation { 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(); @@ -124,6 +128,10 @@ implementation { 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();