swtest.c

来自「linux下的键盘编程应用程序」· C语言 代码 · 共 93 行

C
93
字号
head	1.2;access;symbols	START:1.1.1.1	F[Cujitsu:1.1.1;locks; strict;comment	@ * @;1.2date	2004.09.30.04.01.45;	author floyd;	state Exp;branches;next	1.1;deltatype	text;permissions	444;commitid	dc8415b84a31938;kopt	kv;filename	@swtest.c@;1.1date	2004.09.30.01.37.05;	author floyd;	state Exp;branches	1.1.1.1;next	;deltatype	text;permissions	444;1.1.1.1date	2004.09.30.01.37.05;	author floyd;	state Exp;branches;next	;deltatype	text;permissions	444;desc@@1.2log@replace to new file@text@/*************************************************//**                                             **//**  Reference program for SPD                  **//**  Switch function test code                  **//**  Copyright (C) 2004 Fujitsu                 **//**                                             **//*************************************************//* * $Log: swtest.c,v $ * Revision 1.1  2004/05/29 12:39:07  root * Initial revision * */#include <stdio.h>main(){	int swval;	// initialize switch device	if(ADD_sw_init() < 0){		printf("switch device open fail.\n");		exit(-1);	}        while(1){		sleep(1);		swval = ADD_chk_sw_now();		printf("0x%04x\n",swval);	}}@1.1log@Initial revision@text@@1.1.1.1log@native SPD@text@@

⌨️ 快捷键说明

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