modm API documentation
modm::GpioPort Class Reference

#include <modm/architecture/interface/gpio.hpp>

Inheritance diagram for modm::GpioPort:
modm::GpioExpanderPort< GpioExpander, expander, StartPin, Width, DataOrder > modm::platform::SoftwareGpioPort< Gpios >

Public Typedefs

using PortType = uint16_t
 may also be uint8_t, depending on port width
 

Public Types

enum  DataOrder : bool { DataOrder::Normal = false, DataOrder::Reversed = true }
 This enum can be used to reverse the bit order of the Data. More...
 

Static Public Member Functions

static constexpr DataOrder getDataOrder ()
 returns the chosen data order
 
static void setOutput ()
 
static void setInput ()
 
static PortType read ()
 The read data is always right-aligned regardless of physical mapping.
 
static void write (PortType data)
 The write data is always right-aligned regardless of physical mapping.
 
static void toggle ()
 Toggle the output states of all pins.
 

Static Public Attributes

static constexpr uint8_t width
 
static constexpr uint8_t number_of_ports
 

Detailed Description

Input/output interface of a set of up to 16 I/O pins.

This class provides the interface for up to 16 parallel IOs. Be aware that the interface is the same regardless of the actual mapping of the IOs. For example, when a high octet 0xf400 is physically configured, the data will still be written and read as a low octet 0x00f4.

Member Enumeration Documentation

enum modm::GpioPort::DataOrder : bool
strong

This enum can be used to reverse the bit order of the Data.

Enum ValuesDocumentation
Normal 

bit order of data is the same as bit order of port

Reversed 

bit order of data is the reverse bit order of port

Member Data Documentation

constexpr uint8_t modm::GpioPort::number_of_ports
staticconstexpr

This holds the number of unique platform ports that this implementation accesses. It's always at least 1.

constexpr uint8_t modm::GpioPort::width
staticconstexpr

This holds the width of the port as number of bits and can be used in drivers to assert the correct requirements


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