0
\$\begingroup\$

enter image description here

What does it mean code for TFT LCD rgb?

i dont know ("%s") or ("\x12" "kwh") or "%4u:%02U:%02u" ?

\$\endgroup\$
5
  • \$\begingroup\$ gerafic? Do you mean generic? \$\endgroup\$
    – Steve G
    Aug 27, 2016 at 11:34
  • \$\begingroup\$ Where did you find the word "gerafic"? What does it mean? The "%" variables are placeholders for variables used in the xprintf command. Did you look up the syntax for xprintf? \$\endgroup\$
    – Transistor
    Aug 27, 2016 at 11:34
  • \$\begingroup\$ %s is a format specifier for the xprintf function. It tells xprintf to treat the first parameter as a string and display it "as is" without conversion. \$\endgroup\$
    – Steve G
    Aug 27, 2016 at 11:38
  • \$\begingroup\$ transl. Iranians use "gerafic" to mean 'graphic' \$\endgroup\$ Aug 27, 2016 at 11:39
  • 2
    \$\begingroup\$ those have nothing to do with graphics nor an lcd, they are format specifiers look at the documentation on the printf() function. %s means insert a string here using the first parameter \x13 is standard C means I want to enter a character in the string using its hex equivalent. why \x13 instead of \r I dont know but it does the same thing adds a carriage return. \$\endgroup\$
    – old_timer
    Aug 27, 2016 at 11:53

1 Answer 1

2
\$\begingroup\$

They are print and formatted print statements in the C language.

See any C reference on printf() such as this one for the format string.

Presumably xprintf is the same as printf except it sends the characters to the LCD rather than stdout, and xputs() is likewise similar to puts().

\x12 and \x13 are the escape sequences for fairly rarely used control characters DC2 and DC2 (^R and ^S) with some unknown (to me) meaning, most likely to do with formatting on the display. Each of those represents a single byte.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.