Microchip® Advanced Software Framework

ili93xx.h File Reference

API driver for ili93xx TFT display component.

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

#include "compiler.h"
#include "board.h"
#include "conf_ili93xx.h"

Data Structures

struct  ili93xx_font
 Font structure. More...
 
struct  ili93xx_opt_t
 Input parameters when initializing ili9325 driver. More...
 

Macros

#define COLOR_AZUR   (0xF0FFFFu)
 
#define COLOR_BEIGE   (0xF5F5DCu)
 
#define COLOR_BLACK   (0x000000u)
 Define EBI access for ILI93xx 8-bit System Interface. More...
 
#define COLOR_BLUE   (0x0000FFu)
 
#define COLOR_BLUEVIOLET   (0x8A2BE2u)
 
#define COLOR_BROWN   (0xA52A2Au)
 
#define COLOR_CYAN   (0x00FFFFu)
 
#define COLOR_DARKBLUE   (0x00008Bu)
 
#define COLOR_DARKCYAN   (0x008B8Bu)
 
#define COLOR_DARKGRAY   (0xA9A9A9u)
 
#define COLOR_DARKGREEN   (0x006400u)
 
#define COLOR_DARKRED   (0x800000u)
 
#define COLOR_DARKVIOLET   (0x9400D3u)
 
#define COLOR_GOLD   (0xFFD700u)
 
#define COLOR_GRAY   (0x808080u)
 
#define COLOR_GREEN   (0x00FF00u)
 
#define COLOR_GREENYELLOW   (0xADFF2Fu)
 
#define COLOR_INDIGO   (0x4B0082u)
 
#define COLOR_LIGHTBLUE   (0xADD8E6u)
 
#define COLOR_LIGHTCYAN   (0xE0FFFFu)
 
#define COLOR_LIGHTGREEN   (0x90EE90u)
 
#define COLOR_LIGHTGREY   (0xD3D3D3u)
 
#define COLOR_MAGENTA   (0xFF00FFu)
 
#define COLOR_NAVY   (0x000080u)
 
#define COLOR_OLIVE   (0x808000u)
 
#define COLOR_ORANGE   (0xFFA500u)
 
#define COLOR_RED   (0xFF0000u)
 
#define COLOR_SIENNA   (0xA0522Du)
 
#define COLOR_SILVER   (0xC0C0C0u)
 
#define COLOR_SKYBLUE   (0x87CEEBu)
 
#define COLOR_SNOW   (0xFFFAFAu)
 
#define COLOR_TOMATO   (0xFF6347u)
 
#define COLOR_TURQUOISE   (0x40E0D0u)
 
#define COLOR_VIOLET   (0xEE82EEu)
 
#define COLOR_WHITE   (0xFFFFFFu)
 
#define COLOR_YELLOW   (0xFFFF00u)
 
#define COLOR_YELLOWGREEN   (0x9ACD32u)
 
#define DEVICE_TYPE_ILI9325   1
 
#define DEVICE_TYPE_ILI9341   2
 
#define ILI9325_DEVICE_CODE   (0x9325u)
 ili93xx ID code More...
 
#define ILI9341_DEVICE_CODE   (0x9341u)
 
#define ILI93XX_COLOR(r, g, b)   ((r << 16) | (g << 8) | b)
 This macro generates a 16-bit native color for the display from a 24-bit RGB value. More...
 
#define ILI93XX_FLIP_X   1
 Bit mask for flipping X for ili93xx_set_orientation() More...
 
#define ILI93XX_FLIP_Y   2
 Bit mask for flipping Y for ili93xx_set_orientation() More...
 
#define ILI93XX_LCD_HEIGHT   320
 
#define ILI93XX_LCD_WIDTH   240
 ili93xx screen size More...
 
#define ILI93XX_SWITCH_XY   4
 Bit mask for swapping X and Y for ili93xx_set_orientation() More...
 
#define ILI93XX_SWITCH_XY_HEIGHT   320
 
#define ILI93XX_SWITCH_XY_WIDTH   240
 

Typedefs

typedef ili93xx_color_t gfx_color_t
 
typedef int16_t gfx_coord_t
 
typedef uint32_t ili93xx_color_t
 Type define for an integer type large enough to store a pixel color. More...
 
typedef int16_t ili93xx_coord_t
 Type define for an integer type large enough to store a pixel coordinate. More...
 

Enumerations

enum  ili93xx_display_direction {
  LANDSCAPE = 0,
  PORTRAIT = 1
}
 Display direction option. More...
 
enum  ili93xx_scan_direction {
  V_INCREASE = 0,
  V_DEREASE = 1
}
 Scan direction option. More...
 
enum  ili93xx_shift_direction {
  H_INCREASE = 0,
  H_DECREASE = 1
}
 Shift direction option. More...
 

Functions

