Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Display - ILI9325 Controller

Low-level driver for the ILI9325 LCD controller.

This driver provides access to the main features of the ILI9325 controller.

Modules

 

Macros

#define LCD_DATA_CACHE_SIZE   ILI9325_LCD_WIDTH
 

Functions

static void ili9325_check_box_coordinates (uint32_t *p_ul_x1, uint32_t *p_ul_y1, uint32_t *p_ul_x2, uint32_t *p_ul_y2)
 Check box coordinates. More...
 
void ili9325_copy_pixels_from_screen (ili9325_color_t *pixels, uint32_t count)
 Copy pixels from the screen to a pixel buffer. More...
 
void ili9325_copy_pixels_to_screen (const ili9325_color_t *pixels, uint32_t count)
 Copy pixels from SRAM to the screen. More...
 
void ili9325_copy_raw_pixel_24bits_to_screen (const uint8_t *raw_pixels, uint32_t count)
 Copy pixels from SRAM to the screen. More...
 
static void ili9325_delay (uint32_t ul_ms)
 Delay function. More...
 
void ili9325_disable_scroll (void)
 Disable the scrolling feature. More...
 
void ili9325_display_off (void)
 Turn off the LCD. More...
 
void ili9325_display_on (void)
 Turn on the LCD. More...
 
static void ili9325_draw_char (uint32_t ul_x, uint32_t ul_y, uint8_t uc_c)
 Draw an ASCII character on LCD. More...
 
uint32_t ili9325_draw_circle (uint32_t ul_x, uint32_t ul_y, uint32_t ul_r)
 Draw a circle on LCD. More...
 
uint32_t ili9325_draw_filled_circle (uint32_t ul_x, uint32_t ul_y, uint32_t ul_r)
 Draw a filled circle on LCD. More...
 
void ili9325_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 ili9325_draw_line (uint32_t ul_x1, uint32_t ul_y1, uint32_t ul_x2, uint32_t ul_y2)
 Draw a line on LCD. More...
 
static void ili9325_draw_line_bresenham (uint32_t ul_x1, uint32_t ul_y1, uint32_t ul_x2, uint32_t ul_y2)
 Draw a line on LCD, which is not horizontal or vertical. More...
 
uint32_t ili9325_draw_pixel (uint32_t ul_x, uint32_t ul_y)
 Draw a pixel on LCD. More...
 
void ili9325_draw_pixmap (uint32_t ul_x, uint32_t ul_y, uint32_t ul_width, uint32_t ul_height, const ili9325_color_t *p_ul_pixmap)
 Draw a pixmap on LCD. More...
 
void ili9325_draw_prepare (uint32_t ul_x, uint32_t ul_y, uint32_t ul_width, uint32_t ul_height)
 Prepare LCD to draw. More...
 
void ili9325_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 ili9325_draw_string (uint32_t ul_x, uint32_t ul_y, const uint8_t *p_str)
 Draw a string on LCD. More...
 
void ili9325_duplicate_pixel (const ili9325_color_t color, uint32_t count)
 Set a given number of pixels to the same color. More...
 
void ili9325_enable_scroll (void)
 Enable the scrolling feature. More...
 
void ili9325_fill (ili9325_color_t ul_color)
 Fill the LCD buffer with the specified color. More...
 
ili9325_color_t ili9325_get_pixel (uint32_t ul_x, uint32_t ul_y)
 Get a pixel from LCD. More...
 
uint32_t ili9325_init (struct ili9325_opt_t *p_opt)
 Initialize the ILI9325 lcd driver. More...
 
static uint16_t ili9325_lcd_get_16 (void)
 Read 16 bit data. More...
 
ili9325_color_t ili9325_read_gram (void)
 Read a single color from the graphical memory. More...
 
static uint32_t ili9325_read_ram (void)
 Read data to LCD GRAM. More...
 
static void ili9325_read_ram_prepare (void)
 Prepare to read GRAM data. More...
 
static uint16_t ili9325_read_register (uint8_t uc_reg)
 Read data from LCD Register. More...
 
void ili9325_scroll (int32_t ul_lines)
 Scroll up/down for the number of specified lines. More...
 
