RTEMS 6.1-rc6
|
Freescale / NXP Enhanced Direct Memory Access (eDMA). More...
Go to the source code of this file.
Data Structures | |
struct | fsl_edma_channel_context |
Macros | |
#define | EDMA_CHANNEL_COUNT 64U |
#define | EDMA_MODULE_COUNT ((EDMA_CHANNEL_COUNT + 63U) / 64U) |
#define | EDMA_CHANNELS_PER_MODULE 64U |
Typedefs | |
typedef struct fsl_edma_channel_context | fsl_edma_channel_context |
Functions | |
volatile struct fsl_edma_tcd * | fsl_edma_tcd_of_channel_index (unsigned index) |
unsigned | fsl_edma_channel_index_of_tcd (volatile struct fsl_edma_tcd *edma_tcd) |
void | fsl_edma_init (void) |
rtems_status_code | fsl_edma_obtain_channel_by_tcd (volatile struct fsl_edma_tcd *edma_tcd) |
Obtains an eDMA channel. | |
void | fsl_edma_release_channel_by_tcd (volatile struct fsl_edma_tcd *edma_tcd) |
rtems_status_code | fsl_edma_obtain_channel (fsl_edma_channel_context *ctx, unsigned irq_priority) |
Obtains a specific eDMA channel and registers the channel context. | |
rtems_status_code | fsl_edma_obtain_next_free_channel (fsl_edma_channel_context *ctx) |
Obtains a free eDMA channel and registers the channel context. | |
void | fsl_edma_release_channel (fsl_edma_channel_context *ctx) |
void | fsl_edma_copy (volatile struct fsl_edma_tcd *edma_tcd, const struct fsl_edma_tcd *source_tcd) |
Copies a source TCD to an eDMA TCD. | |
void | fsl_edma_copy_and_enable_hardware_requests (volatile struct fsl_edma_tcd *edma_tcd, const struct fsl_edma_tcd *source_tcd) |
Copies a source TCD to an eDMA TCD and enables hardware requests. | |
void | fsl_edma_sg_link (volatile struct fsl_edma_tcd *edma_tcd, const struct fsl_edma_tcd *source_tcd) |
Freescale / NXP Enhanced Direct Memory Access (eDMA).
void fsl_edma_copy | ( | volatile struct fsl_edma_tcd * | edma_tcd, |
const struct fsl_edma_tcd * | source_tcd | ||
) |
Copies a source TCD to an eDMA TCD.
The DONE flag of the eDMA TCD is cleared before the actual copy operation. This enables the setting of channel link or scatter/gather options.
This function can be used to start the channel if the START flags is set in the source TCD.
void fsl_edma_copy_and_enable_hardware_requests | ( | volatile struct fsl_edma_tcd * | edma_tcd, |
const struct fsl_edma_tcd * | source_tcd | ||
) |
Copies a source TCD to an eDMA TCD and enables hardware requests.
The DONE flag of the eDMA TCD is cleared before the actual copy operation. This enables the setting of channel link or scatter/gather options.
rtems_status_code fsl_edma_obtain_channel | ( | fsl_edma_channel_context * | ctx, |
unsigned | irq_priority | ||
) |
Obtains a specific eDMA channel and registers the channel context.
Tries to obtain the channel specified in the ctx.
irq_priority will be ignored on all targets but MPC55xx based ones.
The done handler of the channel context will be called
An error status value not equal to zero indicates an error.
RTEMS_SUCCESSFUL | Successful operation. |
RTEMS_RESOURCE_IN_USE | The channel is already in use. |
RTEMS_IO_ERROR | Unable to install interrupt handler for this channel. |
rtems_status_code fsl_edma_obtain_channel_by_tcd | ( | volatile struct fsl_edma_tcd * | edma_tcd | ) |
Obtains an eDMA channel.
RTEMS_SUCCESSFUL | Successful operation. |
RTEMS_RESOURCE_IN_USE | The channel is already in use. |
rtems_status_code fsl_edma_obtain_next_free_channel | ( | fsl_edma_channel_context * | ctx | ) |
Obtains a free eDMA channel and registers the channel context.
Tries to obtain the next free DMA channel. The tcd field of ctx will be set accordingly.
The done handler of the channel context will be called
An error status value not equal to zero indicates an error.
RTEMS_SUCCESSFUL | Successful operation. |
RTEMS_RESOURCE_IN_USE | No channels left. |
RTEMS_IO_ERROR | Unable to install interrupt handler. |