public static void Clear(this SerialPort port) { if (!port.IsOpen) { port.Open(); } var command = VfdCommand.ClearScreen(); port.Write(command.Command, 0, command.Lenght); port.Close(); }
public static void Write(this SerialPort port, VfdCommand command) { port.EnsureIsOpen(); port.Write(command.Command, 0, command.Lenght); port.Close(); }
/// <summary> /// Displays the time counter. /// </summary> public void DisplayTimeCounter() { _sp.Write(VfdCommand.DisplayTimeCounter()); }
/// <summary> /// Brighnesses the adjustment. /// </summary> /// <param name="level">The level.</param> public void BrighnessAdjustment(byte level) { _sp.Write(VfdCommand.BrightnessAdjustment(level)); }
/// <summary> /// Tests this instance. /// </summary> public void Test() { _sp.Write(VfdCommand.Test()); }