| 29 | } |
| 30 | |
| 31 | uint8_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 | |
| 46 | void Keyboard_Class::begin() |
| 47 | { |
nothing calls this directly
no outgoing calls
no test coverage detected