Mistake on this page?
Report an issue in GitHub or email us
Public Member Functions
mbed::PortInOut Class Reference

#include <PortInOut.h>

Public Member Functions

 PortInOut (PortName port, int mask=0xFFFFFFFF)
 
void write (int value)
 
int read ()
 
void output ()
 
void input ()
 
void mode (PinMode mode)
 
PortInOutoperator= (int value)
 
PortInOutoperator= (PortInOut &rhs)
 
 operator int ()
 

Detailed Description

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

Note
Synchronization level: Interrupt safe

Constructor & Destructor Documentation

mbed::PortInOut::PortInOut ( PortName  port,
int  mask = 0xFFFFFFFF 
)
inline

Create an PortInOut, connected to the specified port

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

Member Function Documentation

void mbed::PortInOut::input ( )
inline

Set as an input

void mbed::PortInOut::mode ( PinMode  mode)
inline

Set the input pin mode

Parameters
modePullUp, PullDown, PullNone, OpenDrain
mbed::PortInOut::operator int ( )
inline

A shorthand for read()

See also
PortInOut::read()
PortInOut& mbed::PortInOut::operator= ( int  value)
inline

A shorthand for write()

See also
PortInOut::write()
PortInOut& mbed::PortInOut::operator= ( PortInOut rhs)
inline

A shorthand for write()

See also
PortInOut::write()
void mbed::PortInOut::output ( )
inline

Set as an output

int mbed::PortInOut::read ( void  )
inline

Read the value currently output on the port

Returns
An integer with each bit corresponding to associated port pin setting
void mbed::PortInOut::write ( int  value)
inline

Write the value to the output port

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

The documentation for this class was generated from the following file:
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.