The Display Link connects to and uses any Computer Bus as a display source. From there, the computer can manipulate the output of the Display Link such as cursor position, line clearing, and writing to the display target.
This is an example of how to access the device.
local d = require("devices")
local link = d:find("display_link")
link:setCursorPos(1, 1)
link:write("This is OC2R: Create!")
Device name: display_link
getCursorPos():table
This method returns the current cursor position as an table.
setCursorPos(x:number, y:number)
This method sets the current cursor position to the provided X and Y position.
getSize():table
This method returns the size of the display target as a table.
write(text:string)
This method writes the given string to the display target at the current cursor position.
text
is the string to write to the display target.writeBytes(bytes:string|table)
This method takes the given bytes and writes their content to the display target.
bytes
is either a string representing UTF8-encoded ASCII byte array or a table representing a UTF8-encoded byte array.clearLine()
This method clears the line on the display target that the cursor is currently on.
clear()
This method clears all the content on the display target.