eLua reference manual - LM3S disp module
Overview
This module contains functions for working with the RIT OLED display on the Luminary Micro EKx-LM3S8962 boards and others.
Functions
lm3s.disp.init( frequency )
Initialize the display.
Arguments: frequency - Number, the clock frequency (in Hertz) of the SSI interface used to control the display.
Returns: nothing.
lm3s.disp.enable( frequency )
Enable the display.
Arguments: frequency - Number, the clock frequency (in Hertz) of the SSI interface used to control the display.
Returns: nothing.
lm3s.disp.disable()
Disable the display.
Arguments: none.
Returns: nothing.
lm3s.disp.on()
Turn the display on.
Arguments: none.
Returns: nothing.
lm3s.disp.off()
Turn the display off.
Arguments: none.
Returns: nothing.
lm3s.disp.clear()
Clear the display.
Arguments: none.
Returns: nothing.
lm3s.disp.print( str, x, y, col )
Write a string on the display. A 5x7 font (in a 6x8 cell) is used for drawing the text.
Arguments:
- str - String, the text to be written on the display.
- x - Number [0-127], the horizonal position of the text (specified in columns).
- y - Number [0-95], the vertical position of the text (specified in lines).
- col - Number [0-15], the 4-bit gray scale value to be used for the text.
Returns: nothing.
lm3s.disp.draw( img, x, y, width, height )
Draw an image on the display.
Arguments:
- img - String, the image to draw in string format.
- x - Number [0-127], the horizontal position of the image (specified in pixels).
- y - Number [0-95], the vertical position of the image (specified in pixels).
- width - Number [1-127], the width of the image.
- height - Number [1-95], the height of the image.
Returns: nothing.