Skip to content

Commit

Permalink
bugfix(lcd): Fixed low Lane bit rate and other known issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Horion0415 committed Nov 14, 2024
1 parent 1795f91 commit 683b7a2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
25 changes: 11 additions & 14 deletions components/lcd/esp_lcd_ili9881c/esp_lcd_ili9881c.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,6 @@ esp_err_t esp_lcd_new_panel_ili9881c(const esp_lcd_panel_io_handle_t io, const e
break;
}

// The ID register is on the CMD_Page 1
uint8_t ID1, ID2, ID3;
esp_lcd_panel_io_tx_param(io, ILI9881C_CMD_CNDBKxSEL, (uint8_t[]) {
ILI9881C_CMD_BKxSEL_BYTE0, ILI9881C_CMD_BKxSEL_BYTE1, ILI9881C_CMD_BKxSEL_BYTE2_PAGE1
}, 3);
esp_lcd_panel_io_rx_param(io, 0x00, &ID1, 1);
esp_lcd_panel_io_rx_param(io, 0x01, &ID2, 1);
esp_lcd_panel_io_rx_param(io, 0x02, &ID3, 1);
ESP_LOGI(TAG, "ID1: 0x%x, ID2: 0x%x, ID3: 0x%x", ID1, ID2, ID3);

ili9881c->io = io;
ili9881c->init_cmds = vendor_config->init_cmds;
ili9881c->init_cmds_size = vendor_config->init_cmds_size;
Expand Down Expand Up @@ -367,8 +357,8 @@ static esp_err_t panel_ili9881c_del(esp_lcd_panel_t *panel)
}
// Delete MIPI DPI panel
ili9881c->del(panel);
free(ili9881c);
ESP_LOGD(TAG, "del ili9881c panel @%p", ili9881c);
free(ili9881c);

return ESP_OK;
}
Expand Down Expand Up @@ -397,10 +387,17 @@ static esp_err_t panel_ili9881c_init(esp_lcd_panel_t *panel)
return ESP_ERR_INVALID_ARG;
}

// back to CMD_Page 1
ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, ILI9881C_CMD_CNDBKxSEL, (uint8_t[]) {
// The ID register is on the CMD_Page 1
uint8_t ID1, ID2, ID3;
esp_lcd_panel_io_tx_param(io, ILI9881C_CMD_CNDBKxSEL, (uint8_t[]) {
ILI9881C_CMD_BKxSEL_BYTE0, ILI9881C_CMD_BKxSEL_BYTE1, ILI9881C_CMD_BKxSEL_BYTE2_PAGE1
}, 3), TAG, "send command failed");
}, 3);
esp_lcd_panel_io_rx_param(io, 0x00, &ID1, 1);
esp_lcd_panel_io_rx_param(io, 0x01, &ID2, 1);
esp_lcd_panel_io_rx_param(io, 0x02, &ID3, 1);
ESP_LOGI(TAG, "ID1: 0x%x, ID2: 0x%x, ID3: 0x%x", ID1, ID2, ID3);

// For modifying MIPI-DSI lane settings
ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, ILI9881C_PAD_CONTROL, (uint8_t[]) {
lane_command,
}, 1), TAG, "send command failed");
Expand Down
2 changes: 1 addition & 1 deletion components/lcd/esp_lcd_ili9881c/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "1.0.0"
version: "1.0.1"
targets:
- esp32p4
description: ESP LCD ILI9881C (MIPI DSI)
Expand Down
2 changes: 1 addition & 1 deletion components/lcd/esp_lcd_st7796/esp_lcd_st7796_mipi.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ static esp_err_t panel_st7796_del(esp_lcd_panel_t *panel)
}
// Delete MIPI DPI panel
st7796->del(panel);
free(st7796);
ESP_LOGD(TAG, "del st7796 panel @%p", st7796);
free(st7796);

return ESP_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion components/lcd/esp_lcd_st7796/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "1.3.0"
version: "1.3.1"
targets:
- esp32s2
- esp32s3
Expand Down
2 changes: 1 addition & 1 deletion components/lcd/esp_lcd_st7796/include/esp_lcd_st7796.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ esp_err_t esp_lcd_new_panel_st7796(const esp_lcd_panel_io_handle_t io, const esp
.bus_id = 0, \
.num_data_lanes = 1, \
.phy_clk_src = MIPI_DSI_PHY_CLK_SRC_DEFAULT, \
.lane_bit_rate_mbps = 250, \
.lane_bit_rate_mbps = 480, \
}

/**
Expand Down

0 comments on commit 683b7a2

Please sign in to comment.