pc104.h

来自「嵌入式处理器」· C头文件 代码 · 共 50 行

H
50
字号
/* * pc104.h * *   * * Author: wbin <wbinbuaa@163.com> * Date  : $Date: 2007/01/08 $  * * $Revision: 1.0.0.1 $ * * * This file is subject to the terms and conditions of the GNU General Public * License.  See the file COPYING in the main directory of this archive * for more details. */ #ifndef __PC104_H__#define __PC104_H__enum {UPPC104_IOCTL_WRB =1,UPPC104_IOCTL_WRW,UPPC104_IOCTL_RDB,UPPC104_IOCTL_RDW,UPPC104_IOCTL_BUSWIDTH,//other IOCTL commands};#define BUSWIDTH_8BIT	(0x01)#define BUSWIDTH_16BIT	(0x02)#define PC104_DEV		"/dev/pc104/0"extern int pc104_fd;typedef struct {	unsigned int addr;			//接口板的偏移地址	unsigned int data;			//数据指针	unsigned int buswidth;		//总线宽度	unsigned int len;			//数据长度	void * priv;}UPPC104, *PUPPC104;void set_buswidth(int width);void arm104_write16(PUPPC104 pwr);void arm104_write8(PUPPC104 pwr);int arm104_read16(PUPPC104 prd);int arm104_read8(PUPPC104 prd);#endif  //__PC104_H__

⌨️ 快捷键说明

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