Interface: moteiv.tos.platform.msp430.timer.MSP430Capture

interface MSP430Capture

Commands
command void clearOverflow() Clear the capture overflow flag for when multiple captures occur
command uint16_t getEvent() Reads the value of the last capture event in TxCCRx
command bool isOverflowPending() Determine if a capture overflow is pending.
command void setEdge(uint8_t cm) Set the edge that the capture should occur
command void setSynchronous(bool synchronous) Set whether the capture should occur synchronously or asynchronously.

Events
event void captured(uint16_t time) Signalled when an event is captured.

Commands - Details

clearOverflow

command void clearOverflow()

Clear the capture overflow flag for when multiple captures occur

getEvent

command uint16_t getEvent()

Reads the value of the last capture event in TxCCRx

isOverflowPending

command bool isOverflowPending()

Determine if a capture overflow is pending.

Returns:
TRUE if the capture register has overflowed

setEdge

command void setEdge(uint8_t cm)

Set the edge that the capture should occur

Parameters:
cm - Capture Mode for edge capture. enums exist for: MSP430TIMER_CM_NONE is no capture. MSP430TIMER_CM_RISING is rising edge capture. MSP430TIMER_CM_FALLING is a falling edge capture. MSP430TIMER_CM_BOTH captures on both rising and falling edges.

setSynchronous

command void setSynchronous(bool synchronous)

Set whether the capture should occur synchronously or asynchronously. TinyOS default is synchronous captures. WARNING: if the capture signal is asynchronous to the timer clock, it could case a race condition (see Timer documentation in MSP430F1xx user guide)

Parameters:
synchronous - TRUE to synchronize the timer capture with the next timer clock instead of occurring asynchronously.

Events - Details

captured

event void captured(uint16_t time)

Signalled when an event is captured.

Parameters:
time - The time of the capture event