73 #include "rnr/rnrconfig.h" 81 #define I2C_ADDR_GEN_CALL 0x00 82 #define I2C_ADDR_CBUS 0x01
83 #define I2C_ADDR_DIFF_BUS 0x02
84 #define I2C_ADDR_FUTURE0 0x03
85 #define I2C_ADDR_HIGH_SPEED_0 0x04
86 #define I2C_ADDR_HIGH_SPEED_1 0x05
87 #define I2C_ADDR_HIGH_SPEED_2 0x06
88 #define I2C_ADDR_HIGH_SPEED_3 0x07
89 #define I2C_ADDR_TEN_BIT_0 0x78
90 #define I2C_ADDR_TEN_BIT_1 0x79
91 #define I2C_ADDR_TEN_BIT_2 0x7a
92 #define I2C_ADDR_TEN_BIT_3 0x7b
93 #define I2C_ADDR_FUTURE1_0 0x7c
94 #define I2C_ADDR_FUTURE1_1 0x7d
95 #define I2C_ADDR_FUTURE1_2 0x7e
96 #define I2C_ADDR_FUTURE1_3 0x7f
101 #define I2C_ADDR_DEV_LOW (I2C_ADDR_HIGH_SPEED_3 + 1) 103 #define I2C_ADDR_DEV_HIGH (I2C_ADDR_TEN_BIT_0 - 1) 105 #define I2C_MAX_ADDRS (I2C_ADDR_DEV_HIGH - I2C_ADDR_DEV_LOW + 1) 111 #define I2C_M_NOFLAGS 0 112 #define I2C_M_TEN 0x10
113 #define I2C_M_RD 0x01
114 #define I2C_M_NOSTART 0x4000
115 #define I2C_M_REV_DIR_ADDR 0x2000
116 #define I2C_M_IGNORE_NAK 0x1000
117 #define I2C_M_NO_RD_ACK 0x0800
136 #define I2C_FUNC_I2C 0x00000001 137 #define I2C_FUNC_10BIT_ADDR 0x0000000
138 #define I2C_FUNC_PROTOCOL_MANGLING 0x00000004
140 #define I2C_FUNC_SMBUS_HWPEC_CALC 0x00000008 141 #define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000
142 #define I2C_FUNC_SMBUS_QUICK 0x00010000
143 #define I2C_FUNC_SMBUS_READ_BYTE 0x00020000
144 #define I2C_FUNC_SMBUS_WRITE_BYTE 0x00040000
145 #define I2C_FUNC_SMBUS_READ_BYTE_DATA 0x00080000
146 #define I2C_FUNC_SMBUS_WRITE_BYTE_DATA 0x00100000
147 #define I2C_FUNC_SMBUS_READ_WORD_DATA 0x00200000
148 #define I2C_FUNC_SMBUS_WRITE_WORD_DATA 0x00400000
149 #define I2C_FUNC_SMBUS_PROC_CALL 0x00800000
150 #define I2C_FUNC_SMBUS_READ_BLOCK_DATA 0x01000000
151 #define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000
152 #define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000
153 #define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000
154 #define I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 0x10000000
155 #define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2 0x20000000
156 #define I2C_FUNC_SMBUS_BYTE \
157 (I2C_FUNC_SMBUS_READ_BYTE | I2C_FUNC_SMBUS_WRITE_BYTE)
159 #define I2C_FUNC_SMBUS_BYTE_DATA \ 160 (I2C_FUNC_SMBUS_READ_BYTE_DATA | I2C_FUNC_SMBUS_WRITE_BYTE_DATA) 162 #define I2C_FUNC_SMBUS_WORD_DATA \ 163 (I2C_FUNC_SMBUS_READ_WORD_DATA | I2C_FUNC_SMBUS_WRITE_WORD_DATA) 165 #define I2C_FUNC_SMBUS_BLOCK_DATA \ 166 (I2C_FUNC_SMBUS_READ_BLOCK_DATA | I2C_FUNC_SMBUS_WRITE_BLOCK_DATA) 168 #define I2C_FUNC_SMBUS_I2C_BLOCK \ 169 (I2C_FUNC_SMBUS_READ_I2C_BLOCK | I2C_FUNC_SMBUS_WRITE_I2C_BLOCK) 171 #define I2C_FUNC_SMBUS_I2C_BLOCK_2 \ 172 (I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2) 178 #define I2C_SMBUS_BLOCK_MAX 32 179 #define I2C_SMBUS_I2C_BLOCK_MAX 32
195 #define I2C_SMBUS_READ 1 196 #define I2C_SMBUS_WRITE 0
203 #define I2C_SMBUS_QUICK 0 204 #define I2C_SMBUS_BYTE 1
205 #define I2C_SMBUS_BYTE_DATA 2
206 #define I2C_SMBUS_WORD_DATA 3
207 #define I2C_SMBUS_PROC_CALL 4
208 #define I2C_SMBUS_BLOCK_DATA 5
209 #define I2C_SMBUS_I2C_BLOCK_DATA 6
210 #define I2C_SMBUS_BLOCK_PROC_CALL 7
221 #define I2C_RETRIES 0x0701
223 #define I2C_TIMEOUT 0x0702 224 #define I2C_SLAVE 0x0703
225 #define I2C_SLAVE_FORCE 0x0706
227 #define I2C_TENBIT 0x0704 228 #define I2C_FUNCS 0x0705
229 #define I2C_RDWR 0x0707
230 #define I2C_PEC 0x0708
231 #define I2C_SMBUS 0x0720
i2c_msg_t * msgs
pointers to i2c_msgs
short len
message length (bytes)
ushort_t addr
7/10-bit slave address 0xxx xxxx
int nmsgs
number of i2c_msgs
I2C SMBus IOCTL Multi-Message Structure.
struct i2c_rdwr_ioctl_data_struct i2c_rdwr_ioctl_data_t
I2C SMBus IOCTL Multi-Message Structure.
struct i2c_msg_struct i2c_msg_t
I2C Message Stucture.
ushort_t word
data short word
char * buf
pointer to message data
I2C SMBus IOCTL Call Structure.
#define I2C_SMBUS_BLOCK_MAX
As specified in SMBus standard.
union i2c_smbus_data_union i2c_smbus_data_t
I2C SMBus Data Stucture.
byte_t read_write
operation direction
struct i2c_smbus_ioctl_data_struct i2c_smbus_ioctl_data_t
I2C SMBus IOCTL Call Structure.
i2c_smbus_data_t * data
data
byte_t command
ioctl command