/// <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); }
public bool IsEnabled(Pin.Analog input) { var bitNumber = (byte) ((byte)input + Pin.DigitalCount); return UshortUtils.GetBit(ChannelIndicator, bitNumber); }
/// <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]; }
public bool IsEnabled(Pin.Digital input) { return UshortUtils.GetBit(ChannelIndicator, (byte)input); }