static void ili9325_send_draw_limits (const bool send_end_limits)
 Helper function to send the drawing limits (boundaries) to the display. More...
 
void ili9325_set_bottom_right_limit (ili9325_coord_t x, ili9325_coord_t y)
 Set the display bottom right drawing limit. More...
 
void ili9325_set_cursor_position (uint16_t us_x, uint16_t us_y)
 Set cursor of LCD screen. More...
 
void ili9325_set_display_direction (enum ili9325_display_direction e_dd, enum ili9325_shift_direction e_shd, enum ili9325_scan_direction e_scd)
 Set display direction. More...
 
void ili9325_set_foreground_color (ili9325_color_t ul_color)
 Set foreground color. More...
 
void ili9325_set_limits (ili9325_coord_t start_x, ili9325_coord_t start_y, ili9325_coord_t end_x, ili9325_coord_t end_y)
 Set the full display drawing limits. More...
 
void ili9325_set_orientation (uint8_t flags)
 Sets the orientation of the display data. More...
 
void ili9325_set_top_left_limit (ili9325_coord_t x, ili9325_coord_t y)
 Set the display top left drawing limit. More...
 
void ili9325_set_window (uint32_t ul_x, uint32_t ul_y, uint32_t ul_width, uint32_t ul_height)
 Set display window. More...
 
void ili9325_write_gram (ili9325_color_t color)
 Write the graphical memory with a single color pixel. More...
 
static void ili9325_write_ram (ili9325_color_t ul_color)
 Write data to LCD GRAM. More...
 
static void ili9325_write_ram_buffer (const ili9325_color_t *p_ul_buf, uint32_t ul_size)
 Write multiple data in buffer to LCD controller. More...
 
static void ili9325_write_ram_prepare (void)
 Prepare to write GRAM data. More...
 
static void ili9325_write_register (uint8_t uc_reg, uint16_t us_data)
 Write data to LCD Register. More...
 

Variables

static ili9325_color_t g_ul_pixel_cache [LCD_DATA_CACHE_SIZE]
 
struct ili9325_font gfont = {10, 14}
 
static volatile ili9325_coord_t limit_end_x
 
static volatile ili9325_coord_t limit_end_y
 
static volatile ili9325_coord_t limit_start_x
 
static volatile ili9325_coord_t limit_start_y
 
const uint8_t p_uc_charset10x14 []
 Character set table for font 10x14 Coding format: Char height is 14 bits, which is coded using 2 bytes per column (2 unused bits). More...
 

#define LCD_DATA_CACHE_SIZE   ILI9325_LCD_WIDTH

static void ili9325_check_box_coordinates ( uint32_t *  p_ul_x1,
uint32_t *  p_ul_y1,
uint32_t *  p_ul_x2,
uint32_t *  p_ul_y2 
)
static

Check box coordinates.

Parameters
p_ul_x1X coordinate of upper-left corner on LCD.
p_ul_y1Y coordinate of upper-left corner on LCD.
p_ul_x2X coordinate of lower-right corner on LCD.
p_ul_y2Y coordinate of lower-right corner on LCD.

References ILI9325_LCD_HEIGHT, and ILI9325_LCD_WIDTH.

Referenced by ili9325_draw_filled_rectangle(), ili9325_draw_pixmap(), and ili9325_draw_rectangle().

void ili9325_copy_pixels_from_screen ( ili9325_color_t pixels,
uint32_t  count 
)

Copy pixels from the screen to a pixel buffer.

Use this function to copy pixels from the display to an internal SRAM buffer.

Limits have to be set prior to calling this function, e.g.:

Parameters
pixelsPointer to the pixel buffer to read to
countNumber of pixels to read

References UNUSED.

void ili9325_copy_pixels_to_screen ( const ili9325_color_t pixels,
uint32_t  count 
)

Copy pixels from SRAM to the screen.

Used to copy a large quantitative of data to the screen in one go.

Limits have to be set prior to calling this function, e.g.:

Parameters
pixelsPointer to the pixel data
countNumber of pixels to copy to the screen

References Assert, and ILI9325_GRAM_DATA_REG.

void ili9325_copy_raw_pixel_24bits_to_screen ( const uint8_t *  raw_pixels,
uint32_t  count 
)

Copy pixels from SRAM to the screen.

Used to copy a large quantitative of data to the screen in one go.

Limits have to be set prior to calling this function, e.g.:

Parameters
pixelsPointer to the pixel data
countNumber of pixels to copy to the screen

References Assert, and ILI9325_GRAM_DATA_REG.

static void ili9325_delay ( uint32_t  ul_ms)
static

Delay function.

Referenced by ili9325_init().

void ili9325_disable_scroll ( void  )
void ili9325_display_off ( void  )

Turn off the LCD.

References ILI9325_DISP_CTRL1, and ili9325_write_register().

static void ili9325_draw_char ( uint32_t  ul_x,
uint32_t  ul_y,
uint8_t  uc_c 
)
static

Draw an ASCII character on LCD.

Parameters
ul_xX coordinate of character upper-left corner.
ul_yY coordinate of character upper-left corner.
uc_ccharacter to print.

References ili9325_draw_pixel().

Referenced by ili9325_draw_string().

uint32_t ili9325_draw_circle ( uint32_t  ul_x,
uint32_t  ul_y,
uint32_t  ul_r 
)

Draw a circle on LCD.

Parameters
ul_xX coordinate of circle center.
ul_yY coordinate of circle center.
ul_rcircle radius.
Returns
0 if succeeds, otherwise fails.

References ili9325_draw_pixel().

Referenced by main().

uint32_t ili9325_draw_filled_circle ( uint32_t  ul_x,
uint32_t  ul_y,
uint32_t  ul_r 
)

Draw a filled circle on LCD.

Parameters
ul_xX coordinate of circle center.
ul_yY coordinate of circle center.
ul_rcircle radius.
Returns
0 if succeeds, otherwise fails.

References ili9325_draw_filled_rectangle().

void ili9325_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.

Parameters
ul_x1X coordinate of upper-left corner on LCD.
ul_y1Y coordinate of upper-left corner on LCD.
ul_x2X coordinate of lower-right corner on LCD.
ul_y2Y coordinate of lower-right corner on LCD.

References ili9325_check_box_coordinates(), ILI9325_LCD_HEIGHT, ILI9325_LCD_WIDTH, ili9325_set_cursor_position(), ili9325_set_window(), ili9325_write_ram_buffer(), ili9325_write_ram_prepare(), and LCD_DATA_CACHE_SIZE.

Referenced by ili9325_draw_filled_circle(), ili9325_draw_line(), ili9325_draw_rectangle(), main(), and run_test_init().

void ili9325_draw_line ( uint32_t  ul_x1,
uint32_t  ul_y1,
uint32_t  ul_x2,
uint32_t  ul_y2 
)

Draw a line on LCD.

Parameters
ul_x1X coordinate of line start.
ul_y1Y coordinate of line start.
ul_x2X coordinate of line end.
ul_y2Y coordinate of line end.

References ili9325_draw_filled_rectangle(), and ili9325_draw_line_bresenham().

Referenced by main().

static void ili9325_draw_line_bresenham ( uint32_t  ul_x1,
uint32_t  ul_y1,
uint32_t  ul_x2,
uint32_t  ul_y2 
)
static

Draw a line on LCD, which is not horizontal or vertical.

Parameters
ul_x1X coordinate of line start.
ul_y1Y coordinate of line start.
ul_x2X coordinate of line end.
ul_y2Y coordinate of line endl.

References ili9325_draw_pixel().

Referenced by ili9325_draw_line().

uint32_t ili9325_draw_pixel ( uint32_t  ul_x,
uint32_t  ul_y 
)

Draw a pixel on LCD.

Parameters
ul_xX coordinate of pixel.
ul_yY coordinate of pixel.
Returns
0 if succeeds, otherwise fails.

References ILI9325_LCD_HEIGHT, ILI9325_LCD_WIDTH, ili9325_set_cursor_position(), ili9325_write_ram(), and ili9325_write_ram_prepare().

Referenced by ili9325_draw_char(), ili9325_draw_circle(), ili9325_draw_line_bresenham(), and run_test_data_read_write().

void ili9325_draw_pixmap ( uint32_t  ul_x,
uint32_t  ul_y,
uint32_t  ul_width,
uint32_t  ul_height,
const ili9325_color_t p_ul_pixmap 
)

Draw a pixmap on LCD.

Parameters
ul_xX coordinate of upper-left corner on LCD.
ul_yY coordinate of upper-left corner on LCD.
ul_widthwidth of the picture.
ul_heightheight of the picture.
p_ul_pixmappixmap of the image.

References ili9325_check_box_coordinates(), ILI9325_LCD_HEIGHT, ILI9325_LCD_WIDTH, ili9325_set_cursor_position(), ili9325_set_window(), ili9325_write_ram_buffer(), and ili9325_write_ram_prepare().

void ili9325_draw_prepare ( uint32_t  ul_x,
uint32_t  ul_y,
uint32_t  ul_width,
uint32_t  ul_height 
)

Prepare LCD to draw.

Parameters
ul_xHorizontal address start position
ul_yVertical address start position
ul_widthThe width of the window.
ul_heightThe height of the window.

References ili9325_set_cursor_position(), ili9325_set_window(), and ili9325_write_ram_prepare().

Referenced by draw_frame_yuv_color_int().

void ili9325_draw_rectangle ( uint32_t  ul_x1,
uint32_t  ul_y1,
uint32_t  ul_x2,
uint32_t  ul_y2 
)

Draw a rectangle on LCD.

Parameters
ul_x1X coordinate of upper-left corner on LCD.
ul_y1Y coordinate of upper-left corner on LCD.
ul_x2X coordinate of lower-right corner on LCD.
ul_y2Y coordinate of lower-right corner on LCD.

References ili9325_check_box_coordinates(), and ili9325_draw_filled_rectangle().

void ili9325_draw_string ( uint32_t  ul_x,
uint32_t  ul_y,
const uint8_t *  p_str 
)

Draw a string on LCD.

Parameters
ul_xX coordinate of string top-left corner.
ul_yY coordinate of string top-left corner.
p_strString to display.

References ili9325_font::height, ili9325_draw_char(), and ili9325_font::width.

Referenced by main().

void ili9325_duplicate_pixel ( const ili9325_color_t  color,
uint32_t  count 
)

Set a given number of pixels to the same color.

Use this function to write a certain number of pixels to the same color within a set limit.

Limits have to be set prior to calling this function, e.g.:

Parameters
colorThe color to write to the display
countThe number of pixels to write with this color

References Assert, and ILI9325_GRAM_DATA_REG.

void ili9325_enable_scroll ( void  )
void ili9325_fill ( ili9325_color_t  ul_color)

Fill the LCD buffer with the specified color.

Parameters
ul_colorfill color.

References ILI9325_LCD_HEIGHT, ILI9325_LCD_WIDTH, ili9325_set_cursor_position(), ili9325_write_ram(), and ili9325_write_ram_prepare().

Referenced by main().

ili9325_color_t ili9325_get_pixel ( uint32_t  ul_x,
uint32_t  ul_y 
)

Get a pixel from LCD.

Parameters
ul_xX coordinate of pixel.
ul_yY coordinate of pixel.
Returns
the pixel color.

References Assert, ILI9325_LCD_HEIGHT, ILI9325_LCD_WIDTH, ili9325_read_ram(), ili9325_read_ram_prepare(), and ili9325_set_cursor_position().

Referenced by run_test_data_read_write().

uint32_t ili9325_init ( struct ili9325_opt_t p_opt)

Initialize the ILI9325 lcd driver.

Note
Make sure below works have been done before calling ili9325_init()
  1. ILI9325 related Pins have been initialized correctly.
  2. SMC has been configured correctly for access ILI9325 (8-bit system interface for now).
Parameters
p_optpointer to ILI9325 option structure.
Returns
0 if initialization succeeds, otherwise fails.

References ili9325_opt_t::foreground_color, ILI9325_BASE_IMG_DISP_CTRL, ILI9325_BASE_IMG_DISP_CTRL_REV, ili9325_delay(), ILI9325_DEVICE_CODE, ILI9325_DEVICE_CODE_REG, ILI9325_DISP_CTRL1, ILI9325_DISP_CTRL1_D, ILI9325_DISP_CTRL1_DTE, ILI9325_DISP_CTRL1_GON, ILI9325_DISP_CTRL2, ILI9325_DISP_CTRL2_BP, ILI9325_DISP_CTRL2_FP, ILI9325_DISP_CTRL3, ILI9325_DISP_CTRL4, 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_MAKER_POS, ILI9325_FRAME_RATE_AND_COLOR_CTRL, ILI9325_FRAME_RATE_AND_COLOR_CTRL_FRS, ILI9325_GAMMA_CTRL1, ILI9325_GAMMA_CTRL10, ILI9325_GAMMA_CTRL10_VRN0, ILI9325_GAMMA_CTRL10_VRN1, ILI9325_GAMMA_CTRL2, ILI9325_GAMMA_CTRL2_KP2, ILI9325_GAMMA_CTRL2_KP3, ILI9325_GAMMA_CTRL3, ILI9325_GAMMA_CTRL3_KP4, ILI9325_GAMMA_CTRL3_KP5, ILI9325_GAMMA_CTRL4, ILI9325_GAMMA_CTRL4_RP0, ILI9325_GAMMA_CTRL4_RP1, ILI9325_GAMMA_CTRL5, ILI9325_GAMMA_CTRL5_VRP0, ILI9325_GAMMA_CTRL5_VRP1, ILI9325_GAMMA_CTRL6, ILI9325_GAMMA_CTRL6_KN0, ILI9325_GAMMA_CTRL6_KN1, ILI9325_GAMMA_CTRL7, ILI9325_GAMMA_CTRL7_KN2, ILI9325_GAMMA_CTRL7_KN3, ILI9325_GAMMA_CTRL8, ILI9325_GAMMA_CTRL8_KN4, ILI9325_GAMMA_CTRL8_KN5, ILI9325_GAMMA_CTRL9, ILI9325_GAMMA_CTRL9_RN0, ILI9325_GAMMA_CTRL9_RN1, ILI9325_LCD_DRIVING_CTRL, ILI9325_LCD_DRIVING_CTRL_BC0, ILI9325_LCD_DRIVING_CTRL_BIT10, ILI9325_LCD_DRIVING_CTRL_EOR, ILI9325_PANEL_INTERFACE_CTRL1, ILI9325_PANEL_INTERFACE_CTRL1_RTNI, ILI9325_PANEL_INTERFACE_CTRL2, ILI9325_PANEL_INTERFACE_CTRL2_NOWI, ILI9325_PANEL_INTERFACE_CTRL4, ILI9325_PANEL_INTERFACE_CTRL4_DIVE, ILI9325_PANEL_INTERFACE_CTRL4_RTNE, ILI9325_PARTIAL_IMG1_AREA_END_LINE, ILI9325_PARTIAL_IMG1_AREA_START_LINE, ILI9325_PARTIAL_IMG1_DISP_POS, ILI9325_PARTIAL_IMG2_AREA_END_LINE, ILI9325_PARTIAL_IMG2_AREA_START_LINE, ILI9325_PARTIAL_IMG2_DISP_POS, ILI9325_POWER_CTRL1, ILI9325_POWER_CTRL1_AP, ILI9325_POWER_CTRL1_APE, ILI9325_POWER_CTRL1_BT, ILI9325_POWER_CTRL1_SAP, ILI9325_POWER_CTRL2, ILI9325_POWER_CTRL2_DC0, ILI9325_POWER_CTRL2_DC1, ILI9325_POWER_CTRL2_VC, ILI9325_POWER_CTRL3, ILI9325_POWER_CTRL3_PON, ILI9325_POWER_CTRL3_VRH, ILI9325_POWER_CTRL4, ILI9325_POWER_CTRL4_VDV, ILI9325_POWER_CTRL7, ILI9325_POWER_CTRL7_VCM, ili9325_read_register(), ILI9325_RESIZE_CTRL, ILI9325_RGB_DISP_INTERFACE_CTRL1, ILI9325_RGB_DISP_INTERFACE_CTRL2, ili9325_set_cursor_position(), ili9325_set_foreground_color(), ili9325_set_window(), ILI9325_START_OSC_CTRL, ILI9325_START_OSC_CTRL_EN, ILI9325_VERTICAL_SCROLL_CTRL, ili9325_write_register(), ili9325_opt_t::ul_height, and ili9325_opt_t::ul_width.

