45 if ((drv) && (drv->dma_req)) {
46 rc = drv->dma_req(soc, ch);
75 if ((drv) && (drv->dma_rls)) {
76 rc = drv->dma_rls(soc, ch);
104#if defined(XWCDCFG_ds_SOC_DMA_ROCBT) && (1 == XWCDCFG_ds_SOC_DMA_ROCBT)
108 if (soc->dma.chcbs) {
109 soc->dma.chcbs[ch] = cb;
111 if (soc->dma.chcbargs) {
112 soc->dma.chcbargs[ch] = arg;
116 if ((drv) && (drv->dma_cfg)) {
117 rc = drv->dma_cfg(soc, ch, cfg);
119 goto err_drv_dma_cfg;
125#if !defined(XWCDCFG_ds_SOC_DMA_ROCBT) || (1 != XWCDCFG_ds_SOC_DMA_ROCBT)
126 if (soc->dma.chcbs) {
127 soc->dma.chcbs[ch] =
NULL;
129 if (soc->dma.chcbargs) {
130 soc->dma.chcbargs[ch] =
NULL;
151 if ((drv) && (drv->dma_enable)) {
152 rc = drv->dma_enable(soc, ch);
154 goto err_drv_dma_enable;
178 if ((drv) && (drv->dma_disable)) {
179 rc = drv->dma_disable(soc, ch);
181 goto err_drv_dma_disable;
205 if ((drv) && (drv->dma_start)) {
206 rc = drv->dma_start(soc, ch);
208 goto err_drv_dma_start;
232 if ((drv) && (drv->dma_stop)) {
233 rc = drv->dma_stop(soc, ch);
235 goto err_drv_dma_stop;
xwer_t xwds_dma_disable(struct xwds_soc *soc, xwid_t ch)
XWDS API:关闭DMA的通道
xwer_t xwds_dma_start(struct xwds_soc *soc, xwid_t ch)
XWDS API:启动DMA的通道
xwer_t xwds_dma_req(struct xwds_soc *soc, xwid_t ch)
XWDS API:申请DMA的通道
xwer_t xwds_dma_cfg(struct xwds_soc *soc, xwid_t ch, void *cfg, xwds_dma_f cb, xwds_dma_cbarg_t arg)
XWDS API:配置DMA的通道
xwer_t xwds_dma_rls(struct xwds_soc *soc, xwid_t ch)
XWDS API:释放DMA的通道
xwer_t xwds_dma_enable(struct xwds_soc *soc, xwid_t ch)
XWDS API:打开DMA的通道
xwer_t xwds_dma_stop(struct xwds_soc *soc, xwid_t ch)
XWDS API:停止DMA的通道
xwer_t xwds_soc_grab(struct xwds_soc *soc)
XWDS API:增加对象的引用计数
void * xwds_dma_cbarg_t
DMA完成回调函数参数
void(* xwds_dma_f)(struct xwds_soc *, xwid_t, xwu32_t, xwds_dma_cbarg_t)
DMA完成回调函数类型
xwer_t xwds_soc_put(struct xwds_soc *soc)
XWDS API:减少对象的引用计数
#define xwds_cast(type, dev)
#define XWDS_VALIDATE(exp, errstr,...)
#define EFAULT
Bad address
#define EBUSY
Device or resource busy
#define ERANGE
Result too large
#define EPERM
Operation not permitted
bool xwbmpaop_t1i(atomic_xwbmp_t *bmp, xwsq_t idx)
XWOS AOPLIB:测试位图中的某位是否被置1
void xwbmpaop_c0i(atomic_xwbmp_t *bmp, xwsq_t idx)
XWOS AOPLIB:将位图中某位清0
xwer_t xwbmpaop_t0i_then_s1i(atomic_xwbmp_t *bmp, xwsq_t idx)
XWOS AOPLIB:测试位图中某位是否为0,如果是,就将它置1
void xwbmpaop_s1i(atomic_xwbmp_t *bmp, xwsq_t idx)
XWOS AOPLIB:将位图中某位置1
const struct xwds_driver * drv