Lines Matching refs:channel
77 static int max32_dma_config(const struct device *dev, uint32_t channel, struct dma_config *config) in max32_dma_config() argument
84 if (channel >= cfg->channels) { in max32_dma_config()
86 channel); in max32_dma_config()
90 ch = max32_dma_ch_index(cfg->regs, channel); in max32_dma_config()
149 data[channel].callback = config->dma_callback; in max32_dma_config()
150 data[channel].cb_data = config->user_data; in max32_dma_config()
151 data[channel].err_cb_dis = config->error_callback_dis; in max32_dma_config()
156 static int max32_dma_reload(const struct device *dev, uint32_t channel, uint32_t src, uint32_t dst, in max32_dma_reload() argument
163 if (channel >= cfg->channels) { in max32_dma_reload()
165 channel); in max32_dma_reload()
169 channel = max32_dma_ch_index(cfg->regs, channel); in max32_dma_reload()
170 flags = MXC_DMA_ChannelGetFlags(channel); in max32_dma_reload()
175 reload.ch = channel; in max32_dma_reload()
182 static int max32_dma_start(const struct device *dev, uint32_t channel) in max32_dma_start() argument
187 if (channel >= cfg->channels) { in max32_dma_start()
189 channel); in max32_dma_start()
193 channel = max32_dma_ch_index(cfg->regs, channel); in max32_dma_start()
194 flags = MXC_DMA_ChannelGetFlags(channel); in max32_dma_start()
199 return MXC_DMA_Start(channel); in max32_dma_start()
202 static int max32_dma_stop(const struct device *dev, uint32_t channel) in max32_dma_stop() argument
206 if (channel >= cfg->channels) { in max32_dma_stop()
208 channel); in max32_dma_stop()
212 channel = max32_dma_ch_index(cfg->regs, channel); in max32_dma_stop()
214 return MXC_DMA_Stop(channel); in max32_dma_stop()
217 static int max32_dma_get_status(const struct device *dev, uint32_t channel, struct dma_status *stat) in max32_dma_get_status() argument
224 if (channel >= cfg->channels) { in max32_dma_get_status()
226 channel); in max32_dma_get_status()
230 channel = max32_dma_ch_index(cfg->regs, channel); in max32_dma_get_status()
231 txfer.ch = channel; in max32_dma_get_status()
233 flags = MXC_DMA_ChannelGetFlags(channel); in max32_dma_get_status()