api / mbed / trunk / PortInOut

PortInOut

class PortInOut

A multiple pin digital in/out used to set/read multiple bi-directional pins

PortInOutA multiple pin digital in/out used to set/read multiple bi-directional pins
Functions
PortInOutCreate an PortInOut, connected to the specified port
writeWrite the value to the output port
readRead the value currently output on the port
outputSet as an output
inputSet as an input
modeSet the input pin mode
operator=A shorthand for write
operator int()A shorthand for read

Functions

PortInOut

PortInOut(PortName port,  
int mask =  0xFFFFFFFF)

Create an PortInOut, connected to the specified port

Variables

portPort to connect to (Port0-Port5)
maskA bitmask to identify which bits in the port should be included (0 - ignore)

write

void write(int value)

Write the value to the output port

Variables

valueAn integer specifying a bit to write for every corresponding port pin

read

int read()

Read the value currently output on the port

Variables

returnsAn integer with each bit corresponding to associated port pin setting

output

void output()

Set as an output

input

void input()

Set as an input

mode

void mode(PinMode mode)

Set the input pin mode

Variables

modePullUp, PullDown, PullNone, OpenDrain

operator=

PortInOut& operator= (int value)

A shorthand for write

operator int()

operator int()

A shorthand for read

class PortInOut
A multiple pin digital in/out used to set/read multiple bi-directional pins
PortInOut(PortName port,  
int mask =  0xFFFFFFFF)
Create an PortInOut, connected to the specified port
void write(int value)
Write the value to the output port
int read()
Read the value currently output on the port
void output()
Set as an output
void input()
Set as an input
void mode(PinMode mode)
Set the input pin mode
PortInOut& operator= (int value)
A shorthand for write
operator int()
A shorthand for read