LcdDisplay.Util (LcdDisplay v0.0.12) View Source

Link to this section Summary

Functions

Determines a cursor position based on the number of rows, the number of columns, and the zero-indexed cursor row and column.

Link to this section Functions

Link to this function

determine_cursor_position(arg1, arg2)

View Source

Determines a cursor position based on the number of rows, the number of columns, and the zero-indexed cursor row and column.

Examples

iex> LcdDisplay.Util.determine_cursor_position({2, 16}, {0,0})
0
iex> LcdDisplay.Util.determine_cursor_position({2, 16}, {0,15})
15
iex> LcdDisplay.Util.determine_cursor_position({2, 16}, {1,0})
64
iex> LcdDisplay.Util.determine_cursor_position({2, 16}, {1,15})
79