This driver interfaces the MDMA (Memory Direct Memory Access Controller) which performs memory-to-memory transfers with as little CPU intervention as possible.
|
int | mdma_channels_is_enable (volatile avr32_mdma_t *mdma, U32 channels) |
| Check if a DMA Transfer for a Channel is enable. More...
|
|
void | mdma_configure_interrupts (volatile avr32_mdma_t *mdma, const mdma_interrupt_t *bitfield) |
| Enables various MDMA interrupts. More...
|
|
void | mdma_descriptor_mode_xfert_init (volatile avr32_mdma_t *mdma, U32 channel, U32 *start_adress) |
| Init a Descriptor Mode Transfer for a Channel. More...
|
|
unsigned long | mdma_get_interrupt_settings (volatile avr32_mdma_t *mdma) |
| MDMA interrupt settings. More...
|
|
void | mdma_single_mode_xfert_init (volatile avr32_mdma_t *mdma, U32 channel, const mdma_opt_t *opt, U32 *src, U32 *dest) |
| Init a Single Mode Transfer for a Channel. More...
|
|
void | mdma_start_descriptor_xfert (volatile avr32_mdma_t *mdma, U32 channels, U8 arbitration) |
| Start a Descriptor DMA Transfer for a Channel. More...
|
|
void | mdma_start_single_xfert (volatile avr32_mdma_t *mdma, U32 channels, U8 arbitration) |
| Start a Single DMA Transfer for a Channel. More...
|
|
int | mdma_stop_channels (volatile avr32_mdma_t *mdma, U32 channels) |
| Stop a DMA Transfer for a Channel. More...
|
|
#define MDMA_16_BEAT_BURST (3) |
#define MDMA_4_BEAT_BURST (1) |
#define MDMA_8_BEAT_BURST (2) |
#define MDMA_DEFAULT_TIMEOUT 10000 |
#define MDMA_DESCRIPTOR_MODE (1) |
#define MDMA_FIXED_PRIORITY_MODE (0) |
#define MDMA_INVALID_ARGUMENT (-1) |
MDMA driver functions return value in case of invalid argument(s).
#define MDMA_ROUND_ROBIN_MODE (1) |
#define MDMA_SINGLE_TRANSFER_BURST (0) |
#define MDMA_SINGLE_TRANSFERT_MODE (0) |
#define MDMA_TRANSFERT_SIZE_BYTE (0) |
#define MDMA_TRANSFERT_SIZE_HLFW (1) |
#define MDMA_TRANSFERT_SIZE_WORD (2) |
int mdma_channels_is_enable |
( |
volatile avr32_mdma_t * |
mdma, |
|
|
U32 |
channels |
|
) |
| |
Check if a DMA Transfer for a Channel is enable.
- Parameters
-
mdma | Pointer to the MDMA instance to access. |
channels | MDMA Channel to check |
- Return values
-
MDMA_SUCCESS | if channel is enable. |
MDMA_FAILURE | if channel is disable. |
References MDMA_FAILURE, and MDMA_SUCCESS.
void mdma_configure_interrupts |
( |
volatile avr32_mdma_t * |
mdma, |
|
|
const mdma_interrupt_t * |
bitfield |
|
) |
| |
Enables various MDMA interrupts.
- Parameters
-
mdma | Pointer to the MDMA instance to access. |
bitfield | The interrupt enable configuration. |
References mdma_interrupt_t::berr0, mdma_interrupt_t::berr1, mdma_interrupt_t::berr2, mdma_interrupt_t::berr3, mdma_interrupt_t::ch0c, mdma_interrupt_t::ch1c, mdma_interrupt_t::ch2c, mdma_interrupt_t::ch3c, Disable_global_interrupt, Enable_global_interrupt, and Is_global_interrupt_enabled.
Referenced by main().
void mdma_descriptor_mode_xfert_init |
( |
volatile avr32_mdma_t * |
mdma, |
|
|
U32 |
channel, |
|
|
U32 * |
start_adress |
|
) |
| |
Init a Descriptor Mode Transfer for a Channel.
- Parameters
-
mdma | Pointer to the MDMA instance to access. |
channel | MDMA Channel To configure |
start_adress | Start address of the buffer |
Referenced by main().
unsigned long mdma_get_interrupt_settings |
( |
volatile avr32_mdma_t * |
mdma | ) |
|
MDMA interrupt settings.
- Parameters
-
mdma | Pointer to the MDMA instance to access. |
- Return values
-
>=0 | The interrupt enable configuration organized according to mdma_interrupt_t. |
Interrupt | Settings. |
void mdma_single_mode_xfert_init |
( |
volatile avr32_mdma_t * |
mdma, |
|
|
U32 |
channel, |
|
|
const mdma_opt_t * |
opt, |
|
|
U32 * |
src, |
|
|
U32 * |
dest |
|
) |
| |
void mdma_start_descriptor_xfert |
( |
volatile avr32_mdma_t * |
mdma, |
|
|
U32 |
channels, |
|
|
U8 |
arbitration |
|
) |
| |
Start a Descriptor DMA Transfer for a Channel.
- Parameters
-
mdma | Pointer to the MDMA instance to access. |
channels | MDMA Channel To configure |
arbitration | Pointer to the MDMA option. |
References MDMA_DESCRIPTOR_MODE.
Referenced by main().
void mdma_start_single_xfert |
( |
volatile avr32_mdma_t * |
mdma, |
|
|
U32 |
channels, |
|
|
U8 |
arbitration |
|
) |
| |
Start a Single DMA Transfer for a Channel.
- Parameters
-
mdma | Pointer to the MDMA instance to access. |
channels | MDMA Channel To configure |
arbitration | Pointer to the MDMA option. |
int mdma_stop_channels |
( |
volatile avr32_mdma_t * |
mdma, |
|
|
U32 |
channels |
|
) |
| |
Stop a DMA Transfer for a Channel.
- Parameters
-
mdma | Pointer to the MDMA instance to access. |
channels | MDMA Channel To configure |
- Return values
-
MDMA_FAILURE | Timeout has expired/ MDMA_SUCCESS success. |
References MDMA_DEFAULT_TIMEOUT, MDMA_FAILURE, and MDMA_SUCCESS.