//获取行线索引 //get row pin index private int ToIndex(GpioPin pin) { int result = -1; for (int i = 0; i < _pins.Length; i++) { if (pin.Equals(_pins[i])) { result = i; break; } } if (0 > result) { throw new Exception("Unknow Pin Index"); } else { return(result); } }