243{
246
248
250 if (rc < 0) {
251 goto err_i2cm_grab;
252 }
254 if (rc < 0) {
255 goto err_i2cm_lock;
256 }
258 if ((drv) && (drv->
abort)) {
259 rc = drv->
abort(i2cm, address, addrmode, to);
260 } else {
262 }
263 if (rc < 0) {
264 goto err_drv_abort;
265 }
269
270err_drv_abort:
272err_i2cm_lock:
274err_i2cm_grab:
275 return rc;
276}
xwer_t xwds_i2cm_put(struct xwds_i2cm *i2cm)
XWDS API:减少对象的引用计数
xwer_t xwds_i2cm_grab(struct xwds_i2cm *i2cm)
XWDS API:增加对象的引用计数
#define xwds_cast(type, dev)
#define XWDS_VALIDATE(exp, errstr,...)
#define EFAULT
Bad address
#define ENOSYS
Function not implemented
static xwer_t xwos_mtx_lock_to(struct xwos_mtx *mtx, xwtm_t to)
XWOS API:限时等待上锁互斥锁
static xwer_t xwos_mtx_unlock(struct xwos_mtx *mtx)
XWOS API:解锁互斥锁
const struct xwds_driver * drv
xwer_t(* abort)(struct xwds_i2cm *, xwu16_t, xwu16_t, xwtm_t)
struct xwds_i2cm::@18 abort