Bare Metal Programming Tool Kit
|
input pin interface More...
#include <pins.h>
Public Types | |
enum | { type = type_pin_in } |
identify this type as a type_pin_in | |
enum | { features = has_none } |
this type has no additional fatures | |
Static Public Member Functions | |
static void | init () |
initialize the pin as input | |
static bool | get () |
get the current level on the pin | |
input pin interface
This class defines the interface of an input pin.
This class is to be used as parent class for classes that provide the pin_in interface.
|
static |
get the current level on the pin
This method returns the current level on the input pin. When the level is a logic one (high voltage, Vdd) the returned value is true, otherwise (logic zero, low level, Vss) the value false is returned.
The init() method must be called first.
|
static |
initialize the pin as input
This method initializes the pin as input pin. This might involve configuring the pin as gpio, and disabling analog or other special functions.