mbed-drivers
|
#include <DigitalIn.h>
Public Member Functions | |
DigitalIn (PinName pin) | |
DigitalIn (PinName pin, PinMode mode) | |
int | read () |
void | mode (PinMode pull) |
operator int () | |
Protected Attributes | |
gpio_t | gpio |
A digital input, used for reading the state of a pin
Example:
|
inline |
|
inline |
|
inline |
Set the input pin mode
mode | PullUp, PullDown, PullNone, OpenDrain |
|
inline |
An operator shorthand for read()
|
inline |
Read the input, represented as 0 or 1 (int)