make vfs & filesystems use failable copying
[minix3.git] / include / minix / i2c.h
blob75dfb9c377a98bb92cf1796fe9b8e9460ad119d9
1 #ifndef __MINIX_I2C_H
2 #define __MINIX_I2C_H
4 /*
5 * Minix I2C /dev Interface.
7 * Same as NetBSD/OpenBSD interface but with a flat struct (i.e. no pointers).
8 * The NetBSD/OpenBSD interface can still be used on i2c device files. The
9 * ioctl(2) function will translate to/from the Minix version of the struct.
12 #include <sys/types.h>
13 #include <dev/i2c/i2c_io.h>
14 #include <minix/ioctl.h>
16 typedef struct minix_i2c_ioctl_exec {
17 i2c_op_t iie_op; /* operation to perform */
18 i2c_addr_t iie_addr; /* address of device */
19 uint8_t iie_cmd[I2C_EXEC_MAX_CMDLEN]; /* pointer to command */
20 size_t iie_cmdlen; /* length of command */
21 uint8_t iie_buf[I2C_EXEC_MAX_BUFLEN]; /* pointer to data buffer */
22 size_t iie_buflen; /* length of data buffer */
23 } minix_i2c_ioctl_exec_t;
25 #define MINIX_I2C_IOCTL_EXEC _IOWR('I', 1, minix_i2c_ioctl_exec_t)
27 #endif /* __MINIX_I2C_H */