mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-03 18:40:59 +02:00
refactor(lcd)!: use gpio_num_t to define gpio numbers used by LCD driver
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "esp_lcd_types.h"
|
#include "esp_lcd_types.h"
|
||||||
|
#include "hal/mipi_dsi_types.h"
|
||||||
|
|
||||||
typedef struct esp_lcd_dsi_bus_t *esp_lcd_dsi_bus_handle_t; /*!< Type of MIPI DSI bus handle */
|
typedef struct esp_lcd_dsi_bus_t *esp_lcd_dsi_bus_handle_t; /*!< Type of MIPI DSI bus handle */
|
||||||
|
|
||||||
|
@@ -68,8 +68,8 @@ struct esp_lcd_i80_bus_t {
|
|||||||
portMUX_TYPE spinlock; // spinlock used to protect i80 bus members(hal, device_list, cur_trans)
|
portMUX_TYPE spinlock; // spinlock used to protect i80 bus members(hal, device_list, cur_trans)
|
||||||
i2s_hal_context_t hal; // Hal object
|
i2s_hal_context_t hal; // Hal object
|
||||||
size_t bus_width; // Number of data lines
|
size_t bus_width; // Number of data lines
|
||||||
int dc_gpio_num; // GPIO used for DC line
|
gpio_num_t dc_gpio_num;// GPIO used for DC line
|
||||||
int wr_gpio_num; // GPIO used for WR line
|
gpio_num_t wr_gpio_num;// GPIO used for WR line
|
||||||
intr_handle_t intr; // LCD peripheral interrupt handle
|
intr_handle_t intr; // LCD peripheral interrupt handle
|
||||||
#if CONFIG_PM_ENABLE
|
#if CONFIG_PM_ENABLE
|
||||||
esp_pm_lock_handle_t pm_lock; // lock APB frequency when necessary
|
esp_pm_lock_handle_t pm_lock; // lock APB frequency when necessary
|
||||||
@@ -100,7 +100,7 @@ struct lcd_i80_trans_descriptor_t {
|
|||||||
struct lcd_panel_io_i80_t {
|
struct lcd_panel_io_i80_t {
|
||||||
esp_lcd_panel_io_t base; // Base class of generic lcd panel io
|
esp_lcd_panel_io_t base; // Base class of generic lcd panel io
|
||||||
esp_lcd_i80_bus_t *bus; // Which bus the device is attached to
|
esp_lcd_i80_bus_t *bus; // Which bus the device is attached to
|
||||||
int cs_gpio_num; // GPIO used for CS line
|
gpio_num_t cs_gpio_num; // GPIO used for CS line
|
||||||
uint32_t pclk_hz; // PCLK clock frequency
|
uint32_t pclk_hz; // PCLK clock frequency
|
||||||
size_t clock_prescale; // Prescaler coefficient, determined by user's configured PCLK frequency
|
size_t clock_prescale; // Prescaler coefficient, determined by user's configured PCLK frequency
|
||||||
QueueHandle_t trans_queue; // Transaction queue, transactions in this queue are pending for scheduler to dispatch
|
QueueHandle_t trans_queue; // Transaction queue, transactions in this queue are pending for scheduler to dispatch
|
||||||
|
@@ -116,7 +116,7 @@ struct lcd_i80_trans_descriptor_t {
|
|||||||
struct lcd_panel_io_i80_t {
|
struct lcd_panel_io_i80_t {
|
||||||
esp_lcd_panel_io_t base; // Base class of generic lcd panel io
|
esp_lcd_panel_io_t base; // Base class of generic lcd panel io
|
||||||
esp_lcd_i80_bus_t *bus; // Which bus the device is attached to
|
esp_lcd_i80_bus_t *bus; // Which bus the device is attached to
|
||||||
int cs_gpio_num; // GPIO used for CS line
|
gpio_num_t cs_gpio_num; // GPIO used for CS line
|
||||||
unsigned int pclk_hz; // PCLK clock frequency
|
unsigned int pclk_hz; // PCLK clock frequency
|
||||||
size_t clock_prescale; // Prescaler coefficient, determined by user's configured PCLK frequency
|
size_t clock_prescale; // Prescaler coefficient, determined by user's configured PCLK frequency
|
||||||
QueueHandle_t trans_queue; // Transaction queue, transactions in this queue are pending for scheduler to dispatch
|
QueueHandle_t trans_queue; // Transaction queue, transactions in this queue are pending for scheduler to dispatch
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -23,10 +23,10 @@ typedef struct esp_lcd_i80_bus_t *esp_lcd_i80_bus_handle_t; /*!< Type of LCD i
|
|||||||
* @brief LCD Intel 8080 bus configuration structure
|
* @brief LCD Intel 8080 bus configuration structure
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int dc_gpio_num; /*!< GPIO used for D/C line */
|
gpio_num_t dc_gpio_num; /*!< GPIO used for D/C line */
|
||||||
int wr_gpio_num; /*!< GPIO used for WR line */
|
gpio_num_t wr_gpio_num; /*!< GPIO used for WR line */
|
||||||
lcd_clock_source_t clk_src; /*!< Clock source for the I80 LCD peripheral */
|
lcd_clock_source_t clk_src; /*!< Clock source for the I80 LCD peripheral */
|
||||||
int data_gpio_nums[ESP_LCD_I80_BUS_WIDTH_MAX]; /*!< GPIOs used for data lines */
|
gpio_num_t data_gpio_nums[ESP_LCD_I80_BUS_WIDTH_MAX]; /*!< GPIOs used for data lines */
|
||||||
size_t bus_width; /*!< Number of data lines, 8 or 16 */
|
size_t bus_width; /*!< Number of data lines, 8 or 16 */
|
||||||
size_t max_transfer_bytes; /*!< Maximum transfer size, this determines the length of internal DMA link */
|
size_t max_transfer_bytes; /*!< Maximum transfer size, this determines the length of internal DMA link */
|
||||||
union {
|
union {
|
||||||
@@ -64,7 +64,7 @@ esp_err_t esp_lcd_del_i80_bus(esp_lcd_i80_bus_handle_t bus);
|
|||||||
* @brief Panel IO configuration structure, for intel 8080 interface
|
* @brief Panel IO configuration structure, for intel 8080 interface
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int cs_gpio_num; /*!< GPIO used for CS line, set to -1 will declaim exclusively use of I80 bus */
|
gpio_num_t cs_gpio_num; /*!< GPIO used for CS line, set to -1 will declaim exclusively use of I80 bus */
|
||||||
uint32_t pclk_hz; /*!< Frequency of pixel clock */
|
uint32_t pclk_hz; /*!< Frequency of pixel clock */
|
||||||
size_t trans_queue_depth; /*!< Transaction queue size, larger queue, higher throughput */
|
size_t trans_queue_depth; /*!< Transaction queue size, larger queue, higher throughput */
|
||||||
esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data was transferred done */
|
esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; /*!< Callback invoked when color data was transferred done */
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -22,10 +22,10 @@ extern "C" {
|
|||||||
* @brief Parallel Panel IO configuration structure, for intel 8080 interface(8 data-lines) or SPI interface(1 data-lines)
|
* @brief Parallel Panel IO configuration structure, for intel 8080 interface(8 data-lines) or SPI interface(1 data-lines)
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int dc_gpio_num; /*!< GPIO used for D/C line */
|
gpio_num_t dc_gpio_num; /*!< GPIO used for D/C line */
|
||||||
int clk_gpio_num; /*!< GPIO used for CLK line */
|
gpio_num_t clk_gpio_num; /*!< GPIO used for CLK line */
|
||||||
int cs_gpio_num; /*!< GPIO used for CS line */
|
gpio_num_t cs_gpio_num; /*!< GPIO used for CS line */
|
||||||
int data_gpio_nums[ESP_PARLIO_LCD_WIDTH_MAX]; /*!< GPIOs used for data lines */
|
gpio_num_t data_gpio_nums[ESP_PARLIO_LCD_WIDTH_MAX]; /*!< GPIOs used for data lines */
|
||||||
size_t data_width; /*!< Number of data lines, 1(SPI) or 8(I80) */
|
size_t data_width; /*!< Number of data lines, 1(SPI) or 8(I80) */
|
||||||
uint32_t pclk_hz; /*!< Frequency of pixel clock */
|
uint32_t pclk_hz; /*!< Frequency of pixel clock */
|
||||||
parlio_clock_source_t clk_src; /*!< Clock source for the Parlio peripheral */
|
parlio_clock_source_t clk_src; /*!< Clock source for the Parlio peripheral */
|
||||||
|
@@ -20,8 +20,8 @@ typedef int esp_lcd_spi_bus_handle_t; /*!< Type of LCD SPI bus handle */
|
|||||||
* @brief Panel IO configuration structure, for SPI interface
|
* @brief Panel IO configuration structure, for SPI interface
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int cs_gpio_num; /*!< GPIO used for CS line */
|
gpio_num_t cs_gpio_num; /*!< GPIO used for CS line */
|
||||||
int dc_gpio_num; /*!< GPIO used to select the D/C line, set this to -1 if the D/C line is not used */
|
gpio_num_t dc_gpio_num; /*!< GPIO used to select the D/C line, set this to -1 if the D/C line is not used */
|
||||||
int spi_mode; /*!< Traditional SPI mode (0~3) */
|
int spi_mode; /*!< Traditional SPI mode (0~3) */
|
||||||
unsigned int pclk_hz; /*!< Frequency of pixel clock */
|
unsigned int pclk_hz; /*!< Frequency of pixel clock */
|
||||||
size_t trans_queue_depth; /*!< Size of internal transaction queue */
|
size_t trans_queue_depth; /*!< Size of internal transaction queue */
|
||||||
|
@@ -18,7 +18,6 @@ extern "C" {
|
|||||||
* @brief Configuration structure for panel device
|
* @brief Configuration structure for panel device
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int reset_gpio_num; /*!< GPIO used to reset the LCD panel, set to -1 if it's not used */
|
|
||||||
union {
|
union {
|
||||||
esp_lcd_color_space_t color_space; /*!< @deprecated Set RGB color space, please use rgb_ele_order instead */
|
esp_lcd_color_space_t color_space; /*!< @deprecated Set RGB color space, please use rgb_ele_order instead */
|
||||||
lcd_color_rgb_endian_t rgb_endian; /*!< @deprecated Set RGB data endian, please use rgb_ele_order instead */
|
lcd_color_rgb_endian_t rgb_endian; /*!< @deprecated Set RGB data endian, please use rgb_ele_order instead */
|
||||||
@@ -26,6 +25,7 @@ typedef struct {
|
|||||||
};
|
};
|
||||||
lcd_rgb_data_endian_t data_endian; /*!< Set the data endian for color data larger than 1 byte */
|
lcd_rgb_data_endian_t data_endian; /*!< Set the data endian for color data larger than 1 byte */
|
||||||
uint32_t bits_per_pixel; /*!< Color depth, in bpp */
|
uint32_t bits_per_pixel; /*!< Color depth, in bpp */
|
||||||
|
gpio_num_t reset_gpio_num; /*!< GPIO used to reset the LCD panel, set to -1 if it's not used */
|
||||||
struct {
|
struct {
|
||||||
uint32_t reset_active_high: 1; /*!< Setting this if the panel reset is high level active */
|
uint32_t reset_active_high: 1; /*!< Setting this if the panel reset is high level active */
|
||||||
} flags; /*!< LCD panel config flags */
|
} flags; /*!< LCD panel config flags */
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "esp_assert.h"
|
#include "esp_assert.h"
|
||||||
#include "hal/lcd_types.h"
|
#include "hal/lcd_types.h"
|
||||||
#include "hal/mipi_dsi_types.h"
|
#include "hal/gpio_types.h"
|
||||||
#include "hal/color_types.h"
|
#include "hal/color_types.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@@ -62,11 +62,11 @@ struct lcd_panel_io_parlio_t {
|
|||||||
esp_lcd_panel_io_t base; // Base class of generic lcd panel io
|
esp_lcd_panel_io_t base; // Base class of generic lcd panel io
|
||||||
parlio_tx_unit_handle_t tx_unit; // Parlio TX unit
|
parlio_tx_unit_handle_t tx_unit; // Parlio TX unit
|
||||||
size_t data_width; // Number of data lines
|
size_t data_width; // Number of data lines
|
||||||
int dc_gpio_num; // GPIO used for DC line
|
gpio_num_t dc_gpio_num; // GPIO used for DC line
|
||||||
int cs_gpio_num; // GPIO used for CS line
|
gpio_num_t cs_gpio_num; // GPIO used for CS line
|
||||||
int lcd_cmd_bits; // Bit width of LCD command
|
int lcd_cmd_bits; // Bit width of LCD command
|
||||||
int lcd_param_bits; // Bit width of LCD parameter
|
int lcd_param_bits; // Bit width of LCD parameter
|
||||||
void *user_ctx; // private data used when transfer color data
|
void *user_ctx; // private data used when transfer color data
|
||||||
esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; // color data trans done callback
|
esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; // color data trans done callback
|
||||||
struct {
|
struct {
|
||||||
unsigned int dc_cmd_level: 1; // Level of DC line in CMD phase
|
unsigned int dc_cmd_level: 1; // Level of DC line in CMD phase
|
||||||
|
@@ -123,12 +123,12 @@ struct esp_rgb_panel_t {
|
|||||||
uint8_t bb_fb_index; // Current frame buffer index which used by bounce buffer
|
uint8_t bb_fb_index; // Current frame buffer index which used by bounce buffer
|
||||||
size_t int_mem_align; // DMA buffer alignment for internal memory
|
size_t int_mem_align; // DMA buffer alignment for internal memory
|
||||||
size_t ext_mem_align; // DMA buffer alignment for external memory
|
size_t ext_mem_align; // DMA buffer alignment for external memory
|
||||||
int hsync_gpio_num; // GPIO used for HSYNC signal
|
gpio_num_t hsync_gpio_num; // GPIO used for HSYNC signal
|
||||||
int vsync_gpio_num; // GPIO used for VSYNC signal
|
gpio_num_t vsync_gpio_num; // GPIO used for VSYNC signal
|
||||||
int de_gpio_num; // GPIO used for DE signal, set to -1 if it's not used
|
gpio_num_t de_gpio_num; // GPIO used for DE signal, set to -1 if it's not used
|
||||||
int pclk_gpio_num; // GPIO used for PCLK signal, set to -1 if it's not used
|
gpio_num_t pclk_gpio_num; // GPIO used for PCLK signal, set to -1 if it's not used
|
||||||
int disp_gpio_num; // GPIO used for display control signal, set to -1 if it's not used
|
gpio_num_t disp_gpio_num; // GPIO used for display control signal, set to -1 if it's not used
|
||||||
int data_gpio_nums[SOC_LCDCAM_RGB_DATA_WIDTH]; // GPIOs used for data lines, we keep these GPIOs for action like "invert_color"
|
gpio_num_t data_gpio_nums[SOC_LCDCAM_RGB_DATA_WIDTH]; // GPIOs used for data lines, we keep these GPIOs for action like "invert_color"
|
||||||
uint64_t gpio_reserve_mask; // GPIOs reserved by this panel, used to revoke the GPIO reservation when the panel is deleted
|
uint64_t gpio_reserve_mask; // GPIOs reserved by this panel, used to revoke the GPIO reservation when the panel is deleted
|
||||||
uint32_t src_clk_hz; // Peripheral source clock resolution
|
uint32_t src_clk_hz; // Peripheral source clock resolution
|
||||||
esp_lcd_rgb_timing_t timings; // RGB timing parameters (e.g. pclk, sync pulse, porch width)
|
esp_lcd_rgb_timing_t timings; // RGB timing parameters (e.g. pclk, sync pulse, porch width)
|
||||||
@@ -766,36 +766,36 @@ static esp_err_t lcd_rgb_panel_configure_gpio(esp_rgb_panel_t *rgb_panel, const
|
|||||||
if (panel_config->data_gpio_nums[i] >= 0) {
|
if (panel_config->data_gpio_nums[i] >= 0) {
|
||||||
gpio_matrix_output(panel_config->data_gpio_nums[i],
|
gpio_matrix_output(panel_config->data_gpio_nums[i],
|
||||||
lcd_periph_rgb_signals.panels[panel_id].data_sigs[i], false, false);
|
lcd_periph_rgb_signals.panels[panel_id].data_sigs[i], false, false);
|
||||||
gpio_reserve_mask |= (1 << panel_config->data_gpio_nums[i]);
|
gpio_reserve_mask |= (1ULL << panel_config->data_gpio_nums[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (panel_config->hsync_gpio_num >= 0) {
|
if (panel_config->hsync_gpio_num >= 0) {
|
||||||
gpio_matrix_output(panel_config->hsync_gpio_num,
|
gpio_matrix_output(panel_config->hsync_gpio_num,
|
||||||
lcd_periph_rgb_signals.panels[panel_id].hsync_sig, false, false);
|
lcd_periph_rgb_signals.panels[panel_id].hsync_sig, false, false);
|
||||||
gpio_reserve_mask |= (1 << panel_config->hsync_gpio_num);
|
gpio_reserve_mask |= (1ULL << panel_config->hsync_gpio_num);
|
||||||
}
|
}
|
||||||
if (panel_config->vsync_gpio_num >= 0) {
|
if (panel_config->vsync_gpio_num >= 0) {
|
||||||
gpio_matrix_output(panel_config->vsync_gpio_num,
|
gpio_matrix_output(panel_config->vsync_gpio_num,
|
||||||
lcd_periph_rgb_signals.panels[panel_id].vsync_sig, false, false);
|
lcd_periph_rgb_signals.panels[panel_id].vsync_sig, false, false);
|
||||||
gpio_reserve_mask |= (1 << panel_config->vsync_gpio_num);
|
gpio_reserve_mask |= (1ULL << panel_config->vsync_gpio_num);
|
||||||
}
|
}
|
||||||
// PCLK may not be necessary in some cases (i.e. VGA output)
|
// PCLK may not be necessary in some cases (i.e. VGA output)
|
||||||
if (panel_config->pclk_gpio_num >= 0) {
|
if (panel_config->pclk_gpio_num >= 0) {
|
||||||
gpio_matrix_output(panel_config->pclk_gpio_num,
|
gpio_matrix_output(panel_config->pclk_gpio_num,
|
||||||
lcd_periph_rgb_signals.panels[panel_id].pclk_sig, false, false);
|
lcd_periph_rgb_signals.panels[panel_id].pclk_sig, false, false);
|
||||||
gpio_reserve_mask |= (1 << panel_config->pclk_gpio_num);
|
gpio_reserve_mask |= (1ULL << panel_config->pclk_gpio_num);
|
||||||
}
|
}
|
||||||
// DE signal might not be necessary for some RGB LCD
|
// DE signal might not be necessary for some RGB LCD
|
||||||
if (panel_config->de_gpio_num >= 0) {
|
if (panel_config->de_gpio_num >= 0) {
|
||||||
gpio_matrix_output(panel_config->de_gpio_num,
|
gpio_matrix_output(panel_config->de_gpio_num,
|
||||||
lcd_periph_rgb_signals.panels[panel_id].de_sig, false, false);
|
lcd_periph_rgb_signals.panels[panel_id].de_sig, false, false);
|
||||||
gpio_reserve_mask |= (1 << panel_config->de_gpio_num);
|
gpio_reserve_mask |= (1ULL << panel_config->de_gpio_num);
|
||||||
}
|
}
|
||||||
// disp enable GPIO is optional, it is a general purpose output GPIO
|
// disp enable GPIO is optional, it is a general purpose output GPIO
|
||||||
if (panel_config->disp_gpio_num >= 0) {
|
if (panel_config->disp_gpio_num >= 0) {
|
||||||
gpio_matrix_output(panel_config->disp_gpio_num,
|
gpio_matrix_output(panel_config->disp_gpio_num,
|
||||||
lcd_periph_rgb_signals.panels[panel_id].disp_sig, false, false);
|
lcd_periph_rgb_signals.panels[panel_id].disp_sig, false, false);
|
||||||
gpio_reserve_mask |= (1 << panel_config->disp_gpio_num);
|
gpio_reserve_mask |= (1ULL << panel_config->disp_gpio_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
// reserve the GPIOs
|
// reserve the GPIOs
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -10,7 +10,6 @@
|
|||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "esp_lcd_types.h"
|
#include "esp_lcd_types.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "hal/lcd_types.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -156,12 +155,12 @@ typedef struct {
|
|||||||
size_t psram_trans_align __attribute__((deprecated)); /*!< Alignment of buffers (frame buffer) that allocated in PSRAM */
|
size_t psram_trans_align __attribute__((deprecated)); /*!< Alignment of buffers (frame buffer) that allocated in PSRAM */
|
||||||
size_t dma_burst_size; /*!< DMA burst size, in bytes */
|
size_t dma_burst_size; /*!< DMA burst size, in bytes */
|
||||||
};
|
};
|
||||||
int hsync_gpio_num; /*!< GPIO used for HSYNC signal */
|
gpio_num_t hsync_gpio_num; /*!< GPIO used for HSYNC signal */
|
||||||
int vsync_gpio_num; /*!< GPIO used for VSYNC signal */
|
gpio_num_t vsync_gpio_num; /*!< GPIO used for VSYNC signal */
|
||||||
int de_gpio_num; /*!< GPIO used for DE signal, set to -1 if it's not used */
|
gpio_num_t de_gpio_num; /*!< GPIO used for DE signal, set to -1 if it's not used */
|
||||||
int pclk_gpio_num; /*!< GPIO used for PCLK signal, set to -1 if it's not used */
|
gpio_num_t pclk_gpio_num; /*!< GPIO used for PCLK signal, set to -1 if it's not used */
|
||||||
int disp_gpio_num; /*!< GPIO used for display control signal, set to -1 if it's not used */
|
gpio_num_t disp_gpio_num; /*!< GPIO used for display control signal, set to -1 if it's not used */
|
||||||
int data_gpio_nums[SOC_LCDCAM_RGB_DATA_WIDTH]; /*!< GPIOs used for data lines */
|
gpio_num_t data_gpio_nums[SOC_LCDCAM_RGB_DATA_WIDTH]; /*!< GPIOs used for data lines */
|
||||||
struct {
|
struct {
|
||||||
uint32_t disp_active_low: 1; /*!< If this flag is enabled, a low level of display control signal can turn the screen on; vice versa */
|
uint32_t disp_active_low: 1; /*!< If this flag is enabled, a low level of display control signal can turn the screen on; vice versa */
|
||||||
uint32_t refresh_on_demand: 1; /*!< If this flag is enabled, the host only refresh the frame buffer in `esp_lcd_panel_draw_bitmap` and `esp_lcd_rgb_panel_refresh`. */
|
uint32_t refresh_on_demand: 1; /*!< If this flag is enabled, the host only refresh the frame buffer in `esp_lcd_panel_draw_bitmap` and `esp_lcd_rgb_panel_refresh`. */
|
||||||
|
@@ -47,7 +47,7 @@ typedef struct {
|
|||||||
esp_lcd_panel_io_t base; // Base class of generic lcd panel io
|
esp_lcd_panel_io_t base; // Base class of generic lcd panel io
|
||||||
spi_device_handle_t spi_dev; // SPI device handle
|
spi_device_handle_t spi_dev; // SPI device handle
|
||||||
size_t spi_trans_max_bytes; // Maximum bytes that can be transmitted in one spi transaction
|
size_t spi_trans_max_bytes; // Maximum bytes that can be transmitted in one spi transaction
|
||||||
int dc_gpio_num; // D/C line GPIO number
|
gpio_num_t dc_gpio_num; // D/C line GPIO number
|
||||||
esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; // User register's callback, invoked when color data trans done
|
esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done; // User register's callback, invoked when color data trans done
|
||||||
void *user_ctx; // User's private data, passed directly to callback on_color_trans_done
|
void *user_ctx; // User's private data, passed directly to callback on_color_trans_done
|
||||||
size_t queue_size; // Size of transaction queue
|
size_t queue_size; // Size of transaction queue
|
||||||
|
@@ -43,7 +43,7 @@ static esp_err_t panel_nt35510_sleep(esp_lcd_panel_t *panel, bool sleep);
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
esp_lcd_panel_t base;
|
esp_lcd_panel_t base;
|
||||||
esp_lcd_panel_io_handle_t io;
|
esp_lcd_panel_io_handle_t io;
|
||||||
int reset_gpio_num;
|
gpio_num_t reset_gpio_num;
|
||||||
bool reset_level;
|
bool reset_level;
|
||||||
int x_gap;
|
int x_gap;
|
||||||
int y_gap;
|
int y_gap;
|
||||||
|
@@ -56,7 +56,7 @@ typedef struct {
|
|||||||
esp_lcd_panel_t base;
|
esp_lcd_panel_t base;
|
||||||
esp_lcd_panel_io_handle_t io;
|
esp_lcd_panel_io_handle_t io;
|
||||||
uint8_t height;
|
uint8_t height;
|
||||||
int reset_gpio_num;
|
gpio_num_t reset_gpio_num;
|
||||||
int x_gap;
|
int x_gap;
|
||||||
int y_gap;
|
int y_gap;
|
||||||
unsigned int bits_per_pixel;
|
unsigned int bits_per_pixel;
|
||||||
|
@@ -46,7 +46,7 @@ static esp_err_t panel_st7789_sleep(esp_lcd_panel_t *panel, bool sleep);
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
esp_lcd_panel_t base;
|
esp_lcd_panel_t base;
|
||||||
esp_lcd_panel_io_handle_t io;
|
esp_lcd_panel_io_handle_t io;
|
||||||
int reset_gpio_num;
|
gpio_num_t reset_gpio_num;
|
||||||
bool reset_level;
|
bool reset_level;
|
||||||
int x_gap;
|
int x_gap;
|
||||||
int y_gap;
|
int y_gap;
|
||||||
|
Reference in New Issue
Block a user