/// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= /// <summary> /// Gets the Gpio Settings as a human readable string /// </summary> /// <history> /// 01 Dec 16 Cynic - Started /// </history> public string GpioSettingsAsString() { StringBuilder sb = new StringBuilder(); sb.Append(Gpio.ToString()); sb.Append(", MuxMode=" + GpioMode.ToString()); return(sb.ToString()); }
/// <summary> /// This double byte command is used to set the states of GPIO0 and GPIO1 pins /// </summary> /// <param name="pin0Mode">The GpioMode of Pin0. (defaults to Output/Low)</param> /// <param name="pin1Mode">The GpioMode of Pin1. (defaults to Output/Low)</param> public void SetGpio(GpioMode pin0Mode = GpioMode.OutputLow, GpioMode pin1Mode = GpioMode.OutputLow) { SendCommand(Ssd1351Command.SetGPIO, (byte)(((int)pin1Mode << 2) + pin0Mode)); }
public void SetMode(int gpioNum, GpioMode mode) { m_pi.ExecuteCommand(CommandCode.PI_CMD_MODES, gpioNum, (int)mode); }