]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/sensorboards/mts300/MicStreamC.nc
Change to follow TEP 109.
[tinyos-2.x.git] / tos / sensorboards / mts300 / MicStreamC.nc
diff --git a/tos/sensorboards/mts300/MicStreamC.nc b/tos/sensorboards/mts300/MicStreamC.nc
new file mode 100644 (file)
index 0000000..1f440c6
--- /dev/null
@@ -0,0 +1,47 @@
+/**\r
+ *  Copyright (c) 2005-2006 Crossbow Technology, Inc.\r
+ *  All rights reserved.\r
+ *\r
+ *  Permission to use, copy, modify, and distribute this software and its\r
+ *  documentation for any purpose, without fee, and without written\r
+ *  agreement is hereby granted, provided that the above copyright\r
+ *  notice, the (updated) modification history and the author appear in\r
+ *  all copies of this source code.\r
+ *\r
+ *  Permission is also granted to distribute this software under the\r
+ *  standard BSD license as contained in the TinyOS distribution.\r
+ *\r
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'\r
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+ *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ *  ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS\r
+ *  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
+ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOSS OF USE, DATA,\r
+ *  OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
+ *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
+ *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\r
+ *  THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+ /*\r
+ *  @author Hu Siquan <husq@xbow.com>\r
+ *\r
+ *  $Id$\r
+ */\r
+\r
+#include "mts300.h"\r
+\r
+generic configuration MicStreamC() {\r
+  provides interface ReadStream<uint16_t>;\r
+  provides interface MicSetting;\r
+}\r
+implementation {\r
+  enum {\r
+    ID = unique(UQ_MIC_RESOURCE)\r
+  };\r
+  components MicReadStreamP, MicDeviceP, new AdcReadStreamClientC();\r
+\r
+  ReadStream = MicReadStreamP.ReadStream[ID];\r
+  MicReadStreamP.ActualRead[ID] -> AdcReadStreamClientC;\r
+  AdcReadStreamClientC.Atm128AdcConfig -> MicDeviceP.Atm128AdcConfig;\r
+  MicSetting = MicReadStreamP;\r
+}\r