]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/usci/HplMsp430UsciRegP.nc
msp430 usci: add setIfgTx(), setIfgRx()
[tinyos-2.x.git] / tos / chips / msp430 / usci / HplMsp430UsciRegP.nc
index 5cd2e6c290cd4471228749249384f26c12fe0b28..fcd3c10e0b388e6fc72f3acacff8724055df0ca2 100644 (file)
@@ -10,7 +10,7 @@
  * - Redistributions in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * - Neither the name of the Technische Universität Berlin nor the names
+ * - Neither the name of the Titanium Mirror, Inc. nor the names
  *   of its contributors may be used to endorse or promote products derived
  *   from this software without specific prior written permission.
  *
@@ -236,8 +236,38 @@ implementation
   RENDER_A(Abctl);
   RENDER_A(Irtctl);
   RENDER_A(Irrctl);
-  RENDER_B(I2Coa);
-  RENDER_B(I2Csa);
+
+  /* RENDER_B(I2Coa); */
+  async command volatile uint8_t* Registers.ptrI2Coa()
+  {
+    return &UCBxI2Coa;
+  }
+
+  async command uint16_t Registers.readI2Coa()
+  {
+    return UCBxI2Coa;
+  }
+
+  async command void Registers.assignI2Coa(uint16_t addr)
+  {
+    UCBxI2Coa = addr;
+  }
+
+  /* RENDER_B(I2Csa); */
+  async command volatile uint8_t* Registers.ptrI2Csa()
+  {
+    return &UCBxI2Csa;
+  }
+
+  async command uint16_t Registers.readI2Csa()
+  {
+    return UCBxI2Csa;
+  }
+
+  async command void Registers.assignI2Csa(uint16_t addr)
+  {
+    UCBxI2Csa = addr;
+  }
 
   /* RENDER(Ie); */
   async command bool Registers.getIeRx()
@@ -276,6 +306,11 @@ implementation
     return READ_FLAG(UCxxIfg, UCxxRXIFG);
   }
 
+  async command void Registers.setIfgRx()
+  {
+    SET_FLAG(UCxxIfg, UCxxRXIFG);
+  }
+
   async command void Registers.clrIfgRx()
   {
     CLR_FLAG(UCxxIfg, UCxxRXIFG);
@@ -285,4 +320,14 @@ implementation
   {
     return READ_FLAG(UCxxIfg, UCxxTXIFG);
   }
+
+  async command void Registers.setIfgTx()
+  {
+    SET_FLAG(UCxxIfg, UCxxTXIFG);
+  }
+
+  async command void Registers.clrIfgTx()
+  {
+    CLR_FLAG(UCxxIfg, UCxxTXIFG);
+  }
 }