]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/timer/Msp430TimerCapComP.nc
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / tos / chips / msp430 / timer / Msp430TimerCapComP.nc
index efcd3b54a3ead3f835aaf2f61c6b5588d16581cc..52355369c72ac061da5169356856f51e9594088c 100644 (file)
@@ -28,7 +28,7 @@
 generic module Msp430TimerCapComP(
     uint16_t TxCCTLx_addr,
     uint16_t TxCCRx_addr
-  )
+  ) @safe()
 {
   provides interface Msp430TimerControl as Control;
   provides interface Msp430Compare as Compare;
@@ -61,11 +61,11 @@ 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
-      scs : 1,   // synchronous capture mode
+      scs : 0,   // non synchronous capture mode
       ccie : 0,  // capture compare interrupt enable
     };
     return CC2int(x);