Chris Taylor / SignalCapture
Embed: (wiki syntax)

« Back to documentation index

InterruptPinCapture Class Reference

InterruptPinCapture Class Reference

Captures the digital wave form of an interrupt capable pin into a timing buffer. More...

#include <InterruptPinCapture.h>

Public Member Functions

 InterruptPinCapture (PinName pin, PinMode mode)
 Create an instance of InterruptPinCapture connected to the specified pin.
void setReadTimeout (uint32_t us)
 Maximum time to wait for waveform data to arrive or completely fill the timing buffer.
int read (bool triggerState, uint32_t *pReadings, int count)
 Waits for the pin to transition to the trigger state and proceeds to capture the pins transition timing into the timing buffer.
int read (bool *pInitialState, uint32_t *pReadings, int count)
 Immediately start capturing the pin transition timing into the timing buffer.

Detailed Description

Captures the digital wave form of an interrupt capable pin into a timing buffer.

Definition at line 8 of file InterruptPinCapture.h.


Constructor & Destructor Documentation

InterruptPinCapture ( PinName  pin,
PinMode  mode 
)

Create an instance of InterruptPinCapture connected to the specified pin.

Definition at line 7 of file InterruptPinCapture.cpp.


Member Function Documentation

int read ( bool  triggerState,
uint32_t *  pReadings,
int  count 
)

Waits for the pin to transition to the trigger state and proceeds to capture the pins transition timing into the timing buffer.

Parameters:
triggerStateState that the pin must transistion to before the readings are captured
pReadingsPointer to the timing buffer that will contain the readings in microseconds
countThe maximum number of readings that can be held in the buffer
Returns:
The number of timings captured in the buffer.

Definition at line 21 of file InterruptPinCapture.cpp.

int read ( bool *  pInitialState,
uint32_t *  pReadings,
int  count 
)

Immediately start capturing the pin transition timing into the timing buffer.

Parameters:
pInitialStatePointer to a bool that will have the initial state of the pin at the time the capture started.
pReadingsPointer to the timing buffer that will contain the readings in microseconds
countThe maximum number of readings that can be held in the buffer
Returns:
The number of timings captured in the buffer.

Definition at line 26 of file InterruptPinCapture.cpp.

void setReadTimeout ( uint32_t  us )

Maximum time to wait for waveform data to arrive or completely fill the timing buffer.

Parameters:
usTimeout specified in microseconds

Definition at line 16 of file InterruptPinCapture.cpp.