Microchip® Advanced Software Framework

sam/drivers/abdacb/unit_tests/unit_tests.c File Reference

Unit tests for ABDAC driver.

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

#include <asf.h>
#include <conf_test.h>

Functions

static void abdac_callback (void)
 The ABDAC interrupt call back function. More...
 
int main (void)
 Run ABDAC driver unit tests. More...
 
static void run_abdac_init_test (const struct test_case *test)
 Test ABDAC initialization APIs. More...
 
static void run_abdac_interrupt_test (const struct test_case *test)
 Test ABDAC interrupt APIs. More...
 

Variables

volatile bool flag = false
 
struct abdac_config g_abdac_cfg
 ABDAC configuration. More...
 
struct abdac_dev_inst g_abdac_inst
 ABDAC instance. More...
 

static void abdac_callback ( void  )
static
static void run_abdac_init_test ( const struct test_case test)
static
static void run_abdac_interrupt_test ( const struct test_case test)
static

Test ABDAC interrupt APIs.

Parameters
testCurrent test case.

References abdac_callback(), ABDAC_INTERRUPT_TXRDY, ABDAC_INTERRUPT_TXUR, abdac_set_callback(), delay_ms, flag, g_abdac_inst, and test_assert_true.

Referenced by main().

volatile bool flag = false
struct abdac_config g_abdac_cfg

ABDAC configuration.

Referenced by main(), and run_abdac_init_test().

struct abdac_dev_inst g_abdac_inst