Driver for the EK79007 LCD panel.
More...
#include <driver_ek79007.hpp>
|
| DriverEK79007 () |
| Default constructor for the DriverEK79007 class.
|
|
| ~DriverEK79007 () override |
| Destructor for the DriverEK79007 class.
|
|
esp_err_t | init (gpio_num_t reset_pin, gpio_num_t bk_pin) override |
| Initializes the EK79007 LCD panel driver.
|
|
esp_err_t | deinit () override |
| Deinitializes the EK79007 LCD panel driver.
|
|
esp_err_t | set_pixel (uint32_t x, uint32_t y, uint32_t color) override |
| Sets a pixel at the specified coordinates to the given color.
|
|
esp_err_t | send_frame_buffer (const void *frame_buffer) override |
| Sends a frame buffer to the EK79007 LCD panel.
|
|
IRAM_ATTR bool | refresh_frame_buffer (esp_lcd_panel_handle_t panel, esp_lcd_dpi_panel_event_data_t *edata, void *user_ctx) |
| Refreshes the frame buffer for the EK79007 LCD panel.
|
|
| DriverLCD ()=default |
| Default constructor for the DriverLCD class.
|
|
virtual | ~DriverLCD ()=default |
| Default virtual destructor for the DriverLCD class.
|
|
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.
|
|
|
SemaphoreHandle_t | refresh_semaphore |
| Refresh semaphore for synchronizing frame buffer updates.
|
|
|
uint16_t | panel_clk_freq_mhz |
| Horizontal pixel clock frequency in MHz.
|
|
uint32_t | hsync_pulse_width |
| Horizontal sync width, in pixel clock.
|
|
uint32_t | hsync_back_porch |
| Horizontal back porch, number of pixel clock between hsync and start of line active data.
|
|
uint32_t | hsync_front_porch |
| Horizontal front porch, number of pixel clock between the end of active data and the next hsync.
|
|
uint32_t | vsync_pulse_width |
| Vertical sync width, in number of lines.
|
|
uint32_t | vsync_back_porch |
| Vertical back porch, number of invalid lines between vsync and start of frame.
|
|
uint32_t | vsync_front_porch |
| Vertical front porch, number of invalid lines between the end of frame and the next vsync.
|
|
uint8_t | mipi_lane_num |
| Number of MIPI DSI lanes used for the panel.
|
|
uint16_t | mipi_dsi_max_data_rate_mbps |
| Maximum data rate of MIPI DSI in Mbps.
|
|
|
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.
|
|
Driver for the EK79007 LCD panel.
This class provides methods to initialize, deinitialize, and send frame buffers to the EK79007 LCD panel. It inherits from the DriverLCD class and implements the necessary methods for LCD operations.
◆ DriverEK79007()
Ragot::DriverEK79007::DriverEK79007 |
( |
| ) |
|
◆ ~DriverEK79007()
Ragot::DriverEK79007::~DriverEK79007 |
( |
| ) |
|
|
override |
Destructor for the DriverEK79007 class.
Cleans up resources used by the driver.
◆ bsp_enable_dsi_phy_power()
void Ragot::DriverEK79007::bsp_enable_dsi_phy_power |
( |
| ) |
|
|
private |
Enables the MIPI DSI PHY power.
This method powers on the MIPI DSI PHY by acquiring the appropriate LDO channel.
◆ bsp_init_lcd_backlight()
void Ragot::DriverEK79007::bsp_init_lcd_backlight |
( |
gpio_num_t | bk_pin | ) |
|
|
private |
Initializes the LCD backlight.
This method configures the GPIO pin for the backlight and sets it to high to turn on the backlight.
- Parameters
-
bk_pin | GPIO pin number for the backlight control. |
◆ deinit()
esp_err_t Ragot::DriverEK79007::deinit |
( |
| ) |
|
|
overridevirtual |
Deinitializes the EK79007 LCD panel driver.
This method cleans up resources used by the driver, including deleting the panel handler and freeing the refresh semaphore.
- Returns
- esp_err_t ESP_OK on success, or an error code on failure.
Implements Ragot::DriverLCD.
◆ init()
esp_err_t Ragot::DriverEK79007::init |
( |
gpio_num_t | reset_pin, |
|
|
gpio_num_t | bk_pin ) |
|
overridevirtual |
Initializes the EK79007 LCD panel driver.
This method sets up the panel with the specified reset and backlight GPIO pins, configures the panel parameters, and registers the refresh callback.
- Parameters
-
reset_pin | GPIO pin for panel reset. |
bk_pin | GPIO pin for backlight control. |
- Returns
- esp_err_t ESP_OK on success, or an error code on failure.
Implements Ragot::DriverLCD.
◆ refresh_frame_buffer()
IRAM_ATTR bool Ragot::DriverEK79007::refresh_frame_buffer |
( |
esp_lcd_panel_handle_t | panel, |
|
|
esp_lcd_dpi_panel_event_data_t * | edata, |
|
|
void * | user_ctx ) |
Refreshes the frame buffer for the EK79007 LCD panel.
This method is called when the panel refresh is done. It handles the actual drawing of the frame buffer to the panel and releases the refresh semaphore.
- Parameters
-
panel | Pointer to the LCD panel handle. |
edata | Pointer to the event data for the DPI panel. |
user_ctx | User context pointer, which is this driver instance. |
- Returns
- true if successful, false otherwise.
◆ send_frame_buffer()
esp_err_t Ragot::DriverEK79007::send_frame_buffer |
( |
const void * | frame_buffer | ) |
|
|
overridevirtual |
Sends a frame buffer to the EK79007 LCD panel.
This method sends the provided frame buffer to the panel for display. It waits for the refresh semaphore to be available before sending the frame buffer.
- Parameters
-
frame_buffer | Pointer to the frame buffer data. |
- Returns
- esp_err_t ESP_OK on success, or an error code on failure.
Implements Ragot::DriverLCD.
◆ set_pixel()
esp_err_t Ragot::DriverEK79007::set_pixel |
( |
uint32_t | x, |
|
|
uint32_t | y, |
|
|
uint32_t | color ) |
|
inlineoverridevirtual |
Sets a pixel at the specified coordinates to the given color.
This method is not implemented for the EK79007 driver and will return ESP_FAIL.
- Parameters
-
x | X coordinate of the pixel. |
y | Y coordinate of the pixel. |
color | Color value to set the pixel to. |
- Returns
- esp_err_t ESP_FAIL as this method is not implemented.
Implements Ragot::DriverLCD.
◆ hsync_back_porch
uint32_t Ragot::DriverEK79007::hsync_back_porch |
|
private |
Horizontal back porch, number of pixel clock between hsync and start of line active data.
◆ hsync_front_porch
uint32_t Ragot::DriverEK79007::hsync_front_porch |
|
private |
Horizontal front porch, number of pixel clock between the end of active data and the next hsync.
◆ hsync_pulse_width
uint32_t Ragot::DriverEK79007::hsync_pulse_width |
|
private |
Horizontal sync width, in pixel clock.
◆ mipi_dsi_max_data_rate_mbps
uint16_t Ragot::DriverEK79007::mipi_dsi_max_data_rate_mbps |
|
private |
Maximum data rate of MIPI DSI in Mbps.
◆ mipi_lane_num
uint8_t Ragot::DriverEK79007::mipi_lane_num |
|
private |
Number of MIPI DSI lanes used for the panel.
◆ panel_clk_freq_mhz
uint16_t Ragot::DriverEK79007::panel_clk_freq_mhz |
|
private |
Horizontal pixel clock frequency in MHz.
◆ refresh_semaphore
SemaphoreHandle_t Ragot::DriverEK79007::refresh_semaphore |
Refresh semaphore for synchronizing frame buffer updates.
This semaphore is used to ensure that the frame buffer is updated only when it is safe to do so.
◆ vsync_back_porch
uint32_t Ragot::DriverEK79007::vsync_back_porch |
|
private |
Vertical back porch, number of invalid lines between vsync and start of frame.
◆ vsync_front_porch
uint32_t Ragot::DriverEK79007::vsync_front_porch |
|
private |
Vertical front porch, number of invalid lines between the end of frame and the next vsync.
◆ vsync_pulse_width
uint32_t Ragot::DriverEK79007::vsync_pulse_width |
|
private |
Vertical sync width, in number of lines.
The documentation for this class was generated from the following files: