Lines Matching refs:channel

36 	uint32_t channel;  in dma_sam0_isr()  local
41 channel = (pend & DMAC_INTPEND_ID_Msk) >> DMAC_INTPEND_ID_Pos; in dma_sam0_isr()
42 chdata = &data->channels[channel]; in dma_sam0_isr()
47 channel, -DMAC_INTPEND_TERR); in dma_sam0_isr()
51 chdata->cb(dev, chdata->user_data, channel, 0); in dma_sam0_isr()
62 static int dma_sam0_config(const struct device *dev, uint32_t channel, in dma_sam0_config() argument
66 DmacDescriptor *desc = &data->descriptors[channel]; in dma_sam0_config()
72 if (channel >= DMAC_CH_NUM) { in dma_sam0_config()
101 DMA_REGS->CHID.reg = DMAC_CHID_ID(channel); in dma_sam0_config()
137 DmacChannel * chcfg = &DMA_REGS->Channel[channel]; in dma_sam0_config()
246 channel_control = &data->channels[channel]; in dma_sam0_config()
251 channel, in dma_sam0_config()
264 static int dma_sam0_start(const struct device *dev, uint32_t channel) in dma_sam0_start() argument
271 DMA_REGS->CHID.reg = channel; in dma_sam0_start()
276 DMA_REGS->SWTRIGCTRL.reg = 1U << channel; in dma_sam0_start()
280 DmacChannel * chcfg = &DMA_REGS->Channel[channel]; in dma_sam0_start()
286 DMA_REGS->SWTRIGCTRL.reg = 1U << channel; in dma_sam0_start()
295 static int dma_sam0_stop(const struct device *dev, uint32_t channel) in dma_sam0_stop() argument
302 DMA_REGS->CHID.reg = channel; in dma_sam0_stop()
305 DmacChannel * chcfg = &DMA_REGS->Channel[channel]; in dma_sam0_stop()
315 static int dma_sam0_reload(const struct device *dev, uint32_t channel, in dma_sam0_reload() argument
319 DmacDescriptor *desc = &data->descriptors[channel]; in dma_sam0_reload()
349 channel, src, dst, size); in dma_sam0_reload()
359 static int dma_sam0_get_status(const struct device *dev, uint32_t channel, in dma_sam0_get_status() argument
365 if (channel >= DMAC_CH_NUM || stat == NULL) { in dma_sam0_get_status()
371 ((act & DMAC_ACTIVE_ID_Msk) >> DMAC_ACTIVE_ID_Pos) == channel) { in dma_sam0_get_status()
377 stat->pending_length = data->descriptors_wb[channel].BTCNT.reg; in dma_sam0_get_status()
380 switch (data->descriptors[channel].BTCTRL.bit.BEATSIZE) { in dma_sam0_get_status()