Mbed OS Reference
|
A multiple pin digital in/out used to set/read multiple bi-directional pins. More...
#include <PortInOut.h>
Public Member Functions | |
PortInOut (PortName port, int mask=0xFFFFFFFF) | |
Create an PortInOut, connected to the specified port. More... | |
void | write (int value) |
Write the value to the output port. More... | |
int | read () |
Read the value currently output on the port. More... | |
void | output () |
Set as an output. More... | |
void | input () |
Set as an input. More... | |
void | mode (PinMode mode) |
Set the input pin mode. More... | |
PortInOut & | operator= (int value) |
A shorthand for write() More... | |
PortInOut & | operator= (PortInOut &rhs) |
A shorthand for write() More... | |
operator int () | |
A shorthand for read() More... | |
A multiple pin digital in/out used to set/read multiple bi-directional pins.
Definition at line 37 of file PortInOut.h.
PortInOut | ( | PortName | port, |
int | mask = 0xFFFFFFFF |
||
) |
Create an PortInOut, connected to the specified port.
port | Port to connect to (Port0-Port5) |
mask | A bitmask to identify which bits in the port should be included (0 - ignore) |
void write | ( | int | value | ) |
Write the value to the output port.
value | An integer specifying a bit to write for every corresponding port pin |
Definition at line 51 of file PortInOut.h.
int read | ( | ) |
Read the value currently output on the port.
Definition at line 61 of file PortInOut.h.
void output | ( | ) |
Set as an output.
void input | ( | ) |
Set as an input.
void mode | ( | PinMode | mode | ) |
Set the input pin mode.
mode | PullUp, PullDown, PullNone, OpenDrain |
PortInOut & operator= | ( | int | value | ) |
operator int | ( | ) |