Base class for LCD drivers. More...
#include <driver_lcd.hpp>
Public Member Functions | |
DriverLCD ()=default | |
Default constructor for the DriverLCD class. | |
virtual | ~DriverLCD ()=default |
Default virtual destructor for the DriverLCD class. | |
virtual esp_err_t | init (gpio_num_t reset_pin, gpio_num_t bk_pin)=0 |
Initializes the LCD driver with the specified reset and backlight GPIO pins. | |
virtual esp_err_t | deinit ()=0 |
Deinitializes the LCD driver. | |
virtual esp_err_t | set_pixel (uint32_t x, uint32_t y, uint32_t color)=0 |
Sets a pixel at the specified coordinates to the given color. | |
virtual esp_err_t | send_frame_buffer (const void *frame_buffer)=0 |
Sends a frame buffer to the LCD panel. | |
const size_t | get_width () const |
Gets the width of the LCD panel. | |
size_t | get_width () |
Gets the height of the LCD panel. | |
const size_t | get_height () const |
Gets the height of the LCD panel. | |
size_t | get_height () |
Gets the height of the LCD panel. | |
const lcd_color_rgb_pixel_format_t | get_pixel_format () const |
Get the pixel format object. | |
lcd_color_rgb_pixel_format_t | get_pixel_format () |
Get the pixel format object. | |
const esp_lcd_panel_handle_t | get_handler () const |
Get the handler object. | |
esp_lcd_panel_handle_t | get_handler () |
Get the handler object. | |
const bool | is_initialized () const |
Checks if the LCD driver is initialized. | |
bool | is_initialized () |
Checks if the LCD driver is initialized. | |
Protected Attributes | |
bool | initialized = false |
Flag indicating if the LCD driver is initialized. | |
size_t | width |
Width of the LCD panel in pixels. | |
size_t | height |
Height of the LCD panel in pixels. | |
lcd_color_rgb_pixel_format_t | pixel_format |
Pixel format of the LCD panel. | |
esp_lcd_panel_handle_t | handler |
Handle to the LCD panel. | |
Base class for LCD drivers.
This class provides an interface for LCD drivers, including methods for initialization, deinitialization, setting pixels, and sending frame buffers. It also provides access to the LCD panel's width, height, pixel format, and handler.
|
default |
Default constructor for the DriverLCD class.
Initializes the LCD driver with default values.
|
virtualdefault |
Default virtual destructor for the DriverLCD class.
Cleans up resources used by the LCD driver.
|
pure virtual |
Deinitializes the LCD driver.
This method should be implemented by derived classes to clean up resources used by the LCD panel.
Implemented in Ragot::Driver_ST7789, and Ragot::DriverEK79007.
|
inline |
Get the handler object.
|
inline |
Get the handler object.
|
inline |
Gets the height of the LCD panel.
|
inline |
Gets the height of the LCD panel.
|
inline |
Get the pixel format object.
|
inline |
Get the pixel format object.
|
inline |
Gets the height of the LCD panel.
|
inline |
Gets the width of the LCD panel.
|
pure virtual |
Initializes the LCD driver with the specified reset and backlight GPIO pins.
This method should be implemented by derived classes to set up the LCD panel.
reset_pin | GPIO pin for panel reset. |
bk_pin | GPIO pin for backlight control. |
Implemented in Ragot::Driver_ST7789, and Ragot::DriverEK79007.
|
inline |
Checks if the LCD driver is initialized.
|
inline |
Checks if the LCD driver is initialized.
|
pure virtual |
Sends a frame buffer to the LCD panel.
This method should be implemented by derived classes to send the provided frame buffer to the panel for display.
frame_buffer | Pointer to the frame buffer data. |
Implemented in Ragot::Driver_ST7789, and Ragot::DriverEK79007.
|
pure virtual |
Sets a pixel at the specified coordinates to the given color.
This method should be implemented by derived classes to set a pixel on the LCD panel.
x | X coordinate of the pixel. |
y | Y coordinate of the pixel. |
color | Color value for the pixel. |
Implemented in Ragot::Driver_ST7789, and Ragot::DriverEK79007.
|
protected |
Handle to the LCD panel.
|
protected |
Height of the LCD panel in pixels.
|
protected |
Flag indicating if the LCD driver is initialized.
|
protected |
Pixel format of the LCD panel.
|
protected |
Width of the LCD panel in pixels.