Microchip® Advanced Software Framework

example3.c File Reference

CRC example3 for AVR XMEGA.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>
#include <led.h>
#include <status_codes.h>
#include <sleepmgr.h>

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 void example_crc_dma_transfer_done ( enum dma_channel_status  status)
static

Callback for DMA transfer complete.

Parameters
statusStatus of a completed (or failed) DMA transfer

References crc_dma_checksum_stop(), LED1_GPIO, and LED_On.

Referenced by main().

int main ( void  )

uint8_t destination[DMA_BUFFER_SIZE]
static

Destination buffer to use for DMA transfer.

Referenced by dma_channel_set_destination_address(), dma_channel_write_destination(), and main().

uint8_t source[DMA_BUFFER_SIZE]
static