From: ayer1 Date: Tue, 23 Mar 2010 13:28:57 +0000 (+0000) Subject: fixed mis-named HplGyroButton component X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;ds=sidebyside;h=ea6a01cf52434a3e2f915759820504472c619468;p=tinyos-2.x.git fixed mis-named HplGyroButton component 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). --- diff --git a/tos/platforms/shimmer2/chips/gyro/GyroBoardP.nc b/tos/platforms/shimmer2/chips/gyro/GyroBoardP.nc index 54cdeb70..516aa75b 100644 --- a/tos/platforms/shimmer2/chips/gyro/GyroBoardP.nc +++ b/tos/platforms/shimmer2/chips/gyro/GyroBoardP.nc @@ -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; } diff --git a/tos/platforms/shimmer2/chips/gyro/HplGyroButtonC.nc b/tos/platforms/shimmer2/chips/gyro/HplGyroButtonC.nc index 2b074dc3..6797bb40 100644 --- a/tos/platforms/shimmer2/chips/gyro/HplGyroButtonC.nc +++ b/tos/platforms/shimmer2/chips/gyro/HplGyroButtonC.nc @@ -39,7 +39,7 @@ * @date March, 2010 */ -configuration HplUserButtonC { +configuration HplGyroButtonC { provides interface GeneralIO; provides interface GpioInterrupt; }