Unit tests for HMATRIX driver.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include <conf_test.h>
Functions | |
int | main (void) |
Run HMATRIX driver unit tests. More... | |
static void | run_hmatrix_test_arbitration (const struct test_case *test) |
Test running speed between different arbitration configurations. More... | |
static void | run_hmatrix_test_master (const struct test_case *test) |
Test running speed between different master configurations. More... | |
static void | run_hmatrix_test_slave (const struct test_case *test) |
Test running speed between different slave configurations. More... | |
void | SysTick_Handler (void) |
Handler for System Tick interrupt. More... | |
static uint32_t | toggle_led_test (uint32_t ul_dly_ticks) |
Toggle led at the given time. More... | |
Variables | |
volatile uint32_t | g_ul_ms_ticks = 0 |
int main | ( | void | ) |
Run HMATRIX driver unit tests.
References uart_rs232_options::baudrate, board_init(), DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, NULL, run_hmatrix_test_arbitration(), run_hmatrix_test_master(), run_hmatrix_test_slave(), stdio_serial_init(), sysclk_get_cpu_hz(), sysclk_init(), test_suite_run(), and usart_serial_options.
|
static |
Test running speed between different arbitration configurations.
test | Current test case. |
References hmatrix_slave_ch_conf::arbitration_type, HMATRIX_ARBITRATION_FIXED_PRIORITY, hmatrix_disable(), hmatrix_enable(), hmatrix_master_ch_get_config_defaults(), hmatrix_master_ch_set_config(), HMATRIX_MASTER_ID_CPU_IDCORE, HMATRIX_MASTER_ID_NUM, hmatrix_prs, hmatrix_set_slave_priority(), hmatrix_slave_ch_get_config_defaults(), hmatrix_slave_ch_set_config(), HMATRIX_SLAVE_ID_FLASH, HMATRIX_SLAVE_ID_NUM, HMATRIX_SLAVE_ID_PBA, test_assert_true, and toggle_led_test().
Referenced by main().
|
static |
Test running speed between different master configurations.
test | Current test case. |
References hmatrix_master_ch_conf::burst_type, HMATRIX_BURST_SINGLE_ACCESS, HMATRIX_BURST_SIXTEEN_BEAT, hmatrix_disable(), hmatrix_enable(), hmatrix_master_ch_get_config_defaults(), hmatrix_master_ch_set_config(), HMATRIX_MASTER_ID_CPU_IDCORE, HMATRIX_MASTER_ID_NUM, hmatrix_slave_ch_get_config_defaults(), hmatrix_slave_ch_set_config(), HMATRIX_SLAVE_ID_FLASH, HMATRIX_SLAVE_ID_NUM, test_assert_true, and toggle_led_test().
Referenced by main().
|
static |
Test running speed between different slave configurations.
test | Current test case. |
References hmatrix_slave_ch_conf::def_master_type, hmatrix_slave_ch_conf::fixed_def_master_number, HMATRIX_DEFAULT_MASTER_FIXED, HMATRIX_DEFAULT_MASTER_NONE, HMATRIX_DEFAULT_MASTER_PREVIOUS, hmatrix_disable(), hmatrix_enable(), hmatrix_master_ch_get_config_defaults(), hmatrix_master_ch_set_config(), HMATRIX_MASTER_ID_CPU_IDCORE, HMATRIX_MASTER_ID_CPU_SYS, HMATRIX_MASTER_ID_NUM, hmatrix_slave_ch_get_config_defaults(), hmatrix_slave_ch_set_config(), HMATRIX_SLAVE_ID_FLASH, HMATRIX_SLAVE_ID_NUM, HMATRIX_SLAVE_ID_PBA, test_assert_true, and toggle_led_test().
Referenced by main().
void SysTick_Handler | ( | void | ) |
Handler for System Tick interrupt.
Process System Tick Event. Increment the g_ul_ms_ticks counter.
References g_ul_ms_ticks.
|
static |
Toggle led at the given time.
ul_dly_ticks | Delay to wait for, in milliseconds. |
References g_ul_ms_ticks.
Referenced by run_hmatrix_test_arbitration(), run_hmatrix_test_master(), and run_hmatrix_test_slave().
volatile uint32_t g_ul_ms_ticks = 0 |
Referenced by delay_ms(), main(), mdelay(), SysTick_Handler(), and toggle_led_test().