FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
gpio Namespace Reference

Defines all API to manipulate general-purpose digital input/output pins. More...

Classes

class  FastMaskedPort
 API that manipulates a part of a digital IO port. More...
 
class  FastPin
 API that manipulates one digital IO pin of a given port. More...
 
class  FastPinType
 API that manipulates a given digital IO pin of a the target MCU. More...
 
class  FastPort
 API that manipulates a whole digital IO port. More...
 

Typedefs

template<board::DigitalPin DPIN_>
using FAST_PIN = typename FastPinType< DPIN_ >::TYPE
 Useful alias type to the FastPin type matching a given board::DigitalPin. More...
 
template<board::InterruptPin IPIN_>
using FAST_INT_PIN = typename FastPinType< board::PCI_PIN< IPIN_ >()>::TYPE
 Useful alias type to the FastPin type matching a given board::InterruptPin. More...
 
template<board::ExternalInterruptPin EPIN_>
using FAST_EXT_PIN = typename FastPinType< board::EXT_PIN< EPIN_ >()>::TYPE
 Useful alias type to the FastPin type matching a given board::ExternalInterruptPin. More...
 

Enumerations

enum class  PinMode : uint8_t {
  INPUT ,
  INPUT_PULLUP ,
  OUTPUT
}
 Defines the configurable mode of a digital IO pin. More...
 

Detailed Description

Defines all API to manipulate general-purpose digital input/output pins.

Typedef Documentation

◆ FAST_PIN

template<board::DigitalPin DPIN_>
using gpio::FAST_PIN = typedef typename FastPinType<DPIN_>::TYPE

Useful alias type to the FastPin type matching a given board::DigitalPin.

The following snippet demonstrates usage of FAST_PIN to declare a FastPin instance for later use in a function:

void f()
{
led.clear();
...
led.set();
}
typename FastPinType< DPIN_ >::TYPE FAST_PIN
Useful alias type to the FastPin type matching a given board::DigitalPin.
Definition: gpio.h:694
@ OUTPUT
Digital pin is configured as output.
See also
FastPin
FastPinType
FAST_INT_PIN
FAST_EXT_PIN

Definition at line 694 of file gpio.h.

◆ FAST_INT_PIN

template<board::InterruptPin IPIN_>
using gpio::FAST_INT_PIN = typedef typename FastPinType<board::PCI_PIN<IPIN_>()>::TYPE

Useful alias type to the FastPin type matching a given board::InterruptPin.

The following snippet demonstrates usage of FAST_INT_PIN to declare a FastPin instance for later use in a function:

void f()
{
bool val = input.value();
...
}
typename FastPinType< board::PCI_PIN< IPIN_ >()>::TYPE FAST_INT_PIN
Useful alias type to the FastPin type matching a given board::InterruptPin.
Definition: gpio.h:717
@ INPUT
Digital pin is configured as high-impedance (open drain) input.
See also
FastPin
FastPinType
FAST_PIN
FAST_EXT_PIN

Definition at line 717 of file gpio.h.

◆ FAST_EXT_PIN

template<board::ExternalInterruptPin EPIN_>
using gpio::FAST_EXT_PIN = typedef typename FastPinType<board::EXT_PIN<EPIN_>()>::TYPE

Useful alias type to the FastPin type matching a given board::ExternalInterruptPin.

The following snippet demonstrates usage of FAST_EXT_PIN to declare a FastPin instance for later use in a function:

void f()
{
bool val = input.value();
...
}
typename FastPinType< board::EXT_PIN< EPIN_ >()>::TYPE FAST_EXT_PIN
Useful alias type to the FastPin type matching a given board::ExternalInterruptPin.
Definition: gpio.h:740
See also
FastPin
FastPinType
FAST_PIN
FAST_INT_PIN

Definition at line 740 of file gpio.h.

Enumeration Type Documentation

◆ PinMode

enum class gpio::PinMode : uint8_t
strong

Defines the configurable mode of a digital IO pin.

Enumerator
INPUT 

Digital pin is configured as high-impedance (open drain) input.

INPUT_PULLUP 

Digital pin is configured as input with an internal pullup resistor.

OUTPUT 

Digital pin is configured as output.

Definition at line 59 of file gpio.h.