iicdev.h

来自「经典 WxWorks下的IIC字符设备驱动」· C头文件 代码 · 共 72 行

H
72
字号
/* iicdev.h - s3c2440 IIC character device driver header */

/* Copyright 2007-2008 zyyt  Inc. */
/*
modification history
--------------------

01a,16jul07,ZhouJianJun  written 163haole@163.com
*/

#ifndef __INCiicdevh
#define __INCiicdevh

#ifdef __cplusplus
extern "C" {
#endif


/* 定义IIC_DEV结构体 */


#include "selectLib.h"
#include "iosLib.h"

#include "s3c2440iic.h"

/* IIC device I/O controls */

#define IIC_SLAVEADD_SET	0x1003
#define IIC_SLAVEADD_GET	0x1004

#define IIC_CLOCK_SET		0x1005
#define IIC_CLOCK_GET		0x1006

#define IIC_SUBADD_SET		0x1007
#define IIC_SUBADD_GET		0x1008


typedef  struct
{
	DEV_HDR   devHdr; /* 必须 */
	SEL_WAKEUP_LIST selWakeupList; /* 支持SELECT机制 */



	BOOL      readyRead;
	BOOL      readyWrite;
	/*...*/
	BOOL      opened;

	/* 自己定义的其他成员 */


	UINT8 slaveAdd;   /*iic slave address*/
	UINT8 *pSubadd;/*sub address of device  (first byte means number of sub addresses)*/
	int iicTxClock;  /*tx clock*/
	int iicCon; /*IICCON_DACK;*/
}
IIC_DEV;

/* 其他定义 */

#ifdef __cplusplus
}
#endif

#endif /* __INCmyxxdev */




⌨️ 快捷键说明

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