示例#1
0
 /// <summary>
 /// Get digital pin state.
 /// </summary>
 /// <param name="pin">Digital pin</param>
 /// <returns>Returns <c>true</c> if low, <c>false</c> if high.</returns>
 public bool GetValue(Pin.Digital pin)
 {
     return UshortUtils.GetBit(_digital, (byte)pin);
 }
示例#2
0
 public bool IsEnabled(Pin.Analog input)
 {
     var bitNumber = (byte) ((byte)input + Pin.DigitalCount);
     return UshortUtils.GetBit(ChannelIndicator, bitNumber);
 }
示例#3
0
 /// <summary>
 /// Get A/D reading.
 /// </summary>
 /// <param name="pin">Analog pin</param>
 /// <returns>Reading in mV</returns>
 public double GetValue(Pin.Analog pin)
 {
     return _analog[(byte)pin];
 }
示例#4
0
 public bool IsEnabled(Pin.Digital input)
 {
     return UshortUtils.GetBit(ChannelIndicator, (byte)input);
 }