Referenced by _display_init(), display_init(), gfx_ili9325_init(), main(), and run_test_init().

static uint16_t ili9325_lcd_get_16 ( void  )
static

Read 16 bit data.

References us_value.

Referenced by ili9325_read_register().

ili9325_color_t ili9325_read_gram ( void  )

Read a single color from the graphical memory.

Use this function to read a color from the graphical memory of the controller.

Limits have to be set prior to calling this function, e.g.:

Return values
ili9325_color_tThe read color pixel

References ILI9325_GRAM_DATA_REG.

Referenced by gfx_ili9325_get_pixel().

static uint32_t ili9325_read_ram ( void  )
static

Read data to LCD GRAM.

Note
Because pixel data LCD GRAM is 18-bits, so convertion to RGB 24-bits will cause low color bit lose.
Returns
color 24-bits RGB color.

Referenced by ili9325_get_pixel().

static void ili9325_read_ram_prepare ( void  )
static

Prepare to read GRAM data.

References ILI9325_GRAM_DATA_REG.

Referenced by ili9325_get_pixel().

static uint16_t ili9325_read_register ( uint8_t  uc_reg)
static

Read data from LCD Register.

Parameters
uc_regregister address.
Returns
register value.

References ili9325_lcd_get_16().

Referenced by ili9325_init().

void ili9325_scroll ( int32_t  ul_lines)

Scroll up/down for the number of specified lines.

Parameters
ul_linesnumber of lines to scroll.

References ILI9325_VERTICAL_SCROLL_CTRL, and ili9325_write_register().

static void ili9325_send_draw_limits ( const bool  send_end_limits)
inlinestatic

Helper function to send the drawing limits (boundaries) to the display.

This function is used to send the currently set upper-left and lower-right drawing limits to the display, as set through the various limit functions.

Parameters
send_end_limitsTrue to also send the lower-right drawing limits

References ILI9325_HORIZONTAL_ADDR_END, ILI9325_HORIZONTAL_ADDR_START, ILI9325_HORIZONTAL_GRAM_ADDR_SET, ILI9325_VERTICAL_ADDR_END, ILI9325_VERTICAL_ADDR_START, ILI9325_VERTICAL_GRAM_ADDR_SET, and ili9325_write_register().

Referenced by ili9325_set_bottom_right_limit(), ili9325_set_limits(), and ili9325_set_top_left_limit().

void ili9325_set_bottom_right_limit ( ili9325_coord_t  x,
ili9325_coord_t  y 
)

Set the display bottom right drawing limit.

Use this function to set the bottom right corner of the drawing limit box.

Parameters
xThe x coordinate of the bottom right corner
yThe y coordinate of the bottom right corner

References ili9325_send_draw_limits().

void ili9325_set_cursor_position ( uint16_t  us_x,
uint16_t  us_y 
)

Set cursor of LCD screen.

Parameters
us_xX coordinate of upper-left corner on LCD.
us_yY coordinate of upper-left corner on LCD.

References ILI9325_HORIZONTAL_GRAM_ADDR_SET, ILI9325_VERTICAL_GRAM_ADDR_SET, and ili9325_write_register().

Referenced by ili9325_draw_filled_rectangle(), ili9325_draw_pixel(), ili9325_draw_pixmap(), ili9325_draw_prepare(), ili9325_fill(), ili9325_get_pixel(), and ili9325_init().

void ili9325_set_display_direction ( enum ili9325_display_direction  e_dd,
enum ili9325_shift_direction  e_shd,
enum ili9325_scan_direction  e_scd 
)
void ili9325_set_foreground_color ( ili9325_color_t  ul_color)

Set foreground color.

Parameters
ul_colorforeground color.

References LCD_DATA_CACHE_SIZE.

Referenced by ili9325_init(), main(), run_test_data_read_write(), and run_test_init().

