protected void Write(byte[] buffer) { lock (_bus) { if (_settings.SoftChipSelectEnabled) { _settings.ChipSelect.Write(_settings.ChipSelectActiveState); } _bus.Write(_settings, buffer); if (_settings.SoftChipSelectEnabled) { _settings.ChipSelect.Write(!_settings.ChipSelectActiveState); } } }
/// <summary> /// Send a command to the display. /// </summary> /// <param name="command">Command byte to send to the display.</param> private void SendCommand(byte command) { dataCommandPort.Write(Command); spi.Write(new byte[] { command }); }