FastArduino  v1.7
C++ library to build fast but small Arduino/AVR projects
gpio.h File Reference

General Purpose (digital) Input Output API. More...

#include "boards/board_traits.h"
#include "int.h"
#include "pci.h"
#include "utilities.h"
Include dependency graph for gpio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gpio::FastPin< PORT_, BIT_ >
 API that manipulates one digital IO pin of a given port. More...
 
class  gpio::FastPort< PORT_ >
 API that manipulates a whole digital IO port. More...
 
class  gpio::FastMaskedPort< PORT_, MASK_ >
 API that manipulates a part of a digital IO port. More...
 
class  gpio::FastPinType< DPIN_ >
 API that manipulates a given digital IO pin of a the target MCU. More...
 

Namespaces

 board
 Defines all types and constants specific to support Arduino MEGA board (ATmega644 MCU target).
 
 gpio
 Defines all API to manipulate general-purpose digital input/output pins.
 

Typedefs

template<board::DigitalPin DPIN_>
using gpio::FAST_PIN = typename FastPinType< DPIN_ >::TYPE
 Useful alias type to the FastPin type matching a given board::DigitalPin. More...
 
template<board::InterruptPin IPIN_>
using gpio::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 gpio::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  gpio::PinMode : uint8_t {
  gpio::PinMode::INPUT,
  gpio::PinMode::INPUT_PULLUP,
  gpio::PinMode::OUTPUT
}
 Defines the configurable mode of a digital IO pin. More...
 

Functions

template<DigitalPin PIN>
constexpr uint8_t board::BIT ()
 Determine the bit position, inside its IO port, of the given DigitalPin.
 
template<DigitalPin PIN>
constexpr uint8_t board::MASK ()
 Determine the bit mask representing the given DigitalPin inside its port.
 

Detailed Description

General Purpose (digital) Input Output API.

Definition in file gpio.h.