Unit tests for FREQM driver.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include <conf_test.h>
Functions | |
int | main (void) |
Run FREQM driver unit tests. More... | |
static void | run_freqm_test (const struct test_case *test) |
Test FREQM measurement done. More... | |
static void | set_int_flag (void) |
Interrupt handler for FREQM interrupt. More... | |
Variables | |
struct freqm_config | g_freqm_cfg |
FREQM configuration. More... | |
struct freqm_dev_inst | g_freqm_inst |
FREQM instance. More... | |
volatile uint8_t | intflag = 0 |
int main | ( | void | ) |
Run FREQM driver unit tests.
References uart_rs232_options::baudrate, board_init(), DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, NULL, run_freqm_test(), stdio_serial_init(), sysclk_init(), test_suite_run(), and usart_serial_options.
|
static |
Test FREQM measurement done.
test | Current test case. |
References delay_ms, freqm_get_config_defaults(), freqm_init(), FREQM_INTERRUPT_MEASURMENT_READY, freqm_set_callback(), freqm_start_measure(), g_freqm_cfg, g_freqm_inst, intflag, set_int_flag(), and test_assert_true.
Referenced by main().
|
static |
Interrupt handler for FREQM interrupt.
References freqm_disable_interrupt(), freqm_get_interrupt_status(), FREQM_INTERRUPT_MEASURMENT_READY, g_freqm_inst, and intflag.
Referenced by run_freqm_test().
struct freqm_config g_freqm_cfg |
FREQM configuration.
Referenced by main(), and run_freqm_test().
struct freqm_dev_inst g_freqm_inst |
FREQM instance.
Referenced by main(), run_freqm_test(), and set_int_flag().
volatile uint8_t intflag = 0 |
Referenced by pdca_get_channel_status(), run_ac_test(), run_eic_test(), run_freqm_test(), and set_int_flag().