Overhaul Lua API

Lua API moved into a tio library table and names adjusted to Lua stdlib style.
Regex in expect() replaced with Lua patterns so binary data can be handled.
New tio.alwaysecho variable allows enabling and disabling echo to console.
Read and write functions now manage complex retry and timeout logic internally,
giving the user a simple "nil if fail" API like the rest of Lua.
exit() was removed, os.exit() already exists in the Lua standard library.
This commit is contained in:
ii8 2025-06-13 15:49:33 +01:00 committed by Martin Lund
parent 381c0b7823
commit 86f48a2fb6
9 changed files with 318 additions and 465 deletions

View file

@ -1,5 +1,5 @@
set{DTR=high, RTS=low}
msleep(100)
set{DTR=low, RTS=high}
msleep(100)
set{RTS=toggle}
tio.set{DTR=high, RTS=low}
tio.msleep(100)
tio.set{DTR=low, RTS=high}
tio.msleep(100)
tio.set{RTS=toggle}