UART, escape key
How do I send an escape key character over UART on the PLT?
-
There are a couple of different ways to send control characters over UART.
One option: Send explicit bytes as a hex string:
# Send Escape character (ASCII 0x27)
- uartcmd: uart UART0
send: hex "27"The "hex" keyword allows you to send bytes from a hex string. (Note: this feature was added in PLT-OS 1.9.12, make sure your project is set to >= 1.9.12).
Another option: Use the appropriate escape sequence:
- uartcmd: uart UART0
send: "\x27"There are some limitations to what characters can be sent this way, but it works in most common cases, and it's useful when you want to intersperse plain text and control characters.
Please sign in to leave a comment.
Comments
3 comments