void ili93xx_copy_pixels_from_screen (ili93xx_color_t *pixels, uint32_t count)
 Copy pixels from the screen to a pixel buffer. More...
 
void ili93xx_copy_pixels_to_screen (const ili93xx_color_t *pixels, uint32_t count)
 Copy pixels from SRAM to the screen. More...
 
void ili93xx_copy_raw_pixel_24bits_to_screen (const uint8_t *raw_pixels, uint32_t count)
 Copy pixels from SRAM to the screen. More...
 
uint8_t ili93xx_device_type (void)
 get the device type. More...
 
uint8_t ili93xx_device_type_identify (void)
 Read device ID to idenfity the device ILI9325 device ID locates in Device Code Read (R00h) register. More...
 
void ili93xx_disable_scroll (void)
 Disable the scrolling feature. More...
 
void ili93xx_display_off (void)
 Turn off the LCD. More...
 
void ili93xx_display_on (void)
 Turn on the LCD. More...
 
uint32_t ili93xx_draw_circle (uint32_t ul_x, uint32_t ul_y, uint32_t ul_r)
 Draw a circle on LCD. More...
 
uint32_t ili93xx_draw_filled_circle (uint32_t ul_x, uint32_t ul_y, uint32_t ul_r)
 Draw a filled circle on LCD. More...
 
void ili93xx_draw_filled_rectangle (uint32_t ul_x1, uint32_t ul_y1, uint32_t ul_x2, uint32_t ul_y2)
 Draw a filled rectangle on LCD. More...
 
void ili93xx_draw_line (uint32_t ul_x1, uint32_t ul_y1, uint32_t ul_x2, uint32_t ul_y2)
 Draw a line on LCD. More...
 
uint32_t ili93xx_draw_pixel (uint32_t ul_x, uint32_t ul_y)
 Draw a pixel on LCD. More...
 
void ili93xx_draw_pixmap (uint32_t ul_x, uint32_t ul_y, uint32_t ul_width, uint32_t ul_height, const ili93xx_color_t *p_ul_pixmap)
 Draw a pixmap on LCD. More...
 
void ili93xx_draw_rectangle (uint32_t ul_x1, uint32_t ul_y1, uint32_t ul_x2, uint32_t ul_y2)
 Draw a rectangle on LCD. More...
 
void ili93xx_draw_string (uint32_t ul_x, uint32_t ul_y, const uint8_t *p_str)
 Draw a string on LCD. More...
 
void ili93xx_duplicate_pixel (const ili93xx_color_t color, uint32_t count)
 Set a given number of pixels to the same color. More...
 
void ili93xx_enable_scroll (void)
 Enable the scrolling feature. More...
 
void ili93xx_fill (ili93xx_color_t ul_color)
 Fill the LCD buffer with the specified color. More...
 
uint32_t ili93xx_get_lcd_type (void)
 
ili93xx_color_t ili93xx_get_pixel (uint32_t ul_x, uint32_t ul_y)
 Get a pixel from LCD. More...
 
uint32_t ili93xx_init (struct ili93xx_opt_t *p_opt)
 Initialize the ILI93XX lcd driver. More...
 
ili93xx_color_t ili93xx_read_gram (void)
 Read a single color from the graphical memory. More...
 
void ili93xx_scroll (int32_t ul_lines)
 Scroll up/down for the number of specified lines. More...
 
void ili93xx_set_bottom_right_limit (ili93xx_coord_t x, ili93xx_coord_t y)
 Set the display bottom right drawing limit. More...
 
void ili93xx_set_cursor_position (uint16_t us_x, uint16_t us_y)
 Set cursor of LCD screen. More...
 
void ili93xx_set_display_direction (enum ili93xx_display_direction e_dd, enum ili93xx_shift_direction e_shd, enum ili93xx_scan_direction e_scd)
 Set display direction. More...
 
void ili93xx_set_foreground_color (ili93xx_color_t ul_color)
 Set foreground color. More...
 
void ili93xx_set_limits (ili93xx_coord_t start_x, ili93xx_coord_t start_y, ili93xx_coord_t end_x, ili93xx_coord_t end_y)
 Set the full display drawing limits. More...
 
void ili93xx_set_orientation (uint8_t flags)
 Sets the orientation of the display data. More...
 
void ili93xx_set_top_left_limit (ili93xx_coord_t x, ili93xx_coord_t y)
 Set the display top left drawing limit. More...
 
void ili93xx_set_window (uint32_t ul_x, uint32_t ul_y, uint32_t ul_width, uint32_t ul_height)
 Set display window. More...
 
void ili93xx_vscroll_area_define (uint16_t us_tfa, uint16_t us_vsa, uint16_t us_bfa)
 Vertical Scroll area definition for ili9341. More...
 
void ili93xx_write_gram (ili93xx_color_t color)
 Write the graphical memory with a single color pixel. More...