Raspberry.IO.Components.Displays.Hd44780.Hd44780LcdConnection.Set5x10CustomCharacter C# (CSharp) Method

Set5x10CustomCharacter() private method

private Set5x10CustomCharacter ( byte character, byte pattern ) : void
character byte
pattern byte
return void
        private void Set5x10CustomCharacter(byte character, byte[] pattern)
        {
            if (character > 7 || (character & 0x1) != 0x1)
                throw new ArgumentOutOfRangeException("character", character, "character must be lower or equal to 7, and not an odd number");
            if (pattern.Length != 10)
                throw new ArgumentOutOfRangeException("pattern", pattern, "pattern must be 10 rows long");

            WriteCommand(Command.SetCGRamAddr, character << 3);
            for (var i = 0; i < 10; i++)
                WriteByte(pattern[i], true);
            WriteByte(0, true);
        }