⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 term_m.c

📁 一个Linux下测试串口的源代码
💻 C
字号:
/*****************************************************************************//* TERM_M.C								     *//* This is the linux Communication Test Program for Advantech PCL card * * This file is part of pclterm * copyright (c)2000 ,ADVANTECH Co,Ltd * * pclterm is free software;you can redistribute it and/or modify it * under the terms of version 2 of GNU General Public License as * published by the Free Software Foundation.*//*****************************************************************************/#include	<signal.h>#include	"term.h"#define SENDPATTERN	0#define SENDFILE	1#define RECEIVEFILE     2/*****************************************************************************//* GLOBAL VARIABLES							     *//*****************************************************************************//*****************************************************************************//* STATIC FUNCTIONS							     *//*****************************************************************************//*****************************************************************************//* STATIC VARIABLES							     *//*****************************************************************************/static	struct	WItem	dModeMenuitem[] = {	{ F_Active, "Send Pattern " },	{ F_Active, "Send file    " },	{ F_Active, "Receive file    " }};static	struct	WSelect dModeMenu = {	-1, 6, "Advanced Transfer Modes", 3, 0, 0, 0, 3, dModeMenuitem,	{ "Enter:Select  Esc:Exit"}, 0};/*****************************************************************************//*	MAIN FUNCTIONS							     *//*****************************************************************************/void	mode_setup(){	int	key;	mw_selectinit(&dModeMenu);	do {	    switch((key = mw_select())) {	    case SENDPATTERN:		mw_selectend();		term_menu();		pattern_setup();		term_menu();		mw_selectinit(&dModeMenu);		break;	    case SENDFILE:		mw_selectend();		term_menu();		sfile_setup();		mw_selectinit(&dModeMenu);		break;	    case RECEIVEFILE:	        mw_selectend();		term_menu();		rfile_setup();		mw_selectinit(&dModeMenu);	        break;	    }	} while ( key != K_ESC );	mw_selectend();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -