HX8347A display controller driver.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | HX8347A_COLOR(r, g, b) |
This macro generates a 16-bit native color for the display from a 24-bit RGB value. More... | |
#define | HX8347A_DEFAULT_HEIGHT 320 |
Height of display using default orientation. More... | |
#define | HX8347A_DEFAULT_WIDTH 240 |
Width of display using default orientation. More... | |
#define | HX8347A_FLIP_X 1 |
Bit mask for flipping X for hx8347a_set_orientation() More... | |
#define | HX8347A_FLIP_Y 2 |
Bit mask for flipping Y for hx8347a_set_orientation() More... | |
#define | HX8347A_SWITCH_XY 4 |
Bit mask for swapping X and Y for hx8347a_set_orientation() More... | |
#define | HX8347A_SWITCH_XY_HEIGHT 240 |
Height of display using swapped X/Y orientation. More... | |
#define | HX8347A_SWITCH_XY_WIDTH 320 |
Width of display using swapped X/Y orientation. More... | |
Typedefs | |
typedef uint16_t | hx8347a_color_t |
typedef int16_t | hx8347a_coord_t |
Functions | |
Register manipulation functions | |
void | hx8347a_write_register (uint8_t address, uint8_t value) |
Write a specific register in the controller with a single byte. More... | |
uint8_t | hx8347a_read_register (uint8_t address) |
Read the value of a specific register in the controller. More... | |
void | hx8347a_clear_register (uint8_t address, uint8_t bitmask) |
Helper function for easier register access. More... | |
void | hx8347a_set_register (uint8_t address, uint8_t bitmask) |
Helper function for easier register access. More... | |
Controller primitive graphical functions | |
hx8347a_color_t | hx8347a_read_gram (void) |
Read a single color from the graphical memory. More... | |
void | hx8347a_write_gram (hx8347a_color_t color) |
Write the graphical memory with a single color pixel. More... | |
void | hx8347a_set_top_left_limit (hx8347a_coord_t x, hx8347a_coord_t y) |
Set the display top left drawing limit. More... | |
void | hx8347a_set_bottom_right_limit (hx8347a_coord_t x, hx8347a_coord_t y) |
Set the display bottom right drawing limit. More... | |
void | hx8347a_set_limits (hx8347a_coord_t start_x, hx8347a_coord_t start_y, hx8347a_coord_t end_x, hx8347a_coord_t end_y) |
Set the fully display drawing limits. More... | |
void | hx8347a_set_orientation (uint8_t flags) |
Set the display orientation. More... | |
void | hx8347a_copy_pixels_to_screen (const hx8347a_color_t *pixels, uint32_t count) |
Copy pixels from SRAM to the screen. More... | |
void | hx8347a_copy_progmem_pixels_to_screen (hx8347a_color_t PROGMEM_PTR_T pixels, uint32_t count) |
Copy pixels from progmem to the screen. More... | |
void | hx8347a_copy_pixels_from_screen (hx8347a_color_t *pixels, uint32_t count) |
Copy pixels from the screen to a pixel buffer. More... | |
void | hx8347a_duplicate_pixel (const hx8347a_color_t color, uint32_t count) |
Write a set color to the screen. More... | |
Controller and display initialization and management | |
void | hx8347a_init (void) |
Initialize the controller. More... | |
void | hx8347a_exit_standby (void) |
Send display commands to exit standby mode. More... | |
void | hx8347a_reset_display (void) |
Reset the display using the digital control interface. More... | |
static __always_inline void | hx8347a_backlight_on (void) |
Function to turn on the display back light. More... | |
static __always_inline void | hx8347a_backlight_off (void) |
Function to turn off the display back light. More... | |