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

Classes

struct  As
 

Public Typedefs

using InputType = ::modm::platform::InputType
 
using Type = Gpio< PinConfig >
 
using IO = Type
 
using Input = Type
 
using Output = Type
 
using Data = PinConfig
 
using Rx = As< PeripheralPin::Rx >
 
using Tx = As< PeripheralPin::Tx >
 
using Rts = As< PeripheralPin::Rts >
 
using Cts = As< PeripheralPin::Cts >
 
using ExtInt = As< PeripheralPin::ExtInt >
 
using Dm = As< PeripheralPin::Dm >
 
using Dp = As< PeripheralPin::Dp >
 
using Wo = As< PeripheralPin::Wo >
 
using Sck = As< PeripheralPin::Sck >
 
using Miso = As< PeripheralPin::Miso >
 
using Mosi = As< PeripheralPin::Mosi >
 
using Npcs = As< PeripheralPin::Npcs >
 
using Spck = As< PeripheralPin::Spck >
 
using Ad = As< PeripheralPin::Ad >
 
using Adtrg = As< PeripheralPin::Adtrg >
 
using Wkup = As< PeripheralPin::Wkup >
 
using Tioa = As< PeripheralPin::Tioa >
 
using Tiob = As< PeripheralPin::Tiob >
 
using Tclk = As< PeripheralPin::Tclk >
 
using Twd = As< PeripheralPin::Twd >
 
using Twck = As< PeripheralPin::Twck >
 
using Pck = As< PeripheralPin::Pck >
 
using I2sck = As< PeripheralPin::I2sck >
 
using I2sws = As< PeripheralPin::I2sws >
 
using I2sdi = As< PeripheralPin::I2sdi >
 
using I2sdo = As< PeripheralPin::I2sdo >
 
using I2smck = As< PeripheralPin::I2smck >
 
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 PwmFi0 = As< PeripheralPin::PwmFi0 >
 
using PwmFi1 = As< PeripheralPin::PwmFi1 >
 
using PwmFi2 = As< PeripheralPin::PwmFi2 >
 
using PwmExtrg0 = As< PeripheralPin::PwmExtrg0 >
 
using PwmExtrg1 = As< PeripheralPin::PwmExtrg1 >
 
using Ch0 = As< PeripheralPin::Ch0 >
 
using Ch1 = As< PeripheralPin::Ch1 >
 
using Datrg = As< PeripheralPin::Datrg >
 

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 bool read ()
 
static bool isSet ()
 
static void write (bool status)
 
static void configure (InputType type)
 
static void disconnect ()
 
static void reset ()
 
static void set ()
 
static void set (bool status)
 
static void setAnalogInput ()
 
static void setInput ()
 
static void setInput (InputType type)
 
static void setOutput ()
 
static void setOutput (bool status)
 
static void toggle ()
 
static Direction getDirection ()
 returns the pin direction at run-time
 
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 setInput ()
 configure pin as input
 
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 auto pin = PinConfig::pin
 
static constexpr auto port = PinConfig::port
 
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.
 

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