39 if ((drv) && (drv->dma_req)) {
40 rc = drv->dma_req(soc, ch);
63 if ((drv) && (drv->dma_rls)) {
64 rc = drv->dma_rls(soc, ch);
86#if defined(XWCDCFG_ds_SOC_DMA_ROCBT) && (1 == XWCDCFG_ds_SOC_DMA_ROCBT)
91 soc->dma.chcbs[ch] = cb;
93 if (soc->dma.chcbargs) {
94 soc->dma.chcbargs[ch] = arg;
98 if ((drv) && (drv->dma_cfg)) {
99 rc = drv->dma_cfg(soc, ch, cfg);
101 goto err_drv_dma_cfg;
107#if !defined(XWCDCFG_ds_SOC_DMA_ROCBT) || (1 != XWCDCFG_ds_SOC_DMA_ROCBT)
108 if (soc->dma.chcbs) {
109 soc->dma.chcbs[ch] =
NULL;
111 if (soc->dma.chcbargs) {
112 soc->dma.chcbargs[ch] =
NULL;
128 if ((drv) && (drv->dma_enable)) {
129 rc = drv->dma_enable(soc, ch);
131 goto err_drv_dma_enable;
150 if ((drv) && (drv->dma_disable)) {
151 rc = drv->dma_disable(soc, ch);
153 goto err_drv_dma_disable;
172 if ((drv) && (drv->dma_start)) {
173 rc = drv->dma_start(soc, ch);
175 goto err_drv_dma_start;
194 if ((drv) && (drv->dma_stop)) {
195 rc = drv->dma_stop(soc, ch);
197 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 ERANGE
Result too large
const struct xwds_driver * drv