MCPcopy Create free account
hub / github.com/MHeironimus/ArduinoJoystickLibrary / setButton

Method setButton

src/Joystick.cpp:490–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

488}
489
490void Joystick_::setButton(uint8_t button, uint8_t value)
491{
492 if (value == 0)
493 {
494 releaseButton(button);
495 }
496 else
497 {
498 pressButton(button);
499 }
500}
501void Joystick_::pressButton(uint8_t button)
502{
503 if (button >= _buttonCount) return;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected