Mbed OS Reference
|
A multiple pin digital input. More...
#include <PortIn.h>
Public Member Functions | |
PortIn (PortName port, int mask=0xFFFFFFFF) | |
Create a PortIn, connected to the specified port. More... | |
int | read () |
Read the value input to the port. More... | |
void | mode (PinMode mode) |
Set the input pin mode. More... | |
operator int () | |
A shorthand for read() More... | |
A multiple pin digital input.
Example:
PortIn | ( | PortName | port, |
int | mask = 0xFFFFFFFF |
||
) |
Create a PortIn, connected to the specified port.
port | Port to connect to (as defined in target's PortNames.h) |
mask | Bitmask defines which port pins should be an input (0 - ignore, 1 - include) |
int read | ( | ) |
void mode | ( | PinMode | mode | ) |
Set the input pin mode.
mode | PullUp, PullDown, PullNone, OpenDrain |