X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fmsp430%2Ftimer%2FMsp430TimerCapComP.nc;h=52355369c72ac061da5169356856f51e9594088c;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hp=04707adf3d207c471666781be0a7897ad222579e;hpb=1c913dbdea59be00cec861e37b5f44a02772d12a;p=tinyos-2.x.git diff --git a/tos/chips/msp430/timer/Msp430TimerCapComP.nc b/tos/chips/msp430/timer/Msp430TimerCapComP.nc index 04707adf..52355369 100644 --- a/tos/chips/msp430/timer/Msp430TimerCapComP.nc +++ b/tos/chips/msp430/timer/Msp430TimerCapComP.nc @@ -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; @@ -38,8 +38,8 @@ generic module Msp430TimerCapComP( } implementation { - #define TxCCTLx (*TCAST(volatile TYPE_TACCTL0* SINGLE NONNULL, TxCCTLx_addr)) - #define TxCCRx (*TCAST(volatile TYPE_TACCR0* SINGLE NONNULL, TxCCRx_addr)) + #define TxCCTLx (*TCAST(volatile TYPE_TACCTL0* ONE, TxCCTLx_addr)) + #define TxCCRx (*TCAST(volatile TYPE_TACCR0* ONE, TxCCRx_addr)) typedef msp430_compare_control_t cc_t; @@ -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);