]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/mulle/DemoSensorNowC.nc
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / tos / platforms / mulle / DemoSensorNowC.nc
diff --git a/tos/platforms/mulle/DemoSensorNowC.nc b/tos/platforms/mulle/DemoSensorNowC.nc
new file mode 100644 (file)
index 0000000..22b60e3
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * Demo sensor for the mica2 platform.
+ *
+ * @author Henrik Makitaavola <henrik.makitaavola@gmail.com>
+ */
+
+generic configuration DemoSensorNowC()
+{
+  provides interface Resource;
+  provides interface ReadNow<uint16_t>;
+}
+implementation {
+  components new AdcReadNowClientC(),
+             DemoSensorP,
+             HplM16c62pGeneralIOC as IOs,
+             RealMainP;
+
+  DemoSensorP.Pin -> IOs.PortP100;
+  DemoSensorP.AVcc -> IOs.PortP76;
+
+  ReadNow = AdcReadNowClientC;
+  Resource = AdcReadNowClientC;
+
+  AdcReadNowClientC.M16c62pAdcConfig -> DemoSensorP;
+
+  RealMainP.PlatformInit -> DemoSensorP;
+}