DF-2311 / iic_abi.h
#ifndef IIC_ABI_H #define IIC_ABI_H #include <sys/ioccom.h> #include <sys/types.h> /* local copy of the iic ioctl ABI (sys/bus/iicbus/iic.h) */ struct iic_msg { uint16_t slave; uint16_t flags; #define IIC_M_WR 0 #define IIC_M_RD 0x0001 uint16_t len; uint8_t *buf; }; struct iiccmd { u_char slave; int count; int last; char *buf; }; struct iic_rdwr_data { struct iic_msg *msgs; uint32_t nmsgs; }; #define I2CSTART _IOW('i', 1, struct iiccmd) #define I2CSTOP _IO('i', 2) #define I2CRSTCARD _IOW('i', 3, struct iiccmd) #define I2CWRITE _IOW('i', 4, struct iiccmd) #define I2CREAD _IOW('i', 5, struct iiccmd) #define I2CRDWR _IOW('i', 6, struct iic_rdwr_data) #define I2CRPTSTART _IOW('i', 7, struct iiccmd) #endif /* iic_abi */ |