7#include <AH/STL/limits>
21 (std::numeric_limits<pin_int_t>::max() >> 1) + 1;
34 static_assert(std::is_unsigned<
decltype(pin)>::value,
35 "Error: pin_t should be an unsigned integer type");
#define BEGIN_AH_NAMESPACE
Print & operator<<(Print &os, Cable c)
pin_t pin(pin_int_t pin) const
Get the extended IO pin number of a given physical pin of this extended IO element.
A class for serial-in/parallel-out shift registers, like the 74HC595 that are connected to the SPI bu...
constexpr bool operator==(pin_t a, pin_t b)
constexpr pin_t operator*(pin_t a, pin_int_t b)
constexpr bool operator!=(pin_t a, pin_t b)
constexpr pin_t operator+(pin_t a, pin_int_t b)
constexpr bool operator>(pin_t a, pin_t b)
constexpr pin_int_t operator-(pin_t a, pin_t b)
constexpr bool operator>=(pin_t a, pin_t b)
constexpr pin_int_t NO_PIN_INT
uint_fast16_t pin_int_t
Integer type used internally to store the index of (extended) GPIO pins.
Type for storing pin numbers of Extended Input/Output elements.
constexpr pin_t()=default
Default constructor (NO_PIN).
pin_t & operator+=(pin_int_t b)
pin_int_t pin
The actual underlying pin number.
constexpr pin_t(pin_int_t pin)
Constructor from integer.
pin_t & operator-=(pin_int_t b)