MCPcopy Create free account
hub / github.com/BruceDevices/firmware / _get_input

Method _get_input

lib/utility/Keyboard.cpp:31–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31uint8_t Keyboard_Class::_get_input(const std::vector<int> &pinList)
32{
33 uint8_t buffer = 0x00;
34 uint8_t pin_value = 0x00;
35
36 for (int i = 0; i < 7; i++)
37 {
38 pin_value = (digitalRead(pinList[i]) == 1) ? 0x00 : 0x01;
39 pin_value = pin_value << i;
40 buffer = buffer | pin_value;
41 }
42
43 return buffer;
44}
45
46void Keyboard_Class::begin()
47{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected