Low-level driver for the ILI9325 LCD controller.
This driver provides access to the main features of the ILI9325 controller.
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 |
Referenced by ili9325_draw_filled_rectangle(), and ili9325_set_foreground_color().
|
static |
Check box coordinates.
p_ul_x1 | X coordinate of upper-left corner on LCD. |
p_ul_y1 | Y coordinate of upper-left corner on LCD. |
p_ul_x2 | X coordinate of lower-right corner on LCD. |
p_ul_y2 | Y 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.:
pixels | Pointer to the pixel buffer to read to |
count | Number 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.:
pixels | Pointer to the pixel data |
count | Number 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.:
pixels | Pointer to the pixel data |
count | Number of pixels to copy to the screen |
References Assert, and ILI9325_GRAM_DATA_REG.
|
static |
Delay function.
Referenced by ili9325_init().
void ili9325_disable_scroll | ( | void | ) |
Disable the scrolling feature.
References ILI9325_BASE_IMG_DISP_CTRL, ILI9325_BASE_IMG_DISP_CTRL_REV, and ili9325_write_register().
void ili9325_display_off | ( | void | ) |
Turn off the LCD.
References ILI9325_DISP_CTRL1, and ili9325_write_register().
void ili9325_display_on | ( | void | ) |
Turn on the LCD.
References ILI9325_DISP_CTRL1, ILI9325_DISP_CTRL1_BASEE, ILI9325_DISP_CTRL1_D, ILI9325_DISP_CTRL1_DTE, ILI9325_DISP_CTRL1_GON, and ili9325_write_register().
Referenced by gfx_ili9325_init().
|
static |
Draw an ASCII character on LCD.
ul_x | X coordinate of character upper-left corner. |
ul_y | Y coordinate of character upper-left corner. |
uc_c | character 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.
ul_x | X coordinate of circle center. |
ul_y | Y coordinate of circle center. |
ul_r | circle radius. |
References ili9325_draw_pixel().
uint32_t ili9325_draw_filled_circle | ( | uint32_t | ul_x, |
uint32_t | ul_y, | ||
uint32_t | ul_r | ||
) |
Draw a filled circle on LCD.
ul_x | X coordinate of circle center. |
ul_y | Y coordinate of circle center. |
ul_r | circle radius. |
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.
ul_x1 | X coordinate of upper-left corner on LCD. |
ul_y1 | Y coordinate of upper-left corner on LCD. |
ul_x2 | X coordinate of lower-right corner on LCD. |
ul_y2 | Y 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(), and ili9325_draw_rectangle().
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.
ul_x1 | X coordinate of line start. |
ul_y1 | Y coordinate of line start. |
ul_x2 | X coordinate of line end. |
ul_y2 | Y coordinate of line end. |
References ili9325_draw_filled_rectangle(), and ili9325_draw_line_bresenham().
|
static |
Draw a line on LCD, which is not horizontal or vertical.
ul_x1 | X coordinate of line start. |
ul_y1 | Y coordinate of line start. |
ul_x2 | X coordinate of line end. |
ul_y2 | Y 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.
ul_x | X coordinate of pixel. |
ul_y | Y coordinate of pixel. |
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(), and ili9325_draw_line_bresenham().
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.
ul_x | X coordinate of upper-left corner on LCD. |
ul_y | Y coordinate of upper-left corner on LCD. |
ul_width | width of the picture. |
ul_height | height of the picture. |
p_ul_pixmap | pixmap 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.
ul_x | Horizontal address start position |
ul_y | Vertical address start position |
ul_width | The width of the window. |
ul_height | The height of the window. |
References ili9325_set_cursor_position(), ili9325_set_window(), and ili9325_write_ram_prepare().
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.
ul_x1 | X coordinate of upper-left corner on LCD. |
ul_y1 | Y coordinate of upper-left corner on LCD. |
ul_x2 | X coordinate of lower-right corner on LCD. |
ul_y2 | Y 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.
ul_x | X coordinate of string top-left corner. |
ul_y | Y coordinate of string top-left corner. |
p_str | String to display. |
References ili9325_font::height, ili9325_draw_char(), and ili9325_font::width.
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.:
color | The color to write to the display |
count | The number of pixels to write with this color |
References Assert, and ILI9325_GRAM_DATA_REG.
void ili9325_enable_scroll | ( | void | ) |
Enable the scrolling feature.
References ILI9325_BASE_IMG_DISP_CTRL, ILI9325_BASE_IMG_DISP_CTRL_REV, ILI9325_BASE_IMG_DISP_CTRL_VLE, and ili9325_write_register().
void ili9325_fill | ( | ili9325_color_t | ul_color | ) |
Fill the LCD buffer with the specified color.
ul_color | fill color. |
References ILI9325_LCD_HEIGHT, ILI9325_LCD_WIDTH, ili9325_set_cursor_position(), ili9325_write_ram(), and ili9325_write_ram_prepare().
ili9325_color_t ili9325_get_pixel | ( | uint32_t | ul_x, |
uint32_t | ul_y | ||
) |
Get a pixel from LCD.
ul_x | X coordinate of pixel. |
ul_y | Y coordinate of pixel. |
References Assert, ILI9325_LCD_HEIGHT, ILI9325_LCD_WIDTH, ili9325_read_ram(), ili9325_read_ram_prepare(), and ili9325_set_cursor_position().
uint32_t ili9325_init | ( | struct ili9325_opt_t * | p_opt | ) |
Initialize the ILI9325 lcd driver.
p_opt | pointer to ILI9325 option structure. |
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 gfx_ili9325_init().
|
static |
Read 16 bit data.
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.:
ili9325_color_t | The read color pixel |
References ILI9325_GRAM_DATA_REG.
Referenced by gfx_ili9325_get_pixel().
|
static |
Read data to LCD GRAM.
Referenced by ili9325_get_pixel().
|
static |
|
static |
Read data from LCD Register.
uc_reg | register address. |
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.
ul_lines | number of lines to scroll. |
References ILI9325_VERTICAL_SCROLL_CTRL, and ili9325_write_register().
|
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.
send_end_limits | True 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.
x | The x coordinate of the bottom right corner |
y | The 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.
us_x | X coordinate of upper-left corner on LCD. |
us_y | Y 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 | ||
) |
Set display direction.
dd | 0: horizontal direction, 1: vertical direction |
shd | horizontal increase(1) or decrease(0) |
scd | vertical increase(1) or decrease(0) |
References H_INCREASE, ILI9325_DRIVER_OUTPUT_CTRL1, ILI9325_DRIVER_OUTPUT_CTRL1_SS, ILI9325_DRIVER_OUTPUT_CTRL2, ILI9325_DRIVER_OUTPUT_CTRL2_GS, ILI9325_ENTRY_MODE, ILI9325_ENTRY_MODE_AM, ILI9325_ENTRY_MODE_DFM, ILI9325_ENTRY_MODE_HWM, ILI9325_ENTRY_MODE_ID, ILI9325_ENTRY_MODE_ORG, ILI9325_ENTRY_MODE_TRI, ili9325_write_register(), LANDSCAPE, and V_INCREASE.
void ili9325_set_foreground_color | ( | ili9325_color_t | ul_color | ) |
Set foreground color.
ul_color | foreground color. |
References LCD_DATA_CACHE_SIZE.
Referenced by ili9325_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.
start_x | The x coordinate of the top left corner |
start_y | The y coordinate of the top left corner |
end_x | The x coordinate of the bottom right corner |
end_y | The 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.
flags | Orientation 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.
x | The x coordinate of the top left corner |
y | The 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.
ul_x | Horizontal address start position |
ul_y | Vertical address start position |
ul_width | The width of the window. |
ul_height | The 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.:
color | The 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 |
Write data to LCD GRAM.
ul_color | 24-bits RGB color. |
Referenced by ili9325_draw_pixel(), ili9325_fill(), and ili9325_write_ram_buffer().
|
static |
Write multiple data in buffer to LCD controller.
p_ul_buf | data buffer. |
ul_size | size in pixels. |
References ili9325_write_ram().
Referenced by ili9325_draw_filled_rectangle(), and ili9325_draw_pixmap().
|
static |
Prepare to write GRAM data.
References ILI9325_GRAM_DATA_REG.
Referenced by ili9325_draw_filled_rectangle(), ili9325_draw_pixel(), ili9325_draw_pixmap(), ili9325_draw_prepare(), and ili9325_fill().
|
static |
Write data to LCD Register.
uc_reg | register address. |
us_data | data to be written. |
Referenced by ili9325_disable_scroll(), ili9325_display_off(), ili9325_display_on(), ili9325_enable_scroll(), ili9325_init(), ili9325_scroll(), ili9325_send_draw_limits(), ili9325_set_cursor_position(), ili9325_set_display_direction(), ili9325_set_orientation(), and ili9325_set_window().
|
static |
struct ili9325_font gfont = {10, 14} |
|
static |
|
static |
|
static |
|
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.