Lines Matching refs:channel
86 uint32_t channel = handle->channel; in nxp_lpc_dma_callback() local
96 data->busy = DMA_ChannelIsBusy(data->dma_handle.base, channel); in nxp_lpc_dma_callback()
99 data->dma_callback(data->dev, data->user_data, channel, ret); in nxp_lpc_dma_callback()
325 static int dma_mcux_lpc_configure(const struct device *dev, uint32_t channel, in dma_mcux_lpc_configure() argument
378 LOG_ERR("out of DMA channel %d", channel); in dma_mcux_lpc_configure()
383 if (channel >= dev_config->num_of_channels) { in dma_mcux_lpc_configure()
384 LOG_ERR("invalid DMA channel number %d", channel); in dma_mcux_lpc_configure()
468 if (dma_data->channel_index[channel] == -1) { in dma_mcux_lpc_configure()
469 dma_data->channel_index[channel] = dma_data->num_channels_used; in dma_mcux_lpc_configure()
472 virtual_channel = dma_data->channel_index[channel]; in dma_mcux_lpc_configure()
477 DMA_CreateHandle(p_handle, DEV_BASE(dev), channel); in dma_mcux_lpc_configure()
481 virtual_channel = dma_data->channel_index[channel]; in dma_mcux_lpc_configure()
498 LOG_DBG("channel is %d", p_handle->channel); in dma_mcux_lpc_configure()
515 channel, config->linked_channel); in dma_mcux_lpc_configure()
521 dma_data->otrig_array[otrig_index].source_channel == channel) { in dma_mcux_lpc_configure()
522 if (dma_data->otrig_array[otrig_index].source_channel == channel) { in dma_mcux_lpc_configure()
552 dev_config->otrig_base_address + channel); in dma_mcux_lpc_configure()
557 dma_data->otrig_array[otrig_index].source_channel = channel; in dma_mcux_lpc_configure()
563 (channel == dma_data->otrig_array[otrig_index].source_channel)) { in dma_mcux_lpc_configure()
711 p_handle->base->CHANNEL[p_handle->channel].CFG = cfg_reg; in dma_mcux_lpc_configure()
713 DMA_EnableChannelPeriphRq(p_handle->base, p_handle->channel); in dma_mcux_lpc_configure()
715 DMA_DisableChannelPeriphRq(p_handle->base, p_handle->channel); in dma_mcux_lpc_configure()
717 DMA_SetChannelPriority(p_handle->base, p_handle->channel, config->channel_priority); in dma_mcux_lpc_configure()
721 LOG_DBG("INSTALL call back on channel %d", channel); in dma_mcux_lpc_configure()
730 static int dma_mcux_lpc_start(const struct device *dev, uint32_t channel) in dma_mcux_lpc_start() argument
733 int8_t virtual_channel = dev_data->channel_index[channel]; in dma_mcux_lpc_start()
743 static int dma_mcux_lpc_stop(const struct device *dev, uint32_t channel) in dma_mcux_lpc_stop() argument
746 int8_t virtual_channel = dev_data->channel_index[channel]; in dma_mcux_lpc_stop()
753 DMA_DisableChannel(DEV_BASE(dev), channel); in dma_mcux_lpc_stop()
759 static int dma_mcux_lpc_reload(const struct device *dev, uint32_t channel, in dma_mcux_lpc_reload() argument
763 int8_t virtual_channel = dev_data->channel_index[channel]; in dma_mcux_lpc_reload()
801 static int dma_mcux_lpc_get_status(const struct device *dev, uint32_t channel, in dma_mcux_lpc_get_status() argument
806 int8_t virtual_channel = dev_data->channel_index[channel]; in dma_mcux_lpc_get_status()
809 if (channel > config->num_of_channels) { in dma_mcux_lpc_get_status()
816 status->pending_length = DMA_GetRemainingBytes(DEV_BASE(dev), channel); in dma_mcux_lpc_get_status()