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  A0
 
struct  A1
 
struct  A10
 
struct  A11
 
struct  A12
 
struct  A13
 
struct  A14
 
struct  A15
 
struct  A16
 
struct  A17
 
struct  A18
 
struct  A19
 
struct  A2
 
struct  A20
 
struct  A21
 
struct  A22
 
struct  A23
 
struct  A24
 
struct  A25
 
struct  A3
 
struct  A4
 
struct  A5
 
struct  A6
 
struct  A7
 
struct  A8
 
struct  A9
 
struct  Ale
 
struct  Ba0
 
struct  Ba1
 
struct  BitBang
 
struct  Bk1io0
 
struct  Bk1io1
 
struct  Bk1io2
 
struct  Bk1io3
 
struct  Bk1ncs
 
struct  Bk2io0
 
struct  Bk2io1
 
struct  Bk2io2
 
struct  Bk2io3
 
struct  Bk2ncs
 
struct  Bkin
 
struct  Bkin2
 
struct  Cec
 
struct  Ch1
 
struct  Ch1n
 
struct  Ch2
 
struct  Ch2n
 
struct  Ch3
 
struct  Ch3n
 
struct  Ch4
 
struct  Ck
 
struct  Ckin
 
struct  Cle
 
struct  Clk
 
struct  Cmd
 
struct  Col
 
struct  Crs
 
struct  Cts
 
struct  D0
 
struct  D1
 
struct  D10
 
struct  D11
 
struct  D12
 
struct  D13
 
struct  D14
 
struct  D15
 
struct  D2
 
struct  D3
 
struct  D4
 
struct  D5
 
struct  D6
 
struct  D7
 
struct  D8
 
struct  D9
 
struct  Da0
 
struct  Da1
 
struct  Da10
 
struct  Da11
 
struct  Da12
 
struct  Da13
 
struct  Da14
 
struct  Da15
 
struct  Da2
 
struct  Da3
 
struct  Da4
 
struct  Da5
 
struct  Da6
 
struct  Da7
 
struct  Da8
 
struct  Da9
 
struct  De
 
struct  Dm
 
struct  Dp
 
struct  Etr
 
struct  Fsa
 
struct  Fsb
 
struct  Hsync
 
struct  Id
 
struct  In0
 
struct  In1
 
struct  In10
 
struct  In11
 
struct  In12
 
struct  In13
 
struct  In14
 
struct  In15
 
struct  In2
 
struct  In3
 
struct  In4
 
struct  In5
 
struct  In6
 
struct  In7
 
struct  In8
 
struct  In9
 
struct  Int
 
struct  Jtck
 
struct  Jtdi
 
struct  Jtdo
 
struct  Jtms
 
struct  Jtrst
 
struct  Mck
 
struct  Mclka
 
struct  Mclkb
 
struct  Mco1
 
struct  Mco2
 
struct  Mdc
 
struct  Mdio
 
struct  Miso
 
struct  Mosi
 
struct  Nbl0
 
struct  Nbl1
 
struct  Nce
 
struct  Ne1
 
struct  Ne2
 
struct  Ne3
 
struct  Ne4
 
struct  Nl
 
struct  Noe
 
struct  Nss
 
struct  Nwait
 
struct  Nwe
 
struct  Osc32in
 
struct  Osc32out
 
struct  Oscin
 
struct  Oscout
 
struct  Out
 
struct  Out1
 
struct  Out2
 
struct  Pixclk
 
struct  Ppsout
 
struct  Rcccrsdv
 
struct  Refclk
 
struct  Refin
 
struct  Rts
 
struct  Rx
 
struct  Rxclk
 
struct  Rxd0
 
struct  Rxd1
 
struct  Rxd2
 
struct  Rxd3
 
struct  Rxdv
 
struct  Rxer
 
struct  Sck
 
struct  Scka
 
struct  Sckb
 
struct  Scl
 
struct  Sd
 
struct  Sda
 
struct  Sdb
 
struct  Sdcke0
 
struct  Sdcke1
 
struct  Sdclk
 
struct  Sdncas
 
struct  Sdne0
 
struct  Sdne1
 
struct  Sdnras
 
struct  Sdnwe
 
struct  Smba
 
struct  Sof
 
struct  Swclk
 
struct  Swdio
 
struct  Swo
 
struct  Tamp1
 
struct  Tamp3
 
struct  Traceclk
 
struct  Traced0
 
struct  Traced1
 
struct  Traced2
 
struct  Traced3
 
struct  Ts
 
struct  Tx
 
struct  Txclk
 
struct  Txd0
 
struct  Txd1
 
struct  Txd2
 
struct  Txd3
 
struct  Txen
 
struct  Ulpick
 
struct  Ulpid0
 
struct  Ulpid1
 
struct  Ulpid2
 
struct  Ulpid3
 
struct  Ulpid4
 
struct  Ulpid5
 
struct  Ulpid6
 
struct  Ulpid7
 
struct  Ulpidir
 
struct  Ulpinxt
 
struct  Ulpistp
 
struct  Vbus
 
struct  Vsync
 
struct  Wkup1
 
struct  Wkup2
 
struct  Wkup3
 
struct  Wkup4
 
struct  Ws
 

Public Typedefs

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

Public Types

enum  InputType { InputType::Floating = 0x0, InputType::PullUp = 0x1, InputType::PullDown = 0x2 }
 
enum  OutputSpeed {
  Low = 0, Medium = 0x1, High = 0x2, OutputSpeed::VeryHigh = 0x3,
  MHz2 = Low, MHz25 = Medium, MHz50 = High, MHz100 = VeryHigh
}
 
enum  OutputType { OutputType::PushPull = 0x0, OutputType::OpenDrain = 0x1 }
 
enum  Port {
  A = 0, B = 1, C = 2, D = 3,
  E = 4, F = 5, G = 6, H = 7
}
 The Port a Gpio Pin is connected to.
 
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, OutputSpeed=OutputSpeed::MHz50)
 
static void configure (OutputType, OutputSpeed=OutputSpeed::MHz50)
 
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 lock ()
 
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 uint16_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.
 

Static Protected Member Functions

static void setAlternateFunction (uint8_t)
 
static void setAlternateFunction ()
 
static void setAnalogInput ()
 

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::InputType
inheritedstrong
Enum ValuesDocumentation
Floating 

floating on input

PullUp 

pull-up on input

PullDown 

pull-down on input

enum modm::platform::Gpio::OutputSpeed
inheritedstrong
Enum ValuesDocumentation
VeryHigh 

30 pF (80 MHz Output max speed on 15 pF)

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

push-pull on output

OpenDrain 

open-drain 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: