/// <summary>
 /// End User set up mode end.
 /// <para>* Valid at the user setup mode.</para>
 /// </summary>
 /// <param name="device">GU256x128c device</param>
 public static void IoPortInputOutputSetting(this Gu256x128c device, byte n, PortMode mode)
 {
     device.WriteBytes(new byte[] { 0x1F, 0x28, 0x65, 0x02, 0x4F, 0x55, 0x54 });
 }
示例#2
0
        /// <summary>
        /// Specify or cancel 2byte character mode.
        /// <para>Default = <see cref="false"/></para>
        /// </summary>
        /// <param name="device">GU256x128c device</param>
        public static void SpecifyCancel2ByteCharacterMode(this Gu256x128c device, bool specify)
        {
            var m = (byte)(specify ? 1 : 0);

            device.WriteBytes(new byte[] { 0x1F, 0x28, 0x67, 0x02, m });
        }
示例#3
0
        /// <summary>
        /// Select current window
        /// </summary>
        /// <param name="device">GU256x128c device</param>
        /// <param name="define">Window define</param>
        public static void CurrentWndowSelect(this Gu256x128c device, WindowDefine define)
        {
            var a = (byte)define;

            device.WriteBytes(new byte[] { 0x1F, 0x28, 0x77, 0x01, a });
        }
 /// <summary>
 /// Start User set up mode start.
 /// </summary>
 /// <param name="device">GU256x128c device</param>
 public static void UserSetupModeStart(this Gu256x128c device)
 {
     device.WriteBytes(new byte[] { 0x1F, 0x28, 0x65, 0x01, 0x49, 0x4E });
 }
        /// <summary>
        /// Specify enable or disable for download character
        /// <para>Default = <see cref="false"/></para>
        /// </summary>
        /// <param name="device">GU256x128c device</param>
        public static void SpecifyDownloadCharacter(this Gu256x128c device, bool enable)
        {
            var n = (byte)(enable ? 1 : 0);

            device.WriteBytes(new byte[] { 0x1B, 0x25, n });
        }
        /// <summary>
        /// Specifies write mixture mode. The new character or raphic image display mixed with current display image stored in display memory is overwritten to the display memory.
        /// <para>Default = <see cref="MixtureMode.Normal"/></para>
        /// </summary>
        /// <param name="device">GU256x128c device</param>
        public static void SpecifiesWriteMixtureDisplayMode(this Gu256x128c device, MixtureMode mode)
        {
            var n = (byte)mode;

            device.WriteBytes(new byte[] { 0x1F, 0x77, n });
        }
示例#7
0
 /// <summary>
 /// The state of a general purpose I/O port is transmitted via RS232C I/F.
 /// </summary>
 /// <param name="device">GU256x128c device</param>
 public static void IoPortInput(this Gu256x128c device, byte n)
 {
     device.WriteBytes(new byte[] { 0x1F, 0x28, 0x70, 0x20, n });
 }
示例#8
0
 /// <summary>
 /// Magnify the character by x times on the right, y times downward.
 /// <para>Default x = <see cref="0x01"/></para>
 /// <para>Default y = <see cref="0x01"/></para>
 /// </summary>
 /// <param name="x">Specify the size of magnification X</param>
 /// <param name="y">Specify the size of magnification Y</param>
 /// <param name="device">GU256x128c device</param>
 public static void FontMagnifiedDisplay(this Gu256x128c device, byte x, byte y)
 {
     device.WriteBytes(new byte[] { 0x1F, 0x28, 0x67, 0x40, x, y });
 }
示例#9
0
        /// <summary>
        /// Set input or output for general purpose I/O port.
        /// </summary>
        /// <param name="device">GU256x128c device</param>
        /// <param name="n">I/O port number</param>
        /// <param name="a">Set Input or Output</param>
        public static void IoPortInputOutputSetting(this Gu256x128c device, byte n, PortMode mode)
        {
            var a = (byte)mode;

            device.WriteBytes(new byte[] { 0x1F, 0x28, 0x70, 0x01, n, a });
        }
示例#10
0
 /// <summary>
 /// Output the data to general purpose I/O port.
 /// </summary>
 /// <param name="device">GU256x128c device</param>
 public static void IoPortOutput(this Gu256x128c device, byte n, byte a)
 {
     device.WriteBytes(new byte[] { 0x1F, 0x28, 0x70, 0x10, n, a });
 }
        /// <summary>
        /// Transfer the download character defined in FROM to RAM.
        /// </summary>
        /// <param name="device">GU256x128c device</param>
        /// <param name="type">Select font type</param>
        public static void DownloadCharacterTransfer(this Gu256x128c device, FontType type)
        {
            var a = (byte)type;

            device.WriteBytes(new byte[] { 0x1F, 0x28, 0x65, 0x21, a });
        }
 /// <summary>
 /// Delete defined 6x8 or 8x16 dot download character.
 /// </summary>
 /// <param name="device">GU256x128c device</param>
 /// <param name="a">Select character type</param>
 /// <param name="c">Character code for delete</param>
 public static void DeleteDownloadedCharacter(this Gu256x128c device, byte a, byte c)
 {
     device.WriteBytes(new byte[] { 0x1B, 0x3F, a, c });
 }
        /// <summary>
        /// Define 6 x 8 or 8 x 16 dot download characters into RAM.
        /// </summary>
        /// <param name="device">GU256x128c device</param>
        /// <param name="a">Select character type</param>
        /// <param name="c1">Start character code</param>
        /// <param name="c2">End character code</param>
        /// <param name="d">Defined data [ (x1, d1 ... dx1), (xk, dk ... dxk) ]</param>
        public static void DownloadCharacterDefinition(this Gu256x128c device, byte a, byte c1, byte c2, params KeyValuePair <byte, byte[]>[] d)
        {
            var buffer = d.SelectMany(kv => new byte[] { kv.Key }.Concat(kv.Value).ToArray()).ToArray();

            device.WriteBytes(new byte[] { 0x1B, 0x26, a, c1, c2 }, buffer);
        }
示例#14
0
        /// <summary>
        /// Select the write screen mode for base window.
        /// <para>Default = <see cref="ScreenMode.DisplayScreenMode"/></para>
        /// </summary>
        /// <param name="device">GU256x128c device</param>
        public static void WriteScreenModeSelect(this Gu256x128c device, ScreenMode mode)
        {
            var a = (byte)mode;

            device.WriteBytes(new byte[] { 0x1F, 0x28, 0x77, 0x10, a });
        }
        /// <summary>
        /// Select the visual quality of horizontal scroll
        /// <para>Default = <see cref="ScrollPriority.ScrollSpeed"/></para>
        /// </summary>
        /// <param name="device">GU256x128c device</param>
        public static void HorizontalScrollQualitySelect(this Gu256x128c device, ScrollPriority priority)
        {
            var n = (byte)priority;

            device.WriteBytes(new byte[] { 0x1F, 0x60, n });
        }
示例#16
0
        /// <summary>
        /// Select 2 byte character type
        /// <para>Default = <see cref="CharacterType.Japanese"/></para>
        /// </summary>
        /// <param name="device">GU256x128c device</param>
        public static void Select2ByteCharacterType(this Gu256x128c device, CharacterType type)
        {
            var m = (byte)type;

            device.WriteBytes(new byte[] { 0x1F, 0x28, 0x67, 0x03, m });
        }
        /// <summary>
        /// Specifies or cancels reverse display
        /// <para>Default = <see cref="false"/></para>
        /// </summary>
        /// <param name="device">GU256x128c device</param>
        public static void SpecifiesOrCancelsReverseDisplay(this Gu256x128c device, bool specify)
        {
            var n = (byte)(specify ? 1 : 0);

            device.WriteBytes(new byte[] { 0x1F, 0x72, n });
        }
示例#18
0
        /// <summary>
        /// Specify or cancel boldface character.
        /// <para>Default = <see cref="false"/></para>
        /// </summary>
        /// <param name="device">GU256x128c device</param>
        public static void CharacterBoldDisplay(this Gu256x128c device, bool specify)
        {
            var b = (byte)(specify ? 1 : 0);

            device.WriteBytes(new byte[] { 0x1F, 0x28, 0x67, 0x41, b });
        }
        /// <summary>
        /// Define the user font of 1byte code to the user table.
        /// </summary>
        /// <param name="device"></param>
        /// <param name="m">User table</param>
        /// <param name="p">Definition data [ P(80h-1), P(80h-2), ... , P(FFh-n) ]</param>
        public static void FromUserFontDefinition(this Gu256x128c device, FontSize table, params byte[] p)
        {
            var m = (byte)table;

            device.WriteBytes(new byte[] { 0x1F, 0x28, 0x65, 0x13, m }, p);
        }