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 35 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) |
Definition at line 43 of file PortInOut.h.
void input | ( | ) |
Set as an input.
Definition at line 80 of file PortInOut.h.
void mode | ( | PinMode | mode | ) |
Set the input pin mode.
mode | PullUp, PullDown, PullNone, OpenDrain |
Definition at line 91 of file PortInOut.h.
operator int | ( | ) |
PortInOut& operator= | ( | int | value | ) |
void output | ( | ) |
Set as an output.
Definition at line 71 of file PortInOut.h.
int read | ( | void | ) |
Read the value currently output on the port.
Definition at line 64 of file PortInOut.h.
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 54 of file PortInOut.h.