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

Method pressButton

src/Joystick.cpp:501–510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499 }
500}
501void Joystick_::pressButton(uint8_t button)
502{
503 if (button >= _buttonCount) return;
504
505 int index = button / 8;
506 int bit = button % 8;
507
508 bitSet(_buttonValues[index], bit);
509 if (_autoSendState) sendState();
510}
511void Joystick_::releaseButton(uint8_t button)
512{
513 if (button >= _buttonCount) return;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected