From 6def3c5644ec6611d987be3b53135eb67131ae26 Mon Sep 17 00:00:00 2001 From: morris Date: Mon, 4 Nov 2024 21:29:14 +0800 Subject: [PATCH] fix(i2c_lcd): wrong return type for esp_lcd_new_panel_io_i2c when build for C++ project --- components/esp_lcd/include/esp_lcd_panel_io.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/esp_lcd/include/esp_lcd_panel_io.h b/components/esp_lcd/include/esp_lcd_panel_io.h index 35ec896dc0..816b1dd0fd 100644 --- a/components/esp_lcd/include/esp_lcd_panel_io.h +++ b/components/esp_lcd/include/esp_lcd_panel_io.h @@ -307,9 +307,9 @@ esp_err_t esp_lcd_new_panel_io_i80(esp_lcd_i80_bus_handle_t bus, const esp_lcd_p * - ESP_ERR_NO_MEM if out of memory * - ESP_OK on success */ -static inline void esp_lcd_new_panel_io_i2c(uint32_t bus, const esp_lcd_panel_io_i2c_config_t *io_config, esp_lcd_panel_io_handle_t *ret_io) +static inline esp_err_t esp_lcd_new_panel_io_i2c(uint32_t bus, const esp_lcd_panel_io_i2c_config_t *io_config, esp_lcd_panel_io_handle_t *ret_io) { - esp_lcd_new_panel_io_i2c_v1(bus, io_config, ret_io); + return esp_lcd_new_panel_io_i2c_v1(bus, io_config, ret_io); } /** @@ -323,9 +323,9 @@ static inline void esp_lcd_new_panel_io_i2c(uint32_t bus, const esp_lcd_panel_io * - ESP_ERR_NO_MEM if out of memory * - ESP_OK on success */ -static inline void esp_lcd_new_panel_io_i2c(i2c_master_bus_handle_t bus, const esp_lcd_panel_io_i2c_config_t *io_config, esp_lcd_panel_io_handle_t *ret_io) +static inline esp_err_t esp_lcd_new_panel_io_i2c(i2c_master_bus_handle_t bus, const esp_lcd_panel_io_i2c_config_t *io_config, esp_lcd_panel_io_handle_t *ret_io) { - esp_lcd_new_panel_io_i2c_v2(bus, io_config, ret_io); + return esp_lcd_new_panel_io_i2c_v2(bus, io_config, ret_io); } #else /**