modm API documentation
modm::platform::Gpio< PinConfig >::As< peripheral_pin_v > Struct Template Reference
Inheritance diagram for modm::platform::Gpio< PinConfig >::As< peripheral_pin_v >:
modm::platform::Gpio< PinConfig > modm::platform::GpioSet< PinConfig > modm::GpioIO modm::platform::PinCfgMixin< PinConfigs... > modm::GpioOutput modm::GpioInput modm::Gpio modm::Gpio

Classes

struct  Connector
 
struct  GetSingleSignal
 
struct  GetSingleSignal< std::tuple< Signal > >
 
struct  ValidatePeripheral
 
struct  ValidateSignal
 

Public Typedefs

using Base = Gpio< PinConfig >
 
using Ad = As< PeripheralPin::Ad >
 
using Adtrg = As< PeripheralPin::Adtrg >
 
using Ch0 = As< PeripheralPin::Ch0 >
 
using Ch1 = As< PeripheralPin::Ch1 >
 
using Cts = As< PeripheralPin::Cts >
 
using Data = PinConfig
 
using Datrg = As< PeripheralPin::Datrg >
 
using Dm = As< PeripheralPin::Dm >
 
using Dp = As< PeripheralPin::Dp >
 
using ExtInt = As< PeripheralPin::ExtInt >
 
using I2sck = As< PeripheralPin::I2sck >
 
using I2sdi = As< PeripheralPin::I2sdi >
 
using I2sdo = As< PeripheralPin::I2sdo >
 
using I2smck = As< PeripheralPin::I2smck >
 
using I2sws = As< PeripheralPin::I2sws >
 
using IO = Type
 
using Input = Type
 
using InputType = ::modm::platform::InputType
 
using Miso = As< PeripheralPin::Miso >
 
using Mosi = As< PeripheralPin::Mosi >
 
using Npcs = As< PeripheralPin::Npcs >
 
using Output = Type
 
using Pck = As< PeripheralPin::Pck >
 
using PwmExtrg0 = As< PeripheralPin::PwmExtrg0 >
 
using PwmExtrg1 = As< PeripheralPin::PwmExtrg1 >
 
using PwmFi0 = As< PeripheralPin::PwmFi0 >
 
using PwmFi1 = As< PeripheralPin::PwmFi1 >
 
using PwmFi2 = As< PeripheralPin::PwmFi2 >
 
using PwmH0 = As< PeripheralPin::PwmH0 >
 
using PwmH1 = As< PeripheralPin::PwmH1 >
 
using PwmH2 = As< PeripheralPin::PwmH2 >
 
using PwmH3 = As< PeripheralPin::PwmH3 >
 
using PwmL0 = As< PeripheralPin::PwmL0 >
 
using PwmL1 = As< PeripheralPin::PwmL1 >
 
using PwmL2 = As< PeripheralPin::PwmL2 >
 
using PwmL3 = As< PeripheralPin::PwmL3 >
 
using Rts = As< PeripheralPin::Rts >
 
using Rx = As< PeripheralPin::Rx >
 
using Sck = As< PeripheralPin::Sck >
 
using Spck = As< PeripheralPin::Spck >
 
using Tclk = As< PeripheralPin::Tclk >
 
using Tioa = As< PeripheralPin::Tioa >
 
using Tiob = As< PeripheralPin::Tiob >
 
using Twck = As< PeripheralPin::Twck >
 
using Twd = As< PeripheralPin::Twd >
 
using Tx = As< PeripheralPin::Tx >
 
using Type = Gpio< PinConfig >
 
using Wkup = As< PeripheralPin::Wkup >
 
using Wo = As< PeripheralPin::Wo >
 

Public Types

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 configure (InputType type)
 
static void disconnect ()
 
static Direction getDirection ()
 returns the pin direction at run-time
 
static bool isSet ()
 
static bool isSet ()
 
static bool read ()
 
static void reset ()
 
static void reset ()
 set output to low level
 
static void set ()
 
static void set (bool status)
 
static void set ()
 set output to high level
 
static void set (bool value)
 set output to high or low level
 
static void setAnalogInput ()
 
static void setInput ()
 
static void setInput (InputType type)
 
static void setInput ()
 configure pin as input
 
static void setOutput ()
 
static void setOutput (bool status)
 
static void setOutput ()
 configure pin as output
 
static void setOutput (bool value)
 configure pin as output and set high or low
 
static void toggle ()
 
static void toggle ()
 toggle output level
 
static void write (bool status)
 

Static Public Attributes

static constexpr PeripheralPin peripheral_pin = peripheral_pin_v
 
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 constexpr bool isInverted = false
 
static constexpr auto pin = PinConfig::pin
 
static constexpr auto port = PinConfig::port
 

Protected Typedefs

using PinCfg = PinCfgMixin< PinConfigs... >
 

Static Protected Member Functions

static constexpr volatile uint32_t * getPortReg (size_t offset)
 
static consteval uint32_t invertedMask (PortName port)
 
static consteval uint32_t mask (PortName port)
 
static consteval uint32_t nonInvertedMask (PortName port)
 
static constexpr uint32_t readPortReg (size_t offset)
 
static void set (uint8_t)
 
static void set (uint8_t, uint8_t)
 
static constexpr void setPortReg (size_t offset)
 

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 struct was generated from the following file: