Function definition starts with capital 'F' (ASCII 0x46) followed by a decimal index of
the function and the colon character (':', ASCII 0x3A). Then one or more commands
follow (as described above). No spaces between commands are allowed.
A function which is not found is not executed. This is not considered as an error
(simply some functions don't do anything on some displays).
Example:
F4:T(g(2,i0));G(100);T(!z(i1));G(100);P("\033[0;9H");I("3",i8);P("kbps");
Program execution
The display program interpreter runs in a single thread. The program execution can
be in several logical states. Normally it is in the DEFAULT state where all functions
are executed. In the default state the function called by the application is executed
to its end and then the interpreter is released to other potential function calls.
A display can be LOCKED using the Lock command: L(); Immediately after the lock
command the execution of the current function is terminated, the interpreter is
released and all further function calls from the application are ignored until a
function with the Unlock command: U(); is called. In that case the unlock command
must be the first command of the function. The unlock command brings the
interpreter to the default state.
This is typically used if the application switches to a specific mode (e.g. firmware
update, reset, standby mode, etc.) disallowing other tasks (e.g. volume control,
song name printing) to output anything to the display.
A display can be WAITING if the Wait command: W(n); is called. Immediately after
the execution of the W(n); command, current function is temporarily stopped, the
context is stored and the interpreter is released. All subsequent calls of the
interpreter are ignored unless a function with either the Abort: A(); or Unlock: U();
command is executed. Again, the command must be the first command of the
function.
If no Abort and Unlock commands are called, the execution of the original function
resumes after n*100ms. The function is then normally executed up to the end.
If an Unlock or Abort command is used the stored context is discarded and the new
function starts.
This is typically used if a message should be displayed for a limited time. E.g. when
volume is changed, the “Volume X%” is displayed for few seconds and then the
player information (song name, bitrate, etc.) is displayed again.
Special commands
Most of the commands manipulate the display. However, there are two special
flow-control commands: G (Goto) and T (Test).
The command G(n); (go to function number n) terminates the execution of the rest
of the current function and continues with the function n. The Goto command is
uninterruptible.
The command T(x); (test condition) evaluates the boolean expression x and
executes the next command only if the condition is TRUE. If the condition is FALSE,
the next command after the Test command is skipped.
Display control
The content of the display can be altered by printing to the display; commands:
Clear Block, Print Character, Print Formatted Integer, Print String, Print Message.
Alternatively, up to three independent scroll fields can be set up using the Scroll
command.
The back-light can be controlled using the Backlight command: H(x); The back-light
is controlled in 16 steps and can be smoothly faded in and faded out. Please note
that not all displays feature a back-light.
BARIX AG | 42/63
Commentaires sur ces manuels