| 222 | } |
| 223 | |
| 224 | int8_t RotaryEncoderInput::getEncoderIndexByPin(uint8_t pin) { |
| 225 | for (uint8_t i = 0; i < MAX_ENCODERS; i++) { |
| 226 | if (encoderMap[i].enabled && ((encoderMap[i].pinA != -1) && (encoderMap[i].pinB != -1))) { |
| 227 | if ((encoderMap[i].pinA == pin) || (encoderMap[i].pinB == pin)) return pin; |
| 228 | } |
| 229 | } |
| 230 | return -1; |
| 231 | } |
nothing calls this directly
no outgoing calls
no test coverage detected