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 |
The ABDAC interrupt call back function.
References abdac_disable_interrupt(), ABDAC_INTERRUPT_TXRDY, ABDAC_INTERRUPT_TXUR, abdac_read_interrupt_mask(), flag, g_abdac_inst, and status.
Referenced by run_abdac_interrupt_test().
int main | ( | void | ) |
Run ABDAC driver unit tests.
References uart_rs232_options::baudrate, board_init(), DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, NULL, run_abdac_init_test(), run_abdac_interrupt_test(), stdio_serial_init(), sysclk_init(), test_suite_run(), and usart_serial_options.
|
static |
Test ABDAC initialization APIs.
test | Current test case. |
References abdac_clear_interrupt_flag(), abdac_enable(), abdac_get_config_defaults(), abdac_init(), ABDAC_INTERRUPT_TXRDY, ABDAC_INTERRUPT_TXUR, g_abdac_cfg, g_abdac_inst, status, STATUS_OK, and test_assert_true.
Referenced by main().
|
static |
Test ABDAC interrupt APIs.
test | Current 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().
struct abdac_config g_abdac_cfg |
ABDAC configuration.
Referenced by main(), and run_abdac_init_test().
struct abdac_dev_inst g_abdac_inst |
ABDAC instance.
Referenced by abdac_callback(), main(), run_abdac_init_test(), and run_abdac_interrupt_test().