This test is based on CDC_ACM Example from GD32VF103_Demo_Suites repository which has some issues when compiled under Platformio environment.
The demo is intended to be run on Longan Nano board. If testing on another board (without a display), edit the source file src\app.c
and remove all display related commands.
The changes made to make it compile without issues, fix some bugs and make a better demo of the possible usage:
- The USB drivers are moved into the project source/include directories.
- There was also a missing include in cdc_usb_core.c which was added.
- USB descriptors are slightly changed so that the device does not apear as modem device which activates the Modem Manager on Linux.
- LCD and RGB LED driver from Sipeed's Longan_GD32VF_examples is used to make a LCD demo (some bugs was fixed and Chinese comments translated to English)
After the demo is compiled and flashed to the Longan Nano board start some terminal emulator (minicom, putty, ...) connected to /dev/ttyACM0
(under Linux).
- type some characters (or copy/paste)
- printable characters will be echoed back, non printable characters will be echoed as
.
- press
Return
key to display the entered characters on Longan Nano display (bothCtrl+M
andCtrl+J
are accepted as line ends) - up to 100 character can be accepted and shown on the display, if more characters are entered, they will be ignored and echoed as
>
(the number of overflow characters will be displayed when the string is shown on the display) - some control caharcters are accepted which has the following effects:
Ctrl+R
change the text color and RGB LED color toRED
Ctrl+G
change the text color and RGB LED color toGREEN
Ctrl+B
change the text color and RGB LED color toBLUE
Ctrl+C
change the text color and RGB LED color toCYAN
Ctrl+Y
change the text color and RGB LED color toYELLOW
Ctrl+W
change the text color and RGB LED color toWHITE
Ctrl+D
clear screenCtrl+L
display Sipeed logoCtrl+S
display status (Sipeed logo, number of received and sent characters, number of received strings)