Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/iicbus/iiconf.h
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | |||||
#define IIC_ETIMEOUT 0x3 /* timeout */ | #define IIC_ETIMEOUT 0x3 /* timeout */ | ||||
#define IIC_EBUSBSY 0x4 /* bus busy (reserved by another client) */ | #define IIC_EBUSBSY 0x4 /* bus busy (reserved by another client) */ | ||||
#define IIC_ESTATUS 0x5 /* status error */ | #define IIC_ESTATUS 0x5 /* status error */ | ||||
#define IIC_EUNDERFLOW 0x6 /* slave ready for more data */ | #define IIC_EUNDERFLOW 0x6 /* slave ready for more data */ | ||||
#define IIC_EOVERFLOW 0x7 /* too much data */ | #define IIC_EOVERFLOW 0x7 /* too much data */ | ||||
#define IIC_ENOTSUPP 0x8 /* request not supported */ | #define IIC_ENOTSUPP 0x8 /* request not supported */ | ||||
#define IIC_ENOADDR 0x9 /* no address assigned to the interface */ | #define IIC_ENOADDR 0x9 /* no address assigned to the interface */ | ||||
#define IIC_ERESOURCE 0xa /* resources (memory, whatever) unavailable */ | #define IIC_ERESOURCE 0xa /* resources (memory, whatever) unavailable */ | ||||
#define IIC_ERRNO __INT_MIN /* marker bit: errno is in low-order bits */ | |||||
/* | /* | ||||
* Note that all iicbus functions return IIC_Exxxxx status values, | * Note that all iicbus functions return IIC_Exxxxx status values, | ||||
* except iic2errno() (obviously) and iicbus_started() (returns bool). | * except iic2errno() (obviously) and iicbus_started() (returns bool). | ||||
*/ | */ | ||||
extern int iic2errno(int); | extern int iic2errno(int); | ||||
extern int errno2iic(int); | |||||
extern int iicbus_request_bus(device_t, device_t, int); | extern int iicbus_request_bus(device_t, device_t, int); | ||||
extern int iicbus_release_bus(device_t, device_t); | extern int iicbus_release_bus(device_t, device_t); | ||||
extern device_t iicbus_alloc_bus(device_t); | extern device_t iicbus_alloc_bus(device_t); | ||||
extern void iicbus_intr(device_t, int, char *); | extern void iicbus_intr(device_t, int, char *); | ||||
extern int iicbus_null_repeated_start(device_t, u_char); | extern int iicbus_null_repeated_start(device_t, u_char); | ||||
extern int iicbus_null_callback(device_t, int, caddr_t); | extern int iicbus_null_callback(device_t, int, caddr_t); | ||||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |