SAM Direct Memory Access Controller driver example.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | BLOCK_LEN 16 |
Block length for single transfer. More... | |
#define | BUFFER_SIZE 512 |
The buffer size for transfer. More... | |
#define | MICROBLOCK_LEN 16 |
Micro-block length for single transfer. More... | |
#define | XDMA_CH 0 |
XDMA channel used in this example. More... | |
Functions | |
static void | configure_console (void) |
Configure the console UART. More... | |
int | main (void) |
Application entry point. More... | |
void | XDMAC_Handler (void) |
XDMAC interrupt handler. More... | |
Variables | |
static uint8_t | dst_buf [BUFFER_SIZE] |
volatile uint32_t | g_xfer_done = 0 |
static COMPILER_WORD_ALIGNED lld_view0 | lld [2] |
Linked list descriptor. More... | |
static uint8_t | src_buf [BUFFER_SIZE] |
static xdmac_channel_config_t | xdmac_channel_cfg |
XDMA channel configuration. More... | |
#define BLOCK_LEN 16 |
Block length for single transfer.
Referenced by main().
#define BUFFER_SIZE 512 |
The buffer size for transfer.
Referenced by main().
#define MICROBLOCK_LEN 16 |
Micro-block length for single transfer.
Referenced by main().
#define XDMA_CH 0 |
XDMA channel used in this example.
Referenced by main(), and XDMAC_Handler().
|
static |
Configure the console UART.
References uart_rs232_options::baudrate, CONF_UART, CONF_UART_BAUDRATE, CONF_UART_CHAR_LENGTH, CONF_UART_PARITY, CONF_UART_STOP_BITS, CONSOLE_UART_ID, stdio_serial_init(), and sysclk_enable_peripheral_clock().
Referenced by main().
int main | ( | void | ) |
Application entry point.
References BLOCK_LEN, board_init(), BOARD_NAME, BUFFER_SIZE, configure_console(), dst_buf, g_xfer_done, lld, xdmac_channel_config_t::mbr_bc, xdmac_channel_config_t::mbr_cfg, xdmac_channel_config_t::mbr_da, lld_view0::mbr_da, xdmac_channel_config_t::mbr_ds, xdmac_channel_config_t::mbr_dus, lld_view0::mbr_nda, xdmac_channel_config_t::mbr_sa, xdmac_channel_config_t::mbr_sus, xdmac_channel_config_t::mbr_ubc, lld_view0::mbr_ubc, MICROBLOCK_LEN, pmc_enable_periph_clk(), src_buf, sysclk_init(), XDMA_CH, xdmac_channel_enable(), xdmac_channel_enable_interrupt(), xdmac_channel_set_descriptor_addr(), xdmac_channel_set_descriptor_control(), xdmac_configure_transfer(), xdmac_enable_interrupt(), XDMAC_UBC_NDE_FETCH_EN, XDMAC_UBC_NDEN_UPDATED, XDMAC_UBC_NSEN_UPDATED, XDMAC_UBC_NVIEW_NDV0, and XDMAC_UBC_UBLEN.
void XDMAC_Handler | ( | void | ) |
XDMAC interrupt handler.
References g_xfer_done, XDMA_CH, and xdmac_channel_get_interrupt_status().
|
static |
Referenced by main().
volatile uint32_t g_xfer_done = 0 |
Referenced by main(), and XDMAC_Handler().
|
static |
Linked list descriptor.
Referenced by main().
|
static |
Referenced by main().
|
static |
XDMA channel configuration.