Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/iicbus/iic.h
| Show All 25 Lines | |||||
| * SUCH DAMAGE. | * SUCH DAMAGE. | ||||
| * | * | ||||
| */ | */ | ||||
| #ifndef __IIC_H | #ifndef __IIC_H | ||||
| #define __IIC_H | #define __IIC_H | ||||
| #include <sys/ioccom.h> | #include <sys/ioccom.h> | ||||
| #ifdef _KERNEL | |||||
| struct file; | |||||
| struct iic_rdwr_data; | |||||
| struct thread; | |||||
| typedef int iic_linux_rdwr_t(struct file *fp, struct iic_rdwr_data *d, | |||||
| int flags, struct thread *td); | |||||
| #endif | |||||
| /* Designed to be compatible with linux's struct i2c_msg */ | /* Designed to be compatible with linux's struct i2c_msg */ | ||||
| struct iic_msg | struct iic_msg | ||||
| { | { | ||||
| uint16_t slave; | uint16_t slave; | ||||
| uint16_t flags; | uint16_t flags; | ||||
| #define IIC_M_WR 0 /* Fake flag for write */ | #define IIC_M_WR 0 /* Fake flag for write */ | ||||
| #define IIC_M_RD 0x0001 /* read vs write */ | #define IIC_M_RD 0x0001 /* read vs write */ | ||||
| #define IIC_M_NOSTOP 0x0002 /* do not send a I2C stop after message */ | #define IIC_M_NOSTOP 0x0002 /* do not send a I2C stop after message */ | ||||
| Show All 29 Lines | |||||