|
modm API documentation
|
#include <modm/architecture/interface/gpio.hpp>
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 |
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.
|
strong |
This enum can be used to reverse the bit order of the Data.
| Enum Values | Documentation |
|---|---|
| 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 |
|
staticconstexpr |
This holds the number of unique platform ports that this implementation accesses. It's always at least 1.
|
staticconstexpr |
This holds the width of the port as number of bits and can be used in drivers to assert the correct requirements