Skip to content

ButtonWiring

Namespace: CtrlDS4

enum ButtonWiring : uint8_t

How a button is wired to its pin, for Controller::bind().

Values

ActiveLow

ActiveLow = 0

Button between the pin and GND, the most common wiring. Uses the internal pull-up resistor of the pin, so it needs no other component: the pin reads LOW while the button is pressed.

ActiveHigh

ActiveHigh = 1

Button between the pin and 3.3V. Uses the internal pull-down resistor of the pin: the pin reads HIGH while the button is pressed.