Code required to drive the microcontroller of the NMF Atlantis
Dependencies:
mbed
WakeUp
DHT
« Back to documentation index
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
Create a PulseInOut object connected to the specified pin.
Parameters:
Definition at line 25 of file Pulse.cpp .
Member Function Documentation
Return the length of the next HIGH pulse in microsconds.
Definition at line 45 of file Pulse.cpp .
int read_high_us
(
int
timeout )
Return the length of the next HIGH pulse in microseconds or -1 if longer than timeout.
Parameters:
timeout Time before pulse reading aborts and returns -1, in microseconds
Definition at line 59 of file Pulse.cpp .
Return the length of the next LOW pulse in microsconds.
Definition at line 78 of file Pulse.cpp .
int read_low_us
(
int
timeout )
Return the length of the next LOW pulse in microseconds or -1 if longer than timeout.
Parameters:
timeout Time before pulse reading aborts and returns -1, in microseconds
Definition at line 92 of file Pulse.cpp .
Return the length of the next pulse in microsconds.
Definition at line 111 of file Pulse.cpp .
int read_us
(
int
timeout )
Return the length of the next pulse in microseconds or -1 if longer than timeout.
Parameters:
timeout Time before pulse reading aborts and returns -1, in microseconds
Definition at line 124 of file Pulse.cpp .
Set the value of the pin.
Parameters:
val Value to set, 0 for LOW, otherwise HIGH
Definition at line 33 of file Pulse.cpp .
void write_us
(
int
val ,
int
time
)
Send a pulse of a given value for a specified time.
Parameters:
val Value to set, 0 for LOW, otherwise HIGH
time Length of pulse in microseconds
Definition at line 38 of file Pulse.cpp .