37#define IICPRI (PZERO+8)
48#define IIC_INTRWAIT (IIC_INTR | IIC_WAIT)
49#define IIC_RECURSIVE 0x4
50#define IIC_REQBUS_DEV 0x8
80#define IIC_UNKNOWN 0x0
83#define IIC_FASTEST 0x3
85#define IIC_LAST_READ 0x1
90#define IIC_REQUEST_BUS 0x1
91#define IIC_RELEASE_BUS 0x2
96#define INTR_GENERAL 0x1
99#define INTR_RECEIVE 0x4
100#define INTR_TRANSMIT 0x5
101#define INTR_ERROR 0x6
102#define INTR_NOACK 0x7
108#define IIC_EBUSERR 0x1
109#define IIC_ENOACK 0x2
110#define IIC_ETIMEOUT 0x3
111#define IIC_EBUSBSY 0x4
112#define IIC_ESTATUS 0x5
113#define IIC_EUNDERFLOW 0x6
114#define IIC_EOVERFLOW 0x7
115#define IIC_ENOTSUPP 0x8
116#define IIC_ENOADDR 0x9
117#define IIC_ERESOURCE 0xa
118#define IIC_ERRNO __INT_MIN
135#define iicbus_reset(bus,speed,addr,oldaddr) \
136 (IICBUS_RESET(device_get_parent(bus), speed, addr, oldaddr))
143extern int iicbus_write(device_t,
const char *,
int,
int *,
int);
144extern int iicbus_read(device_t,
char *,
int,
int *,
int,
int);
165int iicdev_readfrom(device_t _slavedev, uint8_t _regaddr,
void *_buffer,
166 uint16_t _buflen,
int _waithow);
167int iicdev_writeto(device_t _slavedev, uint8_t _regaddr,
void *_buffer,
168 uint16_t _buflen,
int _waithow);
170#define IICBUS_MODVER 1
171#define IICBUS_MINVER 1
172#define IICBUS_MAXVER 1
173#define IICBUS_PREFVER IICBUS_MODVER
178#define IICBB_MODVER 1
179#define IICBB_MINVER 1
180#define IICBB_MAXVER 1
181#define IICBB_PREFVER IICBB_MODVER
int iicbus_transfer_excl(device_t bus, struct iic_msg *msgs, uint32_t nmsgs, int how)
int iicdev_writeto(device_t _slavedev, uint8_t _regaddr, void *_buffer, uint16_t _buflen, int _waithow)
int iicbus_transfer(device_t bus, struct iic_msg *msgs, uint32_t nmsgs)
int iicbus_repeated_start(device_t, u_char, int)
int iicbus_release_bus(device_t, device_t)
int iicbus_start(device_t, u_char, int)
int iicbus_write(device_t, const char *, int, int *, int)
void iicbus_intr(device_t, int, char *)
int iicbus_null_repeated_start(device_t, u_char)
device_t iicbus_alloc_bus(device_t)
int iicbus_read(device_t, char *, int, int *, int, int)
int iicbus_block_read(device_t, u_char, char *, int, int *)
int iicbus_stop(device_t)
int iicbus_started(device_t)
int iicbus_null_callback(device_t, int, caddr_t)
int iicdev_readfrom(device_t _slavedev, uint8_t _regaddr, void *_buffer, uint16_t _buflen, int _waithow)
devclass_t iicbb_devclass
int iicbus_block_write(device_t, u_char, char *, int, int *)
int iicbus_request_bus(device_t, device_t, int)
int iicbus_transfer_gen(device_t bus, struct iic_msg *msgs, uint32_t nmsgs)
int iicbus_read_byte(device_t, char *, int)
int iicbus_write_byte(device_t, char, int)