public void WriteCommandToLcd(LcdCommand command) { this.lcdRegisterSelectGpio.Write(false); var ret = 0; using (var transferBuffer = this.spi0.CreateTransferBuffer(1, SpiTransferMode.ReadWrite)) { transferBuffer.Tx[0] = Convert.ToByte(command); transferBuffer.Delay = 0; transferBuffer.Speed = SpiSpeed; transferBuffer.BitsPerWord = BitsPerWord; transferBuffer.ChipSelectChange = false; ret = this.spi0.Transfer(transferBuffer); } if (ret < 0) { Console.WriteLine(string.Format("Error performing SPI Exchange: {0}", Console.Error.ToString())); Environment.Exit(1); } }
protected void SendCommand(LcdCommand command, byte[] data) { SendCommand((byte)command); SendData(data); }
protected void SendCommand(LcdCommand command) { SendCommand((byte)command); }
private void SendCommand(LcdCommand command, byte[] data) { SendCommand((byte)command); SendData(data); }
private void SendCommand(LcdCommand command) { SendCommand((byte)command); }