mbed library sources: Modified to operate FRDM-KL25Z at 48MHz from internal 32kHz oscillator (nothing else changed).
Fork of mbed-src by
DigitalInOut Class Reference
A digital input/output, used for setting or reading a bi-directional pin. More...
#include <DigitalInOut.h>
Public Member Functions | |
DigitalInOut (PinName pin) | |
Create a DigitalInOut connected to the specified pin. | |
void | write (int value) |
Set the output, specified as 0 or 1 (int) | |
int | read () |
Return the output setting, represented as 0 or 1 (int) | |
void | output () |
Set as an output. | |
void | input () |
Set as an input. | |
void | mode (PinMode pull) |
Set the input pin mode. | |
DigitalInOut & | operator= (int value) |
A shorthand for write() | |
operator int () | |
A shorthand for read() |
Detailed Description
A digital input/output, used for setting or reading a bi-directional pin.
Definition at line 27 of file DigitalInOut.h.
Constructor & Destructor Documentation
DigitalInOut | ( | PinName | pin ) |
Create a DigitalInOut connected to the specified pin.
- Parameters:
-
pin DigitalInOut pin to connect to
Definition at line 34 of file DigitalInOut.h.
Member Function Documentation
void input | ( | ) |
Set as an input.
Definition at line 65 of file DigitalInOut.h.
void mode | ( | PinMode | pull ) |
Set the input pin mode.
- Parameters:
-
mode PullUp, PullDown, PullNone, OpenDrain
Definition at line 73 of file DigitalInOut.h.
operator int | ( | ) |
A shorthand for read()
Definition at line 92 of file DigitalInOut.h.
DigitalInOut& operator= | ( | int | value ) |
A shorthand for write()
Definition at line 80 of file DigitalInOut.h.
void output | ( | ) |
Set as an output.
Definition at line 59 of file DigitalInOut.h.
int read | ( | ) |
Return the output setting, represented as 0 or 1 (int)
- Returns:
- an integer representing the output setting of the pin if it is an output, or read the input if set as an input
Definition at line 53 of file DigitalInOut.h.
void write | ( | int | value ) |
Set the output, specified as 0 or 1 (int)
- Parameters:
-
value An integer specifying the pin output value, 0 for logical 0, 1 (or any other non-zero value) for logical 1
Definition at line 43 of file DigitalInOut.h.
Generated on Wed Jul 13 2022 19:29:54 by 1.7.2