mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Collapses lua high(), low(), toggle(), config_high(), config_low(),
config_apply() into one simple function:
set{<line>=<state>, ...}
Line can be any of DTR, RTS, CTS, DSR, CD, RI.
State is high, low, or toggle.
Example:
script = set{DTR=high, RTS=low}; msleep(100); set{DTR=low, RTS=high}; msleep(100); set{RTS=low}
Notice the use of {} instad of () when calling the set function. This is
required to pass parameters by name in lua.
5 lines
86 B
Lua
5 lines
86 B
Lua
set{DTR=high, RTS=low}
|
|
msleep(100)
|
|
set{DTR=low, RTS=high}
|
|
msleep(100)
|
|
set{RTS=toggle}
|