Microchip® Advanced Software Framework

sam/components/display/ili9325/unit_tests/unit_tests.c File Reference

Unit tests for ili9325 driver.

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

#include "asf.h"
#include "conf_test.h"

Macros

#define DATA_FILTER   0x00F8FCF8
 
#define ILI9325_LCD_CS   1
 

Functions

static uint16_t ili9325_read_register (uint8_t uc_reg)
 Read data from LCD Register. More...
 
int main (void)
 Run ili9325 driver unit tests. More...
 
static void run_test_control_setting (const struct test_case *test)
 Test control API functions. More...
 
static void run_test_data_read_write (const struct test_case *test)
 Test data read/write API functions. More...
 
static void run_test_init (const struct test_case *test)
 Test ili9325 initialization setting. More...
 

Variables

struct ili9325_opt_t g_ili9325_display_opt
 

#define DATA_FILTER   0x00F8FCF8
#define ILI9325_LCD_CS   1

Referenced by main().

static uint16_t ili9325_read_register ( uint8_t  uc_reg)
static

Read data from LCD Register.

Parameters
regRegister address.
Returns
Read data.

Referenced by run_test_control_setting(), and run_test_init().

static void run_test_control_setting ( const struct test_case test)
static

Test control API functions.

This test call the control API functions and check the setting value.

Parameters
testCurrent test case.

References ILI9325_DISP_CTRL1, ILI9325_DISP_CTRL1_BASEE, ILI9325_DISP_CTRL1_D, ILI9325_DISP_CTRL1_DTE, ILI9325_DISP_CTRL1_GON, ili9325_display_on(), ili9325_read_register(), and test_assert_true.

Referenced by main().

static void run_test_data_read_write ( const struct test_case test)
static

Test data read/write API functions.

This test call the data read/write API functions and check the data consistence.

Parameters
testCurrent test case.

References COLOR_SKYBLUE, data, DATA_FILTER, ili9325_draw_pixel(), ili9325_get_pixel(), ili9325_set_foreground_color(), and test_assert_true.

Referenced by main().

struct ili9325_opt_t g_ili9325_display_opt