okapi::ADIButton class

Base classes

class ButtonBase

Constructors, destructors, conversion operators

ADIButton(std::uint8_t iport, bool iinverted = false)
A button in an ADI port.
ADIButton(std::pair<std::uint8_t, std::uint8_t> iports, bool iinverted = false)
A button in an ADI port.

Protected functions

auto currentlyPressed() -> bool override

Protected variables

std::uint8_t smartPort
std::uint8_t port

Function documentation

okapi::ADIButton::ADIButton(std::uint8_t iport, bool iinverted = false)

A button in an ADI port.

Parameters
iport The ADI port number ([1, 8], [a, h], [A, H]).
iinverted Whether the button is inverted (true meaning default pressed and false meaning default not pressed).
auto btn = ADIButton('A', false);
auto invertedBtn = ADIButton('A', true);

okapi::ADIButton::ADIButton(std::pair<std::uint8_t, std::uint8_t> iports, bool iinverted = false)

A button in an ADI port.

Parameters
iports The ports the button is plugged in to in the order {smart port, button port}. The smart port is the smart port number ([1, 21]). The button port is the ADI port number ([1, 8], [a, h], [A, H]).
iinverted Whether the button is inverted (true meaning default pressed and false meaning default not pressed).
auto btn = ADIButton({1, 'A'}, false);
auto invertedBtn = ADIButton({1, 'A'}, true);