--- /dev/null
+interface HplMMA7261QTControl
+{
+ async command void on();
+ async command void off();
+ async command void gSelect(uint8_t val);
+}
\ No newline at end of file
--- /dev/null
+configuration HplMMA7261QTControlC
+{
+ provides interface HplMMA7261QTControl;
+}
+implementation
+{
+ components HplMMA7261QTControlP, HplMMA7261QTC;
+
+ HplMMA7261QTControlP.Sleep -> HplMMA7261QTC.Sleep;
+ HplMMA7261QTControlP.GSelect1 -> HplMMA7261QTC.GSelect1;
+ HplMMA7261QTControlP.GSelect2 -> HplMMA7261QTC.GSelect2;
+
+ HplMMA7261QTControl = HplMMA7261QTControlP;
+}
\ No newline at end of file
--- /dev/null
+module HplMMA7261QTControlP
+{
+ provides interface HplMMA7261QTControl;
+
+ uses interface GeneralIO as Sleep;
+ uses interface GeneralIO as GSelect1;
+ uses interface GeneralIO as GSelect2;
+}
+implementation
+{
+ async command void HplMMA7261QTControl.on()
+ {
+ call Sleep.set();
+ }
+
+ async command void HplMMA7261QTControl.off()
+ {
+ call GSelect1.clr();
+ call GSelect2.clr();
+ call Sleep.clr();
+ }
+
+ async command void HplMMA7261QTControl.gSelect(uint8_t val)
+ {
+ // TODO(henrik) implement.
+ }
+}
\ No newline at end of file
--- /dev/null
+configuration HplMMA7261QTReaderC
+{
+ provides interface Read<uint16_t> as AccelX;
+ provides interface Read<uint16_t> as AccelY;
+ provides interface Read<uint16_t> as AccelZ;
+}
+implementation
+{
+ components HplMMA7261QTC;
+
+ AccelX = HplMMA7261QTC.AccelX;
+ AccelY = HplMMA7261QTC.AccelY;
+ AccelZ = HplMMA7261QTC.AccelZ;
+}
\ No newline at end of file