void
Message(const char *str)
{
#ifndef NOTERM
if(str != NULL)
{
while(*str!='\0')
{
MAP_UARTCharPut(CONSOLE,*str++);
}
}
#endif
}
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
void
ClearTerm()
{
Message("\33[2J\r");
}
Message中的字符串是什么意思?
print "\33[2J"
是clear screen的命令,https://rosettacode.org/wiki/Terminal_control/Clear_the_screen
\r是回车换行
这个函数的原型如下:
void
Message(const char *str)
{
#ifndef NOTERM
if(str != NULL)
{
while(*str!='\0')
{
MAP_UARTCharPut(CONSOLE,*str++);
}
}
#endif
}