Пример #1
0
        /// <summary>
        /// Sets the position of the cursor
        /// </summary>
        /// <param name="row">The row to move the cursor to</param>
        /// <param name="column">The column to move the cursor to</param>
        /// <returns>A notification of when the task completes</returns>
        public void SetCursorPosition(int row, int column)
        {
            if (!isDoubleLines)
            {
                row = 0;
            }

            if (row > 1)
            {
                row = 1;
            }

            if (column > 40)
            {
                column = 40;
            }

            BitArray pos = new BitArray(new int[] { ((40 * row) + column) });

            SendInstruction(InstructionDefinitions.SET_DDRAM_ADDRESS(pos[6], pos[5], pos[4], pos[3], pos[2], pos[1], pos[0]));
        }