Ejemplo n.º 1
0
 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);
         }
     }
 }
Ejemplo n.º 2
0
 /// <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 });
 }