DigitalInputPin

back to FEHIO

Description

Library: FEHIO.h

The DigitalInputPin object allows you to configure any of the 32 Flex I/O pins as a digital input. Use this object to interface with 3.3V input peripherals or other passive peripherals like bump switches. Once you’ve declared an object of type DigitalInputPin, simply use the “dot” operator to access the object’s member function. As described in the Hardware section, all DigitalInputPin objects are configured to have an internal pull-up resistor.

Member Functions

bool Value()

Declaration

DigitalInputPin <variable name>(FEHIO::FEHIOPin);

Example

#include <FEHIO.h>

int main(void)
{
    //declares a digital input pin on P0_3
    DigitalInputPin bump_switch(FEHIO::P0_3);
}