Unit tests for CMCC driver.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include <conf_test.h>
Macros | |
#define | CMCC_BASE CMCC |
Define CMCC Base. More... | |
#define | FIBONACCI_NUM 30 |
Functions | |
int | main (void) |
Run CMCC driver unit tests. More... | |
static uint32_t | recfibo (uint32_t n) |
Recursively calculate the nth Fibonacci number. More... | |
static void | run_cache_data_hit_test (const struct test_case *test) |
Test Cache Data Hit Counter Mode. More... | |
Variables | |
volatile bool | flag = false |
struct cmcc_config | g_cmcc_cfg |
CMCC configuration. More... | |
#define CMCC_BASE CMCC |
Define CMCC Base.
Referenced by main(), and run_cache_data_hit_test().
#define FIBONACCI_NUM 30 |
Referenced by run_cache_data_hit_test().
int main | ( | void | ) |
Run CMCC driver unit tests.
References uart_rs232_options::baudrate, board_init(), CMCC_BASE, cmcc_enable(), cmcc_get_config_defaults(), cmcc_init(), DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, g_cmcc_cfg, NULL, run_cache_data_hit_test(), stdio_serial_init(), sysclk_init(), test_suite_run(), and usart_serial_options.
|
static |
Recursively calculate the nth Fibonacci number.
n | Indicates which (positive) Fibonacci number to compute. |
Referenced by run_cache_data_hit_test().
|
static |
Test Cache Data Hit Counter Mode.
Null. |
References CMCC_BASE, cmcc_get_monitor_cnt(), FIBONACCI_NUM, flag, recfibo(), and test_assert_true.
Referenced by main().
struct cmcc_config g_cmcc_cfg |
CMCC configuration.
Referenced by main().