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.
Dependents: SeeedUltrasoundRangeFinder RangeFinder senplussd Sprint3_Sonar ... more
PulseInOut Class Reference
Pulse Input/Output Class(es) More...
#include <Pulse.h>
Public Member Functions | |
| PulseInOut (PinName) | |
| Create a PulseInOut object connected to the specified pin. | |
| void | write (int val) |
| Set the value of the pin. | |
| void | write_us (int val, int time) |
| Send a pulse of a given value for a specified time. | |
| int | read_high_us () |
| Return the length of the next HIGH pulse in microsconds. | |
| int | read_high_us (int timeout) |
| Return the length of the next HIGH pulse in microseconds or -1 if longer than timeout. | |
| int | read_low_us () |
| Return the length of the next LOW pulse in microsconds. | |
| int | read_low_us (int timeout) |
| Return the length of the next LOW pulse in microseconds or -1 if longer than timeout. | |
| int | read_us () |
| Return the length of the next pulse in microsconds. | |
| int | read_us (int timeout) |
| Return the length of the next pulse in microseconds or -1 if longer than timeout. | |
Detailed Description
Pulse Input/Output Class(es)
Definition at line 30 of file Pulse.h.
Constructor & Destructor Documentation
| PulseInOut | ( | PinName | pin ) |
Create a PulseInOut object connected to the specified pin.
- Parameters:
-
pin i/o pin to connect to
Member Function Documentation
| int read_high_us | ( | ) |
| int read_high_us | ( | int | timeout ) |
| int read_low_us | ( | ) |
| int read_low_us | ( | int | timeout ) |
| int read_us | ( | ) |
| int read_us | ( | int | timeout ) |
| void write | ( | int | val ) |
Generated on Tue Jul 12 2022 19:05:50 by
1.7.2