include/zephyr/drivers/dma.h
/**
 * @brief get current runtime status of DMA transfer
 *
 * Implementations must check the validity of the channel ID passed in and
 * return -EINVAL if it is invalid or -ENOSYS if not supported.
 *
 * @param dev     Pointer to the device structure for the driver instance.
 * @param channel Numeric identification of the channel where the transfer was
 *                being processed
 * @param stat   a non-NULL dma_status object for storing DMA status
 *
 * @retval non-negative if successful.
 * @retval Negative errno code if failure.
 */
@brief get current runtime status of DMA transfer
Implementations must check the validity of the channel ID passed in and
return -EINVAL if it is invalid or -ENOSYS if not supported.

@param dev     Pointer to the device structure for the driver instance.
@param channel Numeric identification of the channel where the transfer was
being processed
@param stat   a non-NULL dma_status object for storing DMA status

@retval non-negative if successful.
@retval Negative errno code if failure.
@brief get current runtime status of DMA transfer Implementations must check the validity of the channel ID passed in and return - EINVAL if it is invalid or - ENOSYS if not supported . @param dev Pointer to the device structure for the driver instance . @param channel Numeric identification of the channel where the transfer was being processed @param stat a non - NULL dma_status object for storing DMA status @retval non - negative if successful . @retval Negative errno code if failure .
static inline int dma_get_status(const struct device *dev, uint32_t channel,
				 struct dma_status *stat)
{
	const struct dma_driver_api *api =
		(const struct dma_driver_api *)dev->api;
	if (api->get_status) {
		return api->get_status(dev, channel, stat);
	}
	return -ENOSYS;
}
static inline int dma_get_status ( const struct device * dev , uint32_t channel , struct dma_status * stat ) { const struct dma_driver_api * api = ( const struct dma_driver_api * ) dev -> api ; if ( api -> get_status ) { return api -> get_status ( dev , channel , stat ) ; } return - ENOSYS ; }
@brief get current runtime status of DMA transfer
 Implementations must check the validity of the channel ID passed in and
 return -EINVAL if it is invalid or -ENOSYS if not supported.
@brief get current runtime status of DMA transfer Implementations must check the validity of the channel ID passed in and return - EINVAL if it is invalid or - ENOSYS if not supported .