RT-Thread系统的main,c 函数内执行命令,输出为NULL
#include <finsh.h>
#include <msh.h>
void thread300_entry(void *parameter){
while(1) {
time_t timep;
time(&timep);
rt_kprintf("RT-Thread 4.1.0 \n"); rt_kprintf("%s\n",msh_exec("date",50)); rt_kprintf("time=%s\n", asctime(gmtime(&timep))); rt_kprintf("sys=>run=>time=> %d /min\n", rt_tick_get()/1000/60); rt_thread_mdelay(60000);
}}
更多回帖