40#if defined(XWCDCFG_ds_PM) && (1 == XWCDCFG_ds_PM)
73 if ((drv) && (drv->
probe)) {
92 if ((drv) && (drv->
remove)) {
111 if ((drv) && (drv->
start)) {
112 rc = drv->
start(dev);
130 if ((drv) && (drv->
stop)) {
138#if defined(XWCDCFG_ds_PM) && (1 == XWCDCFG_ds_PM)
169 if ((drv) && (drv->
resume)) {
202 goto err_dev_vop_remove;
230 if (vop && vop->
probe) {
231 rc = vop->
probe(dev);
236 goto err_dev_vop_probe;
242 goto err_xwds_obj_add;
249 if ((vop) && (vop->
remove)) {
284 if (vop && vop->
start) {
285 rc = vop->
start(dev);
290 goto err_dev_vop_start;
316 if (vop && vop->
stop) {
322 goto err_dev_vop_stop;
332#if defined(XWCDCFG_ds_PM) && (1 == XWCDCFG_ds_PM)
343 goto err_obj_suspend;
355 goto err_dev_vop_suspend;
387 goto err_dev_vop_resume;
xwer_t xwds_device_gc(void *obj)
const struct xwds_virtual_operation xwds_dev_vop
实现面向对象“多态”的函数表
xwer_t xwds_device_vop_start(struct xwds_device *dev)
设备基本操作函数:启动设备
xwer_t xwds_device_suspend_all(struct xwds *ds, bool ign_err)
XWDS API:暂停所有设备
void xwds_device_construct(struct xwds_device *dev)
XWDS API:设备的构造函数
void xwds_device_destruct(struct xwds_device *dev)
XWDS API:设备的析构函数
#define xwds_itr_next_device_safe(ds, p, n)
向前迭代每个设备(可安全删除设备)
xwer_t xwds_device_probe(struct xwds *ds, struct xwds_device *dev, xwobj_gc_f gcfunc)
XWDS API:探测设备
xwer_t xwds_device_stop(struct xwds_device *dev)
XWDS API:停止设备
xwer_t xwds_device_resume_all(struct xwds *ds, bool ign_err)
XWDS API:继续所有设备
xwer_t xwds_device_vop_stop(struct xwds_device *dev)
设备基本操作函数:停止设备
xwer_t xwds_device_suspend(struct xwds_device *dev)
XWDS API:暂停设备
#define xwds_itr_prev_device_safe(ds, p, n)
向后迭代每个设备(可安全删除设备)
xwer_t xwds_device_vop_remove(struct xwds_device *dev)
设备基本操作函数:删除设备
xwer_t xwds_device_remove(struct xwds_device *dev)
XWDS API:删除设备
xwer_t xwds_device_vop_resume(struct xwds_device *dev)
设备基本操作函数:继续设备
xwer_t xwds_device_resume(struct xwds_device *dev)
XWDS API:继续设备
xwer_t xwds_device_start(struct xwds_device *dev)
XWDS API:启动设备
xwer_t xwds_device_vop_probe(struct xwds_device *dev)
设备基本操作函数:探测设备
xwer_t xwds_device_vop_suspend(struct xwds_device *dev)
设备基本操作函数:暂停设备
xwer_t xwds_obj_add(struct xwds *ds, struct xwds_object *obj)
xwer_t xwds_obj_probe(struct xwds_object *obj, xwobj_gc_f gcfunc)
xwer_t xwds_obj_remove(struct xwds_object *obj)
void xwds_obj_destruct(struct xwds_object *obj)
void xwds_obj_construct(struct xwds_object *obj)
xwer_t xwds_obj_del(struct xwds *ds, struct xwds_object *obj)
xwer_t xwds_obj_start(struct xwds_object *obj)
xwer_t xwds_obj_resume(struct xwds_object *obj)
xwer_t xwds_obj_suspend(struct xwds_object *obj)
xwer_t xwds_obj_stop(struct xwds_object *obj)
#define XWDS_VALIDATE(exp, errstr,...)
#define EFAULT
Bad address
xwer_t xwos_object_rawput(struct xwos_object *obj)
减少对象的引用计数,不触发垃圾回收函数
xwer_t(* xwobj_gc_f)(struct xwos_object *)
垃圾回收函数指针类型
static void xwos_sqlk_wr_lock_cpuirqsv(struct xwos_sqlk *sql, xwreg_t *cpuirq)
XWOS API:开启写临界区,保存本地CPU的中断标志并关闭
static void xwos_sqlk_wr_unlock_cpuirqrs(struct xwos_sqlk *sql, xwreg_t cpuirq)
XWOS API:关闭写临界区,恢复本地CPU的中断标志
const struct xwds_driver * drv
const struct xwds_virtual_operation * vop
xwer_t(* start)(struct xwds_device *)
xwer_t(* resume)(struct xwds_device *)
xwer_t(* probe)(struct xwds_device *)
xwer_t(* suspend)(struct xwds_device *)
xwer_t(* stop)(struct xwds_device *)
xwer_t(* remove)(struct xwds_device *)
xwer_t(* suspend)(struct xwds_device *)
xwer_t(* start)(struct xwds_device *)
xwer_t(* stop)(struct xwds_device *)
xwer_t(* remove)(struct xwds_device *)
xwer_t(* probe)(struct xwds_device *)
xwer_t(* resume)(struct xwds_device *)
struct xwos_sqlk devlistlock