Unit tests for GLOC driver.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include <conf_test.h>
Macros | |
#define | XOR_TRUTH_TABLE_FOUR_INPUT 0x6996u |
XOR truth table for four input. More... | |
Functions | |
int | main (void) |
Run GLOC driver unit tests. More... | |
static void | run_gloc_4inputs_xor_test (const struct test_case *test) |
Test GLOC Logic module with 4 Inputs XOR. More... | |
Variables | |
struct gloc_dev_inst | dev_inst |
GLOC instance. More... | |
struct gloc_lut_config | lut_config |
GLOC LUT configuration. More... | |
#define XOR_TRUTH_TABLE_FOUR_INPUT 0x6996u |
XOR truth table for four input.
Referenced by run_gloc_4inputs_xor_test().
int main | ( | void | ) |
Run GLOC driver unit tests.
References uart_rs232_options::baudrate, board_init(), DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, dev_inst, gloc_enable(), gloc_init(), NULL, run_gloc_4inputs_xor_test(), stdio_serial_init(), sysclk_init(), test_suite_run(), and usart_serial_options.
|
static |
Test GLOC Logic module with 4 Inputs XOR.
This tests check the capabilty of the Glue Logic driver to handle 4 inputs XOR operation.
test | Current test case. |
Ensure a minimum propagation delay to read the port pin.
References delay_us, dev_inst, gloc_lut_get_config_defaults(), gloc_lut_set_config(), HIGH, IOPORT_DIR_OUTPUT, ioport_get_pin_level(), ioport_set_pin_dir(), ioport_set_pin_level(), LOW, lut_config, test_assert_true, gloc_lut_config::truth_table_value, and XOR_TRUTH_TABLE_FOUR_INPUT.
Referenced by main().
struct gloc_dev_inst dev_inst |
GLOC instance.
Referenced by freqm_init(), iis_init(), main(), run_gloc_4inputs_xor_test(), twis_init(), and twis_interrupt_handler().
struct gloc_lut_config lut_config |
GLOC LUT configuration.
Referenced by run_gloc_4inputs_xor_test().