]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/intelmote2/PlatformSerialC.nc
resource allocation is initialization
[tinyos-2.x.git] / tos / platforms / intelmote2 / PlatformSerialC.nc
index bd66b26790a77f32ecadbce6ec83e1b92b970174..e0e9a1c3c4a30e423792087a008ba71e9a4adeab 100644 (file)
@@ -35,9 +35,9 @@
  */
 
 configuration PlatformSerialC {
-  provides interface Init;
   provides interface StdControl;
-  provides interface SerialByteComm;
+  provides interface UartByte;
+  provides interface UartStream;
 }
 implementation {
 
@@ -45,15 +45,27 @@ implementation {
   components HplPXA27xSTUARTC;
   components HplPXA27xGPIOC;
   components IM2InitSerialP;
-
-  Init = HalPXA27xSerialP;
-  Init = IM2InitSerialP;
-  StdControl = HalPXA27xSerialP;
-  SerialByteComm = HalPXA27xSerialP;
   
+  StdControl = HalPXA27xSerialP;
+  UartByte = HalPXA27xSerialP;
+  UartStream = HalPXA27xSerialP;
+
   HalPXA27xSerialP.UARTInit -> HplPXA27xSTUARTC.Init;
   HalPXA27xSerialP.UART -> HplPXA27xSTUARTC.STUART;
 
   IM2InitSerialP.TXD -> HplPXA27xGPIOC.HplPXA27xGPIOPin[STUART_TXD];
   IM2InitSerialP.RXD -> HplPXA27xGPIOC.HplPXA27xGPIOPin[STUART_RXD];
+
+  components PlatformP;
+  IM2InitSerialP.Init <- PlatformP.InitL2;
+  HalPXA27xSerialP.Init <- PlatformP.InitL3;
+
+  components new HplPXA27xDMAInfoC(19, (uint32_t) &STRBR) as DMAInfoRx;
+  components new HplPXA27xDMAInfoC(20, (uint32_t) &STTHR) as DMAInfoTx;
+  components HplPXA27xDMAC;
+  // how are these channels picked?
+  HalPXA27xSerialP.TxDMA -> HplPXA27xDMAC.HplPXA27xDMAChnl[2];
+  HalPXA27xSerialP.RxDMA -> HplPXA27xDMAC.HplPXA27xDMAChnl[3];
+  DMAInfoRx.HplPXA27xDMAInfo <- HalPXA27xSerialP.UARTRxDMAInfo;
+  DMAInfoTx.HplPXA27xDMAInfo <- HalPXA27xSerialP.UARTTxDMAInfo;
 }