Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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:
-
triggerState State that the pin must transistion to before the readings are captured pReadings Pointer to the timing buffer that will contain the readings in microseconds count The 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:
-
pInitialState Pointer to a bool that will have the initial state of the pin at the time the capture started. pReadings Pointer to the timing buffer that will contain the readings in microseconds count The 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:
-
us Timeout specified in microseconds
Definition at line 16 of file InterruptPinCapture.cpp.
Generated on Fri Jul 15 2022 02:11:20 by
1.7.2