40 template <
typename GPIOtype>
41 inline void reserve(
const std::set<GPIOtype> &collection)
43 for (
auto item : collection)
57 for (ButtonMatrix::const_iterator row = matrix.cbegin();
62 selectors.insert(selectorPin);
63 for (std::map<InputGPIO, InputNumber>::const_iterator col = row->second.begin(); col != row->second.end(); col++)
84 template <
typename PinTags>
89 for (
auto chip : chips)
90 chip.reserve_and_book();
113 for (
auto chip : chain)
115 for (ShiftRegisterChip::const_iterator i = chip.begin(); i != chip.end(); i++)
128 template <
typename PinTags>
132 for (
auto i = chip.begin(); i != chip.end(); i++)
160 throw std::runtime_error(
"Useless rotary encoder: no input number for clockwise rotation");
162 throw std::runtime_error(
"Useless rotary encoder: no input number for counter-clockwise rotation");
164 throw std::runtime_error(
"Useless rotary encoder: same input numbers for clockwise and counter-clockwise");
199 if (xAxisPin == yAxisPin)
200 throw std::runtime_error(
201 "inputs::addJoystick() is using the same pin for both axes");
@ VALUE
Unspecified value.
std::set< InputGPIO > InputGPIOCollection
Collection of input GPIOs.
std::set< OutputGPIO > OutputGPIOCollection
Collection of output GPIOs.
ADC-capable GPIO pin number.
void reserve() const
Reserve this GPIO for exclusive use.
Output-capable GPIO pin number.