* TODO: Implement blocking like in Msp430UartSpiP.nc.
* Implement error checking via UCAxSTAT.
*
- * @author R. Steve McKown <smckown@gmail.com>
+ * @author R. Steve McKown <rsmckown@gmail.com>
*/
generic module Msp430UartP() {
uint8_t m_pins;
uint8_t* m_sobuf; /* Original buffer ptr from UartStream.send() */
- uint8_t m_solen; /* Original buffer len from UartStream.send() */
+ uint16_t m_solen; /* Original buffer len from UartStream.send() */
uint8_t* m_sbuf; /* Position of next char to send */
- uint8_t m_slen; /* Len of chars in m_sbuf to send */
+ uint16_t m_slen; /* Len of chars in m_sbuf to send */
bool m_rxie; /* Set if rxie has been enabled to UartStream.receive() */
uint8_t* m_robuf; /* Original receive buffer */
- uint8_t m_rolen; /* Original (maximum) receive len */
+ uint16_t m_rolen; /* Original (maximum) receive len */
uint8_t* m_rbuf; /* Position of next byte in which to receive a char */
- uint8_t m_rlen; /* Remaining length in receive buffer */
+ uint16_t m_rlen; /* Remaining length in receive buffer */
sfrb(MYBRX, 219U);
{
atomic {
/* Disable the device */
- call Registers.setCtl1(UCSYNC);
+ call Registers.setCtl1(UCSWRST);
/* Clear interrupts and interrupt flags */
call Registers.clrIeRx();