]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
fixed mis-named HplGyroButton component
authorayer1 <ayer1>
Tue, 23 Mar 2010 13:28:57 +0000 (13:28 +0000)
committerayer1 <ayer1>
Tue, 23 Mar 2010 13:28:57 +0000 (13:28 +0000)
added power-up call to stdcontrol.start to service apps that duty
cycle the gyros to save power (won't hurt apps having already called
stdcontrol.init).

tos/platforms/shimmer2/chips/gyro/GyroBoardP.nc
tos/platforms/shimmer2/chips/gyro/HplGyroButtonC.nc

index 54cdeb70b84ea6c711de668ecbf047ef756b415b..516aa75bc732b04458a9dff1a88d7ba436ba7cda 100644 (file)
@@ -104,7 +104,14 @@ implementation {
   }
 
   command error_t StdControl.start(){
-    TOSH_CLR_SER0_CTS_PIN();     // enable analog signals
+    /*
+     * adding a redundant power-up for apps that power cycle the gyro mid-course to save current
+     * since we're past the initial on-dock programming, gyro should power back up gracefully
+     */
+    TOSH_CLR_PROG_OUT_PIN();     
+
+    // enable analog signal path
+    TOSH_CLR_SER0_CTS_PIN();     
 
     return SUCCESS;
   }
@@ -116,6 +123,7 @@ implementation {
 
     // kill the led
     call GyroBoard.ledOff();
+    call buttonNotify.disable();
 
     return SUCCESS;
   }
index 2b074dc3f1661ec69b024986f960b9856402b5d6..6797bb40029befbfce0c51158c34acce82df95bf 100644 (file)
@@ -39,7 +39,7 @@
  * @date March, 2010
  */
 
-configuration HplUserButtonC {
+configuration HplGyroButtonC {
   provides interface GeneralIO;
   provides interface GpioInterrupt;
 }