void ili9325_set_limits ( ili9325_coord_t  start_x,
ili9325_coord_t  start_y,
ili9325_coord_t  end_x,
ili9325_coord_t  end_y 
)

Set the full display drawing limits.

Use this function to set the full drawing limit box.

Parameters
start_xThe x coordinate of the top left corner
start_yThe y coordinate of the top left corner
end_xThe x coordinate of the bottom right corner
end_yThe y coordinate of the bottom right corner

References ili9325_send_draw_limits().

void ili9325_set_orientation ( uint8_t  flags)

Sets the orientation of the display data.

Configures the display for a given orientation, including mirroring and/or screen rotation.

Parameters
flagsOrientation flags to use, see ILI9325_FLIP_X, ILI9325_FLIP_Y and ILI9325_SWITCH_XY.

References ILI9325_ENTRY_MODE, ILI9325_ENTRY_MODE_AM, ILI9325_ENTRY_MODE_BGR, ILI9325_ENTRY_MODE_DFM, ILI9325_ENTRY_MODE_ID, ILI9325_ENTRY_MODE_TRI, ILI9325_FLIP_X, ILI9325_FLIP_Y, ILI9325_SWITCH_XY, and ili9325_write_register().

Referenced by gfx_ili9325_set_orientation().

void ili9325_set_top_left_limit ( ili9325_coord_t  x,
ili9325_coord_t  y 
)

Set the display top left drawing limit.

Use this function to set the top left limit of the drawing limit box.

Parameters
xThe x coordinate of the top left corner
yThe y coordinate of the top left corner

References ili9325_send_draw_limits().

void ili9325_set_window ( uint32_t  ul_x,
uint32_t  ul_y,
uint32_t  ul_width,
uint32_t  ul_height 
)

Set display window.

Parameters
ul_xHorizontal address start position
ul_yVertical address start position
ul_widthThe width of the window.
ul_heightThe height of the window.

References Assert, ILI9325_HORIZONTAL_ADDR_END, ILI9325_HORIZONTAL_ADDR_START, ILI9325_VERTICAL_ADDR_END, ILI9325_VERTICAL_ADDR_START, and ili9325_write_register().

Referenced by ili9325_draw_filled_rectangle(), ili9325_draw_pixmap(), ili9325_draw_prepare(), and ili9325_init().

void ili9325_write_gram ( ili9325_color_t  color)

Write the graphical memory with a single color pixel.

Use this function to write a single color pixel to the controller memory.

Limits have to be set prior to calling this function, e.g.:

Parameters
colorThe color pixel to write to the screen

References Assert, and ILI9325_GRAM_DATA_REG.

Referenced by gfx_ili9325_draw_line_pixel(), and gfx_ili9325_draw_pixel().

static void ili9325_write_ram ( ili9325_color_t  ul_color)
static

Write data to LCD GRAM.

Parameters
ul_color24-bits RGB color.

Referenced by ili9325_draw_pixel(), ili9325_fill(), and ili9325_write_ram_buffer().

static void ili9325_write_ram_buffer ( const ili9325_color_t p_ul_buf,
uint32_t  ul_size 
)
static

Write multiple data in buffer to LCD controller.

Parameters
p_ul_bufdata buffer.
ul_sizesize in pixels.

References ili9325_write_ram().

Referenced by ili9325_draw_filled_rectangle(), and ili9325_draw_pixmap().

static void ili9325_write_ram_prepare ( void  )
static
static void ili9325_write_register ( uint8_t  uc_reg,
uint16_t  us_data 
)
static

ili9325_color_t g_ul_pixel_cache[LCD_DATA_CACHE_SIZE]
static
struct ili9325_font gfont = {10, 14}
volatile ili9325_coord_t limit_end_x
static
volatile ili9325_coord_t limit_end_y
static
volatile ili9325_coord_t limit_start_x
static
volatile ili9325_coord_t limit_start_y
static
const uint8_t p_uc_charset10x14[]

Character set table for font 10x14 Coding format: Char height is 14 bits, which is coded using 2 bytes per column (2 unused bits).

Char width is 10 bits.

Referenced by ili93xx_draw_char().