Content: Removed irrelevant code

This commit is contained in:
CQ793
2026-03-27 17:05:52 +08:00
committed by Y1hsiaochunnn
parent 33ed917172
commit 43b4d35b2e
3 changed files with 2 additions and 1101 deletions

View File

@ -35,14 +35,6 @@
#define LCD_SPI_CS_PIN GPIO_NUM_23 #define LCD_SPI_CS_PIN GPIO_NUM_23
#define LCD_SPI_DC_PIN GPIO_NUM_26 #define LCD_SPI_DC_PIN GPIO_NUM_26
#define LCD_BIT_PER_PIXEL (16)
#define DELAY_TIME_MS (3000)
#define LCD_MIPI_DSI_LANE_NUM (2) // 2 data lanes
#define MIPI_DSI_PHY_PWR_LDO_CHAN (3)
#define MIPI_DSI_PHY_PWR_LDO_VOLTAGE_MV (2500)
#define DISPLAY_SWAP_XY false #define DISPLAY_SWAP_XY false
#define DISPLAY_MIRROR_X true #define DISPLAY_MIRROR_X true
#define DISPLAY_MIRROR_Y false #define DISPLAY_MIRROR_Y false

View File

@ -5,18 +5,15 @@
#include "button.h" #include "button.h"
#include "esp_video.h" #include "esp_video.h"
#include "esp_video_init.h" #include "esp_video_init.h"
#include "esp_cam_sensor_xclk.h"
#include "esp_lcd_mipi_dsi.h"
#include "esp_lcd_panel_ops.h" #include "esp_lcd_panel_ops.h"
#include "esp_ldo_regulator.h"
#include <driver/spi_master.h> #include <driver/spi_master.h>
#include "esp_lcd_st7796.h" #include "esp_lcd_st7796.h"
#include "config.h" #include "config.h"
#include "lcd_init_cmds.h"
#include <esp_log.h> #include <esp_log.h>
#include <driver/i2c_master.h> #include <driver/i2c_master.h>
#include <esp_lvgl_port.h> #include <esp_lvgl_port.h>
#include "esp_lcd_touch_ft5x06.h" #include "esp_lcd_touch_ft5x06.h"
#define TAG "WaveshareEsp32p4" #define TAG "WaveshareEsp32p4"
class WaveshareEsp32p4 : public WifiBoard { class WaveshareEsp32p4 : public WifiBoard {
@ -48,21 +45,6 @@ private:
ESP_ERROR_CHECK(i2c_new_master_bus(&i2c_bus_cfg, &i2c_bus_)); ESP_ERROR_CHECK(i2c_new_master_bus(&i2c_bus_cfg, &i2c_bus_));
} }
static esp_err_t bsp_enable_dsi_phy_power(void) {
#if MIPI_DSI_PHY_PWR_LDO_CHAN > 0
// Turn on the power for MIPI DSI PHY, so it can go from "No Power" state to "Shutdown" state
static esp_ldo_channel_handle_t phy_pwr_chan = NULL;
esp_ldo_channel_config_t ldo_cfg = {
.chan_id = MIPI_DSI_PHY_PWR_LDO_CHAN,
.voltage_mv = MIPI_DSI_PHY_PWR_LDO_VOLTAGE_MV,
};
esp_ldo_acquire_channel(&ldo_cfg, &phy_pwr_chan);
ESP_LOGI(TAG, "MIPI DSI PHY Powered on");
#endif // BSP_MIPI_DSI_PHY_PWR_LDO_CHAN > 0
return ESP_OK;
}
void InitializeLCD() { void InitializeLCD() {
esp_lcd_panel_io_handle_t io = NULL; esp_lcd_panel_io_handle_t io = NULL;
esp_lcd_panel_handle_t disp_panel = NULL; esp_lcd_panel_handle_t disp_panel = NULL;