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 |
Referenced by run_test_data_read_write().
#define ILI9325_LCD_CS 1 |
Referenced by main().
|
static |
Read data from LCD Register.
reg | Register address. |
Referenced by run_test_control_setting(), and run_test_init().
int main | ( | void | ) |
Run ili9325 driver unit tests.
References uart_rs232_options::baudrate, board_init(), DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, ILI9325_LCD_CS, NULL, pmc_enable_periph_clk(), run_test_control_setting(), run_test_data_read_write(), run_test_init(), smc_set_cycle_timing(), smc_set_mode(), smc_set_pulse_timing(), smc_set_setup_timing(), stdio_serial_init(), sysclk_enable_peripheral_clock(), sysclk_init(), test_suite_run(), and usart_serial_options.
|
static |
Test control API functions.
This test call the control API functions and check the setting value.
test | Current 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 |
Test data read/write API functions.
This test call the data read/write API functions and check the data consistence.
test | Current 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().
|
static |
Test ili9325 initialization setting.
This test call the initialization function and check the setting value.
test | Current test case. |
References AAT31XX_AVG_BACKLIGHT_LEVEL, aat31xx_disable_backlight(), aat31xx_set_backlight(), ili9325_opt_t::background_color, COLOR_BLACK, COLOR_BLUE, COLOR_WHITE, ili9325_opt_t::foreground_color, g_ili9325_display_opt, ILI9325_BASE_IMG_DISP_CTRL, ILI9325_DISP_CTRL1, ILI9325_DISP_CTRL1_D, ILI9325_DISP_CTRL1_DTE, ILI9325_DISP_CTRL1_GON, ILI9325_DISP_CTRL2, ili9325_draw_filled_rectangle(), ILI9325_DRIVER_OUTPUT_CTRL1, ILI9325_DRIVER_OUTPUT_CTRL1_SS, ILI9325_DRIVER_OUTPUT_CTRL2, ILI9325_DRIVER_OUTPUT_CTRL2_GS, ILI9325_DRIVER_OUTPUT_CTRL2_NL, ILI9325_ENTRY_MODE, ILI9325_ENTRY_MODE_BGR, ILI9325_ENTRY_MODE_DFM, ILI9325_ENTRY_MODE_ID, ILI9325_ENTRY_MODE_TRI, ILI9325_FRAME_RATE_AND_COLOR_CTRL, ili9325_init(), ILI9325_LCD_DRIVING_CTRL, ILI9325_LCD_HEIGHT, ILI9325_LCD_WIDTH, ILI9325_PANEL_INTERFACE_CTRL1, ILI9325_PANEL_INTERFACE_CTRL2, ILI9325_PANEL_INTERFACE_CTRL4, ILI9325_POWER_CTRL2, ILI9325_POWER_CTRL3, ILI9325_POWER_CTRL4, ILI9325_POWER_CTRL7, ili9325_read_register(), ili9325_set_foreground_color(), test_assert_true, ili9325_opt_t::ul_height, and ili9325_opt_t::ul_width.
Referenced by main().
struct ili9325_opt_t g_ili9325_display_opt |