LcdDisplay.Util (LcdDisplay v0.0.11) View Source

Link to this section Summary

Functions

Determines a cursor position based on

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 and the number of columns as a tuple
  • the zero-indexed cursor position (row and column) as a tuple

    Examples

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