Horizon
|
A Pin represents a logical pin of a Unit. More...
#include <unit.hpp>
Public Types | |
enum | Direction { INPUT, OUTPUT, BIDIRECTIONAL, OPEN_COLLECTOR, POWER_INPUT, POWER_OUTPUT, PASSIVE, NOT_CONNECTED } |
Public Member Functions | |
Pin (const UUID &uu, const json &j) | |
Pin (const UUID &uu, const YAML::Node &n) | |
Pin (const UUID &uu) | |
json | serialize () const |
void | serialize_yaml (YAML::Emitter &em) const |
UUID | get_uuid () const |
Public Attributes | |
const UUID | uuid |
std::string | primary_name |
The Pin's primary name. More... | |
Direction | direction = Direction::INPUT |
unsigned int | swap_group = 0 |
Pins of the same swap_group can be pinswapped. More... | |
std::vector< std::string > | names |
The Pin's alternate names. More... | |
Static Public Attributes | |
static const LutEnumStr< Pin::Direction > | direction_lut |
static const std::vector< std::pair< Pin::Direction, std::string > > | direction_names |
|
static |
|
static |
std::vector<std::string> horizon::Pin::names |
The Pin's alternate names.
i.e. UART_RX or I2C_SDA on an MCU.
std::string horizon::Pin::primary_name |
The Pin's primary name.
i.e. PB0 on an MCU.
unsigned int horizon::Pin::swap_group = 0 |
Pins of the same swap_group can be pinswapped.
The swap group 0 is for unswappable pins.