We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e382ae0 commit ebfba49Copy full SHA for ebfba49
components/finsh/cmd.c
@@ -29,6 +29,7 @@
29
* 2018-11-22 Jesven list_thread add smp support
30
* 2018-12-27 Jesven Fix the problem that disable interrupt too long in list_thread
31
* Provide protection for the "first layer of objects" when list_*
32
+ * 2020-04-07 chenhui add clear
33
*/
34
35
#include <rthw.h>
@@ -48,6 +49,15 @@ long hello(void)
48
49
}
50
FINSH_FUNCTION_EXPORT(hello, say hello world);
51
52
+long clear(void)
53
+{
54
+ rt_kprintf("\x1b[2J\x1b[H");
55
+
56
+ return 0;
57
+}
58
+FINSH_FUNCTION_EXPORT(clear,clear the terminal screen);
59
+MSH_CMD_EXPORT(clear,clear the terminal screen);
60
61
extern void rt_show_version(void);
62
long version(void)
63
{
0 commit comments