Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
DMA Driver Backend API

Data Structures

struct  dma_driver_api
  Driver Operations DMA driver operations More...

Typedefs

typedef int(* dma_api_config) (const struct device *dev, uint32_t channel, struct dma_config *config)
 Configure individual channel for DMA transfer.
typedef int(* dma_api_reload) (const struct device *dev, uint32_t channel, uint32_t src, uint32_t dst, size_t size)
 Reload buffer(s) for a DMA channel.
typedef int(* dma_api_start) (const struct device *dev, uint32_t channel)
 Enable DMA channel and start the transfer.
typedef int(* dma_api_stop) (const struct device *dev, uint32_t channel)
 Stop the DMA transfer and disable the channel.
typedef int(* dma_api_suspend) (const struct device *dev, uint32_t channel)
 Suspend a DMA channel transfer.
typedef int(* dma_api_resume) (const struct device *dev, uint32_t channel)
 Resume a DMA channel transfer.
typedef int(* dma_api_get_status) (const struct device *dev, uint32_t channel, struct dma_status *status)
 Get current runtime status of DMA transfer.
typedef int(* dma_api_get_attribute) (const struct device *dev, uint32_t type, uint32_t *value)
 Get attribute of a DMA controller.
typedef bool(* dma_api_chan_filter) (const struct device *dev, int channel, void *filter_param)
 channel filter function call
typedef void(* dma_api_chan_release) (const struct device *dev, uint32_t channel)
 channel release function call

Detailed Description

This group contains the API type definitions, callback signatures, and other helpers required to implement a DMA driver.

Typedef Documentation

◆ dma_api_chan_filter

typedef bool(* dma_api_chan_filter) (const struct device *dev, int channel, void *filter_param)

#include <zephyr/drivers/dma.h>

channel filter function call

filter function that is used to find the matched internal dma channel provide by caller

Parameters
devPointer to the DMA device instance
channelthe channel id to use
filter_paramfilter function parameter, can be NULL
Returns
True on filter matched otherwise return False.

◆ dma_api_chan_release

typedef void(* dma_api_chan_release) (const struct device *dev, uint32_t channel)

#include <zephyr/drivers/dma.h>

channel release function call

used to release channel resources "allocated" during the request phase. These resources can refer to enabled PDs, IRQs etc...

Parameters
devPointer to the DMA device instance
channelchannel id to use

◆ dma_api_config

typedef int(* dma_api_config) (const struct device *dev, uint32_t channel, struct dma_config *config)

#include <zephyr/drivers/dma.h>

Configure individual channel for DMA transfer.

See dma_config() for argument descriptions.

◆ dma_api_get_attribute

typedef int(* dma_api_get_attribute) (const struct device *dev, uint32_t type, uint32_t *value)

#include <zephyr/drivers/dma.h>

Get attribute of a DMA controller.

See dma_get_attribute() for argument descriptions.

◆ dma_api_get_status

typedef int(* dma_api_get_status) (const struct device *dev, uint32_t channel, struct dma_status *status)

#include <zephyr/drivers/dma.h>

Get current runtime status of DMA transfer.

See dma_get_status() for argument descriptions.

◆ dma_api_reload

typedef int(* dma_api_reload) (const struct device *dev, uint32_t channel, uint32_t src, uint32_t dst, size_t size)

#include <zephyr/drivers/dma.h>

Reload buffer(s) for a DMA channel.

See dma_reload() for argument descriptions.

◆ dma_api_resume

typedef int(* dma_api_resume) (const struct device *dev, uint32_t channel)

#include <zephyr/drivers/dma.h>

Resume a DMA channel transfer.

See dma_resume() for argument descriptions.

◆ dma_api_start

typedef int(* dma_api_start) (const struct device *dev, uint32_t channel)

#include <zephyr/drivers/dma.h>

Enable DMA channel and start the transfer.

See dma_start() for argument descriptions.

◆ dma_api_stop

typedef int(* dma_api_stop) (const struct device *dev, uint32_t channel)

#include <zephyr/drivers/dma.h>

Stop the DMA transfer and disable the channel.

See dma_stop() for argument descriptions.

◆ dma_api_suspend

typedef int(* dma_api_suspend) (const struct device *dev, uint32_t channel)

#include <zephyr/drivers/dma.h>

Suspend a DMA channel transfer.

See dma_suspend() for argument descriptions.