modm API documentation
modm::platform::GpioSet< Gpios > Class Template Reference
Inheritance diagram for modm::platform::GpioSet< Gpios >:
modm::platform::Gpio

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
}
 The Port a Gpio Pin is connected to.
 

Static Public Member Functions

static void setOutput ()
 
static void setOutput (bool status)
 
static void setOutput (OutputType type, OutputSpeed speed=OutputSpeed::MHz50)
 
static void configure (OutputType type, OutputSpeed speed=OutputSpeed::MHz50)
 
static void setInput ()
 
static void setInput (InputType type)
 
static void setAnalogInput ()
 
static void configure (InputType type)
 
static void set ()
 
static void set (bool status)
 
static void reset ()
 
static void toggle ()
 
static void lock ()
 
static void disconnect ()
 

Static Public Attributes

static constexpr uint8_t width = sizeof...(Gpios)
 
static constexpr uint8_t number_of_ports = numberOfPorts()
 

Static Protected Member Functions

static constexpr uint16_t inverted (uint8_t id)
 
static constexpr uint16_t mask (uint8_t id)
 
static constexpr uint32_t mask2 (uint8_t id, uint8_t value=0b11)
 
static constexpr uint8_t numberOfPorts ()
 

Static Protected Attributes

static constexpr uint16_t inverteds [7]
 
static constexpr uint16_t masks [7]
 

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 Data Documentation

template<class... Gpios>
constexpr uint16_t modm::platform::GpioSet< Gpios >::inverteds[7]
staticprotectedconstexpr
Initial value:
{
(((Gpios::port == Port::A and Gpios::isInverted) ? Gpios::mask : 0) | ...),
(((Gpios::port == Port::B and Gpios::isInverted) ? Gpios::mask : 0) | ...),
(((Gpios::port == Port::C and Gpios::isInverted) ? Gpios::mask : 0) | ...),
(((Gpios::port == Port::D and Gpios::isInverted) ? Gpios::mask : 0) | ...),
(((Gpios::port == Port::E and Gpios::isInverted) ? Gpios::mask : 0) | ...),
(((Gpios::port == Port::F and Gpios::isInverted) ? Gpios::mask : 0) | ...),
(((Gpios::port == Port::G and Gpios::isInverted) ? Gpios::mask : 0) | ...),
}
template<class... Gpios>
constexpr uint16_t modm::platform::GpioSet< Gpios >::masks[7]
staticprotectedconstexpr
Initial value:
{
(((Gpios::port == Port::A) ? Gpios::mask : 0) | ...),
(((Gpios::port == Port::B) ? Gpios::mask : 0) | ...),
(((Gpios::port == Port::C) ? Gpios::mask : 0) | ...),
(((Gpios::port == Port::D) ? Gpios::mask : 0) | ...),
(((Gpios::port == Port::E) ? Gpios::mask : 0) | ...),
(((Gpios::port == Port::F) ? Gpios::mask : 0) | ...),
(((Gpios::port == Port::G) ? Gpios::mask : 0) | ...),
}

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