modm API documentation
modm::platform::GpioInverted< Pin > Class Template Reference

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

Inheritance diagram for modm::platform::GpioInverted< Pin >:

Public Typedefs

using Output = GpioInverted< typename Pin::Output >
 
using Input = GpioInverted< typename Pin::Input >
 
using IO = GpioInverted< typename Pin::IO >
 
using Type = typename Pin::Type
 
using Data = typename Pin::Data
 

Static Public Member Functions

static void setOutput (bool value)
 
static void set ()
 
static void set (bool value)
 
static void reset ()
 
static bool read ()
 
static bool isSet ()
 

Static Public Attributes

static constexpr bool isInverted = not Pin::isInverted
 

Detailed Description

template<class Pin>
class modm::platform::GpioInverted< Pin >

Invert a pin in software.

This template can be used the invert the logic level of a normal pin template.

Example:

using Led = GpioInverted<GpioOutputB0>;
Led::setOutput();
Led::reset(); // -> maps to GpioOutputB0::set()
Author
Fabian Greif

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