Microchip® Advanced Software Framework

sam/drivers/gloc/unit_tests/unit_tests.c File Reference

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().

static void run_gloc_4inputs_xor_test ( const struct test_case test)
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.

Parameters
testCurrent 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_lut_config lut_config

GLOC LUT configuration.

Referenced by run_gloc_4inputs_xor_test().