modm API documentation
modm::platform::GpioStatic< detail::DataUnused > Class Reference

#include <modm/platform/gpio/unused.hpp>

Inheritance diagram for modm::platform::GpioStatic< detail::DataUnused >:
modm::platform::Gpio modm::GpioIO modm::GpioOutput modm::GpioInput modm::Gpio modm::Gpio

Classes

struct  Ain0
 
struct  Ain1
 
struct  Aref
 
struct  BitBang
 
struct  Di
 
struct  Do
 
struct  In0
 
struct  In1
 
struct  In2
 
struct  Oc0a
 
struct  Oc0b
 
struct  Oc1a
 
struct  Oc1ainv
 
struct  Oc1b
 
struct  Oc1binv
 
struct  Scl
 
struct  Sda
 
struct  T0
 
struct  Usck
 

Public Typedefs

using Output = GpioUnused
 
using Input = GpioUnused
 
using IO = GpioUnused
 
using Type = GpioUnused
 
using Data = detail::DataUnused
 

Public Types

enum  InputTrigger : uint8_t { InputTrigger::LowLevel = 0b00, InputTrigger::BothEdges = 0b01, InputTrigger::FallingEdge = 0b10, InputTrigger::RisingEdge = 0b11 }
 Each External Interrupt can be configured to trigger on these conditions. More...
 
enum  InputType : uint8_t { InputType::Floating, InputType::PullUp }
 Each Input Pin can be configured in one of these states. More...
 
enum  OutputType : uint8_t { OutputType::PushPull }
 
enum  Port { B }
 Available ports on this device.
 
enum  Signal {
  BitBang, Ain0, Ain1, Aref,
  Di, Do, In0, In1,
  In2, Oc0a, Oc0b, Oc1a,
  Oc1ainv, Oc1b, Oc1binv, Scl,
  Sda, T0, Usck
}
 
enum  Direction { In = 0, Out = 1, InOut = 2, Special = 3 }
 Declares the direction of a GPIO.
 
enum  Direction { In = 0, Out = 1, InOut = 2, Special = 3 }
 Declares the direction of a GPIO.
 

Static Public Member Functions

static void setOutput ()
 
static void setOutput (bool)
 
static void setOutput (OutputType)
 
static void configure (OutputType)
 
static void set ()
 
static void set (bool)
 
static void reset ()
 
static bool isSet ()
 
static void toggle ()
 
static void setInput ()
 
static void setInput (InputType)
 
static void configure (InputType)
 
static bool read ()
 
static Direction getDirection ()
 
static void disconnect ()
 
static bool isSet ()
 
static void reset ()
 set output to low level
 
static void set ()
 set output to high level
 
static void set (bool value)
 set output to high or low level
 
static void setOutput ()
 configure pin as output
 
static void setOutput (bool value)
 configure pin as output and set high or low
 
static void toggle ()
 toggle output level
 

Static Public Attributes

static constexpr bool isInverted = false
 
static constexpr Port port = Port(-1)
 
static constexpr uint8_t pin = uint8_t(-1)
 
static constexpr uint8_t mask = 0
 
static constexpr bool High = true
 
static constexpr bool High = true
 
static constexpr bool Low = false
 
static constexpr bool Low = false
 
static constexpr Direction direction = Direction::InOut
 Declares the Pin direction.
 
static constexpr Direction direction = Direction::Out
 Declares the Pin direction.
 

Detailed Description

Dummy implementation of an I/O pin.

This class can be used when a pin is not required. All functions are dummy functions which do nothing. read() will always return false.

For example when creating a software SPI with the modm::SoftwareSimpleSpi class and the return channel (MISO - Master In Slave Out) is not needed, a good way is to use this class as a parameter when defining the SPI class.

Example:

#include <modm/architecture/platform.hpp>
namespace pin
{
typedef GpioOutputD7 Clk;
typedef GpioOutputD5 Mosi;
}
modm::SoftwareSpiMaster< pin::Clk, pin::Mosi, GpioUnused > Spi;
...
Spi::write(0xaa);
Author
Fabian Greif
Niklas Hauser

Member Enumeration Documentation

enum modm::platform::Gpio::InputTrigger : uint8_t
inheritedstrong

Each External Interrupt can be configured to trigger on these conditions.

Enum ValuesDocumentation
LowLevel 

triggers continuously during low level

BothEdges 

triggers on both rising and falling edge

FallingEdge 

triggers on falling edge

RisingEdge 

triggers on rising edge

enum modm::platform::Gpio::InputType : uint8_t
inheritedstrong

Each Input Pin can be configured in one of these states.

Enum ValuesDocumentation
Floating 

The input pin is left floating.

PullUp 

The input pin is pulled to Vcc.

enum modm::platform::Gpio::OutputType : uint8_t
inheritedstrong
Enum ValuesDocumentation
PushPull 

push-pull on output

Member Function Documentation

static bool modm::GpioOutput::isSet ( )
inheritedstatic

Returns the set logical output state of the pin. This may be different from the physical state!

Member Data Documentation

constexpr bool modm::Gpio::Low = false
inheritedstaticconstexpr

These constants refer to the logical state of the GPIO. The physical state is determined by the configuration and external connection.

constexpr bool modm::Gpio::Low = false
inheritedstaticconstexpr

These constants refer to the logical state of the GPIO. The physical state is determined by the configuration and external connection.


The documentation for this class was generated from the following file: