Microchip® Advanced Software Framework

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

Unit tests for lcdca driver.

Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.

#include <string.h>
#include <asf.h>
#include "conf_test.h"

Macros

#define LCDCA_AUTONOMOUS_CHECK_MASK   (LCDCA_SR_CSRS)
 
#define LCDCA_BLINK_CHECK_MASK   (LCDCA_SR_BLKS)
 
#define LCDCA_INIT_CHECK_MASK   (LCDCA_SR_EN | LCDCA_SR_FC0S | LCDCA_SR_FC1S | LCDCA_SR_FC2S)
 

Functions

int main (void)
 Run LCDCA unit tests. More...
 
static void run_lcdca_automated_scrolling_test (const struct test_case *test)
 Test LCDCA automated scrolling feature. More...
 
static void run_lcdca_automated_sequential_test (const struct test_case *test)
 Test LCDCA automated sequential feature. More...
 
static void run_lcdca_autonomous_test (const struct test_case *test)
 Test LCDCA autonomous feature. More...
 
static void run_lcdca_blink_test (const struct test_case *test)
 Test LCDCA blink feature. More...
 
static void run_lcdca_contrast_change_test (const struct test_case *test)
 Test LCDCA contrast change. More...
 
static void run_lcdca_end_test (const struct test_case *test)
 Clean up LCDCA test. More...
 
static void run_lcdca_init_test (const struct test_case *test)
 Test LCDCA initialization. More...
 

#define LCDCA_AUTONOMOUS_CHECK_MASK   (LCDCA_SR_CSRS)
#define LCDCA_BLINK_CHECK_MASK   (LCDCA_SR_BLKS)

Referenced by run_lcdca_blink_test().

#define LCDCA_INIT_CHECK_MASK   (LCDCA_SR_EN | LCDCA_SR_FC0S | LCDCA_SR_FC1S | LCDCA_SR_FC2S)

Referenced by run_lcdca_init_test().

static void run_lcdca_contrast_change_test ( const struct test_case test)
static

Test LCDCA contrast change.

Parameters
testCurrent test case.

References lcdca_set_contrast(), and test_assert_true.

Referenced by main().

static void run_lcdca_end_test ( const struct test_case test)
static

Clean up LCDCA test.

Parameters
testCurrent test case.

References IOPORT_PIN_LEVEL_LOW, ioport_set_pin_level(), lcdca_disable(), and UNUSED.

Referenced by main().