Microchip® Advanced Software Framework

ili9341.h File Reference

ILI9341 Display Controller Component Driver.

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

#include <ioport.h>
#include <compiler.h>
#include "conf_ili9341.h"

Macros

#define ILI9341_COLOR(r, g, b)
 This macro generates a 16-bit native color for the display from a 24-bit RGB value. More...
 
#define ILI9341_DEFAULT_HEIGHT   240
 Height of display using default orientation. More...
 
#define ILI9341_DEFAULT_WIDTH   320
 Width of display using default orientation. More...
 
#define ILI9341_SWITCH_XY_HEIGHT   320
 Height of display using swapped X/Y orientation. More...
 
#define ILI9341_SWITCH_XY_WIDTH   240
 Width of display using swapped X/Y orientation. More...
 
Display orientation flags
#define ILI9341_FLIP_X   1
 Bit mask for flipping X for ili9341_set_orientation() More...
 
#define ILI9341_FLIP_Y   2
 Bit mask for flipping Y for ili9341_set_orientation() More...
 
#define ILI9341_SWITCH_XY   4
 Bit mask for swapping X and Y for ili9341_set_orientation() More...
 

Typedefs

typedef uint16_t ili9341_color_t
 Type define for an integer type large enough to store a pixel color. More...
 
typedef int16_t ili9341_coord_t
 Type define for an integer type large enough to store a pixel coordinate. More...
 

Functions

Controller primitive graphical functions
ili9341_color_t ili9341_read_gram (void)
 Read a single color from the graphical memory. More...
 
void ili9341_write_gram (ili9341_color_t color)
 Write the graphical memory with a single color pixel. More...
 
void ili9341_set_top_left_limit (ili9341_coord_t x, ili9341_coord_t y)
 Set the display top left drawing limit. More...
 
void ili9341_set_bottom_right_limit (ili9341_coord_t x, ili9341_coord_t y)
 Set the display bottom right drawing limit. More...
 
void ili9341_set_limits (ili9341_coord_t start_x, ili9341_coord_t start_y, ili9341_coord_t end_x, ili9341_coord_t end_y)
 Set the full display drawing limits. More...
 
void ili9341_set_orientation (uint8_t flags)
 Sets the orientation of the display data. More...
 
void ili9341_copy_pixels_to_screen (const ili9341_color_t *pixels, uint32_t count)
 Copy pixels from SRAM to the screen. More...
 
void ili9341_copy_pixels_from_screen (ili9341_color_t *pixels, uint32_t count)
 Copy pixels from the screen to a pixel buffer. More...
 
void ili9341_duplicate_pixel (const ili9341_color_t color, uint32_t count)
 Set a given number of pixels to the same color. More...
 
Controller and display initialization and management
void ili9341_init (void)
 Initialize the controller. More...
 
static void ili9341_backlight_on (void)
 Function to turn on the display back light. More...
 
static void ili9341_backlight_off (void)
 Function to turn off the display back light. More...