CRC example3 for AVR XMEGA.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | DMA_BUFFER_SIZE 8 |
Size of data buffer to transfer. More... | |
#define | DMA_CHANNEL 0 |
DMA channel to use in example. More... | |
Functions | |
static void | example_crc_dma_transfer_done (enum dma_channel_status status) |
Callback for DMA transfer complete. More... | |
int | main (void) |
main function More... | |
Variables | |
static uint8_t | destination [DMA_BUFFER_SIZE] |
Destination buffer to use for DMA transfer. More... | |
static uint8_t | source [DMA_BUFFER_SIZE] |
Source buffer to use for DMA transfer. More... | |
#define DMA_BUFFER_SIZE 8 |
Size of data buffer to transfer.
Referenced by main().
#define DMA_CHANNEL 0 |
DMA channel to use in example.
Referenced by main().
|
static |
Callback for DMA transfer complete.
status | Status of a completed (or failed) DMA transfer |
References crc_dma_checksum_stop(), LED1_GPIO, and LED_On.
Referenced by main().
int main | ( | void | ) |
main function
This example will configure a DMA channel with the following settings:
References board_init(), cpu_irq_enable, crc16_append_value(), CRC_16BIT, crc_io_checksum(), destination, DMA_BUFFER_SIZE, DMA_CHANNEL, dma_channel_enable(), dma_channel_set_burst_length(), dma_channel_set_dest_dir_mode(), dma_channel_set_dest_reload_mode(), dma_channel_set_destination_address(), dma_channel_set_interrupt_level(), dma_channel_set_source_address(), dma_channel_set_src_dir_mode(), dma_channel_set_src_reload_mode(), dma_channel_set_transfer_count(), dma_channel_trigger_block_transfer(), dma_channel_write_config(), dma_enable(), dma_set_callback(), example_crc_dma_transfer_done(), gpio_set_pin_low, LED0_GPIO, pmic_init(), PMIC_LVL_LOW, sleepmgr_init(), source, and sysclk_init().
|
static |
Destination buffer to use for DMA transfer.
Referenced by dma_channel_set_destination_address(), dma_channel_write_destination(), and main().
|
static |
Source buffer to use for DMA transfer.
Referenced by crc_set_source(), dma_channel_set_source_address(), dma_channel_set_trigger_source(), dma_channel_write_source(), and main().