Microchip® Advanced Software Framework

unit_tests.c File Reference

Unit tests for DMAC driver.

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

#include <stdint.h>
#include <stdbool.h>
#include "asf.h"
#include "conf_test.h"
#include "conf_board.h"
#include "conf_clock.h"

Macros

#define DMA_BUF_SIZE   32
 
#define DMA_CH   0
 

Functions

void DMAC_Handler (void)
 DMAC interrupt handler. More...
 
int main (void)
 Run DMAC driver unit tests. More...
 
static void run_multi_buf_xfer_test (const struct test_case *test)
 Test DMA multiple buffer transfer with interrupt mode. More...
 
static void run_single_buf_xfer_test (const struct test_case *test)
 Test DMA single buffer transfer with polling mode. More...
 

Variables

uint32_t g_dma_buf [6][DMA_BUF_SIZE]
 DMA buffer. More...
 
volatile uint32_t g_xfer_done = 0
 

#define DMA_BUF_SIZE   32
#define DMA_CH   0

void DMAC_Handler ( void  )

DMAC interrupt handler.

References DMA_CH, dmac_get_status(), and g_xfer_done.

uint32_t g_dma_buf[6][DMA_BUF_SIZE]

DMA buffer.

Referenced by run_multi_buf_xfer_test(), and run_single_buf_xfer_test().

volatile uint32_t g_xfer_done = 0