]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/usci/Msp430UartP.nc
USCI using uint8_t for len instead of required uint16_t.
[tinyos-2.x.git] / tos / chips / msp430 / usci / Msp430UartP.nc
index 11bf8da9889e86fdc58000d275bbe54c4ebf91d5..06ea790323fa9ff95e81ee100feb7ad34c7fb45c 100644 (file)
@@ -33,7 +33,7 @@
  * 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() {
@@ -61,14 +61,14 @@ implementation {
 
   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);
 
@@ -117,7 +117,7 @@ implementation {
   {
     atomic {
       /* Disable the device */
-      call Registers.setCtl1(UCSYNC);
+      call Registers.setCtl1(UCSWRST);
 
       /* Clear interrupts and interrupt flags */
       call Registers.clrIeRx();