keyshell.c~
来自「基于GPRS的远程温度采集控制系统, 嵌入式系统, C源代码, 供做嵌入式开发及」· C~ 代码 · 共 40 行
C~
40 行
#include <stdio.h>#include <stdlib.h>#include <sys/types.h>#include <fcntl.h>#include <unistd.h>#include <errno.h>#include <pthread.h>#include <time.h>#include "../keyboard/get_key.h"char shell_s[]="\nkeyshell> ";/*int argc, char *argv[*/#define CMD_TPYE (0)#define PHONE_NUMBER (1)#define MAX_CMD_DEPTH (2)extern volatile int STOP ;void * keyshell(){ char cmd[256]={0,}; int i; char number[11]={0,}; gprs_init(); while(1){ printf(shell_s); fflush(stdout); scanf("%s",cmd); printf("\r\n"); //显示必要的输出 if (strncmp("q",cmd,1)==0) { printf("\nexit this program!\n"); STOP=1; break; } } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?