]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Align the interface definition for the capture configuration with the implementation...
authorvlahan <vlahan>
Mon, 23 Jun 2008 19:54:50 +0000 (19:54 +0000)
committervlahan <vlahan>
Mon, 23 Jun 2008 19:54:50 +0000 (19:54 +0000)
tos/chips/msp430/timer/Msp430TimerCapComP.nc
tos/chips/msp430/timer/Msp430TimerControl.nc

index efcd3b54a3ead3f835aaf2f61c6b5588d16581cc..5ae8695a62432b2df807dea0758da70a16c6299f 100644 (file)
@@ -61,7 +61,7 @@ implementation
   uint16_t captureControl(uint8_t l_cm)
   {
     cc_t x = {
-      cm : l_cm & 0x03,    // capture on rising edge
+      cm : l_cm & 0x03,  // capture on none, rising, falling or both edges
       ccis : 0,  // capture/compare input select
       clld : 0,  // TBCL1 loads on write to TBCCR1
       cap : 1,   // compare mode
index 6d8c6d6d3f6476b7ebe63aa13e9416495dfeaf64..fdc64c576f4463cd25429e89c4921c809168ddb7 100644 (file)
@@ -32,9 +32,16 @@ interface Msp430TimerControl
   async command bool isInterruptPending();
   async command void clearPendingInterrupt();
 
-  async command void setControl(msp430_compare_control_t control );
+  async command void setControl(msp430_compare_control_t control);
   async command void setControlAsCompare();
-  async command void setControlAsCapture(bool low_to_high);
+  
+  /** 
+  * Sets the timer in capture mode.
+  * @param cm configures the capture to occur on none, rising, falling or rising_and_falling edges
+  * Msp430Timer.h has convenience definitions:
+  * MSP430TIMER_CM_NONE, MSP430TIMER_CM_RISING, MSP430TIMER_CM_FALLING, MSP430TIMER_CM_BOTH
+  */ 
+  async command void setControlAsCapture(uint8_t cm);
 
   async command void enableEvents();
   async command void disableEvents();