Change to follow TEP 109 .
--- /dev/null
+configuration AccelReadP
+{
+ provides
+ {
+ interface Read<uint16_t> as ReadX[uint8_t client];
+ interface Read<uint16_t> as ReadY[uint8_t client];
+ }
+ uses
+ {
+ interface Read<uint16_t> as ActualX[uint8_t client];
+ interface Read<uint16_t> as ActualY[uint8_t client];
+ }
+}
+implementation
+{
+ components AccelConfigP,
+// new MultiplexedReadC(uint16_t) as MultiplexX,
+// new MultiplexedReadC(uint16_t) as MultiplexY,
+ new ArbitratedReadC(uint16_t) as MultiplexX,
+ new ArbitratedReadC(uint16_t) as MultiplexY;
+// new AdcReadClientC() as AdcX,
+// new AdcReadClientC() as AdcY;
+
+ ReadX = MultiplexX;
+ MultiplexX.Resource -> AccelConfigP;
+ MultiplexX.Service = ActualX;
+ //AdcX.Atm128AdcConfig -> AccelConfigP.ConfigX;
+
+ ReadY = MultiplexY;
+ MultiplexY.Resource -> AccelConfigP;
+ MultiplexY.Service = ActualY;
+ //AdcY.Atm128AdcConfig -> AccelConfigP.ConfigY;
+}
+
--- /dev/null
+configuration AccelReadStreamP
+{
+ provides {
+ interface ReadStream<uint16_t> as ReadStreamX[uint8_t client];
+ interface ReadStream<uint16_t> as ReadStreamY[uint8_t client];
+ }
+ uses {
+ interface ReadStream<uint16_t> as ActualX[uint8_t client];
+ interface ReadStream<uint16_t> as ActualY[uint8_t client];
+ }
+}
+implementation
+{
+ enum {
+ NACCEL_CLIENTS = uniqueCount(UQ_ACCEL_RESOURCE)
+ };
+ components AccelConfigP,
+ new ArbitratedReadStreamC(NACCEL_CLIENTS, uint16_t) as MultiplexX,
+ new ArbitratedReadStreamC(NACCEL_CLIENTS, uint16_t) as MultiplexY;
+
+ ReadStreamX = MultiplexX;
+ MultiplexX.Resource -> AccelConfigP;
+ MultiplexX.Service = ActualX;
+
+ ReadStreamY = MultiplexY;
+ MultiplexY.Resource -> AccelConfigP;
+ MultiplexY.Service = ActualY;
+}
+
--- /dev/null
+/* $Id$
+ * Copyright (c) 2006 Intel Corporation
+ * All rights reserved.
+ *
+ * This file is distributed under the terms in the attached INTEL-LICENSE
+ * file. If you do not find these files, copies can be found by writing to
+ * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
+ * 94704. Attention: Intel License Inquiry.
+ */
+/**
+ * Acceldiode of the basicsb sensor board.
+ *
+ * @author David Gay
+ */
+
+#include "mts300.h"
+
+generic configuration AccelXC()
+{
+ provides interface Read<uint16_t>;
+}
+implementation {
+ enum {
+ ID = unique(UQ_ACCEL_RESOURCE)
+ };
+
+ components AccelReadP,AccelConfigP, new AdcReadClientC() as AdcX;
+
+ Read = AccelReadP.ReadX[ID];
+ AccelReadP.ActualX[ID] -> AdcX;
+ AdcX.Atm128AdcConfig -> AccelConfigP.ConfigX;
+}
+
--- /dev/null
+/* $Id$
+ * Copyright (c) 2006 Intel Corporation
+ * All rights reserved.
+ *
+ * This file is distributed under the terms in the attached INTEL-LICENSE
+ * file. If you do not find these files, copies can be found by writing to
+ * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
+ * 94704. Attention: Intel License Inquiry.
+ */
+/**
+ * AccelXdiode of the basicsb sensor board.
+ *
+ * @author David Gay
+ */
+
+#include "mts300.h"
+
+generic configuration AccelXStreamC() {
+ provides interface ReadStream<uint16_t>;
+}
+implementation {
+ enum {
+ ID = unique(UQ_ACCEL_RESOURCE)
+ };
+ components AccelReadStreamP, AccelConfigP, new AdcReadStreamClientC();
+
+ ReadStream = AccelReadStreamP.ReadStreamX[ID];
+ AccelReadStreamP.ActualX[ID] -> AdcReadStreamClientC;
+ AdcReadStreamClientC.Atm128AdcConfig -> AccelConfigP.ConfigX;
+}
--- /dev/null
+/* $Id$
+ * Copyright (c) 2006 Intel Corporation
+ * All rights reserved.
+ *
+ * This file is distributed under the terms in the attached INTEL-LICENSE
+ * file. If you do not find these files, copies can be found by writing to
+ * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
+ * 94704. Attention: Intel License Inquiry.
+ */
+/**
+ * Acceldiode of the basicsb sensor board.
+ *
+ * @author David Gay
+ */
+
+#include "mts300.h"
+
+generic configuration AccelYC()
+{
+ provides interface Read<uint16_t>;
+}
+implementation {
+ enum {
+ ID = unique(UQ_ACCEL_RESOURCE)
+ };
+
+ components AccelReadP,AccelConfigP, new AdcReadClientC() as AdcY;
+
+ Read = AccelReadP.ReadY[ID];
+ AccelReadP.ActualY[ID] -> AdcY;
+ AdcY.Atm128AdcConfig -> AccelConfigP.ConfigY;
+}
\ No newline at end of file
--- /dev/null
+/* $Id$
+ * Copyright (c) 2006 Intel Corporation
+ * All rights reserved.
+ *
+ * This file is distributed under the terms in the attached INTEL-LICENSE
+ * file. If you do not find these files, copies can be found by writing to
+ * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA,
+ * 94704. Attention: Intel License Inquiry.
+ */
+/**
+ * AccelXdiode of the basicsb sensor board.
+ *
+ * @author David Gay
+ */
+
+#include "mts300.h"
+
+generic configuration AccelYStreamC() {
+ provides interface ReadStream<uint16_t>;
+}
+implementation {
+ enum {
+ ID = unique(UQ_ACCEL_RESOURCE)
+ };
+ components AccelReadStreamP, AccelConfigP, new AdcReadStreamClientC();
+
+ ReadStream = AccelReadStreamP.ReadStreamY[ID];
+ AccelReadStreamP.ActualY[ID] -> AdcReadStreamClientC;
+ AdcReadStreamClientC.Atm128AdcConfig -> AccelConfigP.ConfigY;
+}
--- /dev/null
+configuration ArbitratedPhotoDeviceP
+{
+ provides interface Read<uint16_t>[uint8_t client];
+}
+implementation
+{
+ components PhotoTempDeviceC,
+ new ArbitratedReadC(uint16_t) as ArbitrateRead;
+
+ Read = ArbitrateRead;
+ ArbitrateRead.Service -> PhotoTempDeviceC.ReadPhoto;
+ ArbitrateRead.Resource -> PhotoTempDeviceC.PhotoResource;
+}
--- /dev/null
+configuration ArbitratedTempDeviceP\r
+{\r
+ provides interface Read<uint16_t>[uint8_t client];\r
+}\r
+implementation\r
+{\r
+ components PhotoTempDeviceC,\r
+ new ArbitratedReadC(uint16_t) as ArbitrateRead;\r
+\r
+ Read = ArbitrateRead;\r
+ ArbitrateRead.Service -> PhotoTempDeviceC.ReadTemp;\r
+ ArbitrateRead.Resource -> PhotoTempDeviceC.TempResource;\r
+}\r