VSF Documented
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
source
shell
sys
linux
include
linux
i2c-dev.h
Go to the documentation of this file.
1
#ifndef __VSF_LINUX_I2C_DEV_H__
2
#define __VSF_LINUX_I2C_DEV_H__
3
4
#include <
linux/types.h
>
5
6
#ifdef __cplusplus
7
extern
"C"
{
8
#endif
9
10
// for ioctrl
11
#define I2C_SLAVE (('i' << 8) | 0)
12
#define I2C_SLAVE_FORCE I2C_SLAVE
13
#define I2C_TENBIT (('i' << 8) | 1)
14
#define I2C_FUNCS (('i' << 8) | 2)
15
#define I2C_RDWR (('i' << 8) | 3)
16
#define I2C_SMBUS (('i' << 8) | 4)
17
#define I2C_PEC (('i' << 8) | 5)
18
19
struct
i2c_smbus_ioctl_data
{
20
__u8
read_write
;
21
__u8
command
;
22
__u32
size
;
23
union
i2c_smbus_data
*
data
;
24
};
25
26
struct
i2c_rdwr_ioctl_data
{
27
struct
i2c_msg
*
msgs
;
28
__u32
nmsgs
;
29
};
30
31
#define I2C_RDWR_IOCTL_MAX_MSGS 42
32
#define I2C_RDRW_IOCTL_MAX_MSGS I2C_RDWR_IOCTL_MAX_MSGS
33
34
#ifdef __cplusplus
35
}
36
#endif
37
38
#endif
types.h
__u32
uint32_t __u32
Definition
types.h:55
__u8
uint8_t __u8
Definition
types.h:51
i2c_msg
Definition
i2c.h:61
i2c_rdwr_ioctl_data
Definition
i2c-dev.h:26
i2c_rdwr_ioctl_data::msgs
struct i2c_msg * msgs
Definition
i2c-dev.h:27
i2c_rdwr_ioctl_data::nmsgs
__u32 nmsgs
Definition
i2c-dev.h:28
i2c_smbus_ioctl_data
Definition
i2c-dev.h:19
i2c_smbus_ioctl_data::read_write
__u8 read_write
Definition
i2c-dev.h:20
i2c_smbus_ioctl_data::command
__u8 command
Definition
i2c-dev.h:21
i2c_smbus_ioctl_data::size
__u32 size
Definition
i2c-dev.h:22
i2c_smbus_ioctl_data::data
union i2c_smbus_data * data
Definition
i2c-dev.h:23
i2c_smbus_data
Definition
i2c.h:42
Generated by
1.9.8