Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void new_command( int n, char *argv[]){
- xTaskCreate(vTask1,(signed portCHAR *)"newTask",1024,NULL,0, NULL);
- int handle;
- int error;
- handle = host_action(SYS_SYSTEM, "mkdir -p output");
- handle = host_action(SYS_SYSTEM, "touch output/syslog");
- handle = host_action(SYS_OPEN, "output/syslog", 8);
- if(handle == -1) {
- fio_printf(1, "Open file error!\n\r");
- return;
- }
- char *buffer = "\n\rName State Priority Stack Num\n\r\n";
- error = host_action(SYS_WRITE, handle, (void *)buffer, strlen(buffer));
- char *buffer_line = "*******************************************\n\r";
- error = host_action(SYS_WRITE, handle, (void *)buffer_line, strlen(buffer_line));
- char buff[1024];
- vTaskList((signed char *)buff);
- error = host_action(SYS_WRITE, handle, (void *)buff, strlen(buff));
- if(error != 0) {
- fio_printf(1, "Write file error! Remain %d bytes didn't write in the file.\n\r", error);
- host_action(SYS_CLOSE, handle);
- return;
- }
- host_action(SYS_CLOSE, handle);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement