diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f6cd98..a5bc6eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,7 +73,7 @@ list(APPEND LVGL_INCLUDE_DIRS lv_port) idf_component_register(SRCS ${SOURCES} INCLUDE_DIRS ${LVGL_INCLUDE_DIRS} - REQUIRES lvgl) + REQUIRES lvgl driver) target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DLV_LVGL_H_INCLUDE_SIMPLE") diff --git a/lv_port/disp_spi.h b/lv_port/disp_spi.h index e2afb31..b6a4db9 100644 --- a/lv_port/disp_spi.h +++ b/lv_port/disp_spi.h @@ -15,7 +15,7 @@ extern "C" { *********************/ #include #include -#include +#include "driver/spi_master.h" /********************* * DEFINES diff --git a/lv_port/esp_lcd_backlight.c b/lv_port/esp_lcd_backlight.c index 03b1924..a60993f 100644 --- a/lv_port/esp_lcd_backlight.c +++ b/lv_port/esp_lcd_backlight.c @@ -54,7 +54,7 @@ disp_backlight_h disp_backlight_new(const disp_backlight_config_t *config) }; const ledc_timer_config_t LCD_backlight_timer = { .speed_mode = LEDC_LOW_SPEED_MODE, - .bit_num = LEDC_TIMER_10_BIT, + .duty_resolution = LEDC_TIMER_10_BIT, .timer_num = config->timer_idx, .freq_hz = 5000, .clk_cfg = LEDC_AUTO_CLK}; diff --git a/lvgl_i2c/i2c_manager.c b/lvgl_i2c/i2c_manager.c index 441eef1..1333354 100644 --- a/lvgl_i2c/i2c_manager.c +++ b/lvgl_i2c/i2c_manager.c @@ -34,7 +34,7 @@ SOFTWARE. #include "freertos/FreeRTOS.h" #include "freertos/semphr.h" #include "freertos/task.h" -#include +#include "driver/i2c.h" #include "sdkconfig.h" @@ -169,7 +169,7 @@ esp_err_t I2C_FN(_init)(i2c_port_t port) { "to open it. See I2C Manager README for details."); } else { ESP_LOGI(TAG, "Initialised port %d (SDA: %d, SCL: %d, speed: %d Hz.)", - port, conf.sda_io_num, conf.scl_io_num, conf.master.clk_speed); + (int) port, (int) conf.sda_io_num, (int) conf.scl_io_num, (int) conf.master.clk_speed); } } @@ -186,7 +186,7 @@ esp_err_t I2C_FN(_read)(i2c_port_t port, uint16_t addr, uint32_t reg, uint8_t *b // May seem weird, but init starts with a check if it's needed, no need for that check twice. I2C_FN(_init)(port); - ESP_LOGV(TAG, "Reading port %d, addr 0x%03x, reg 0x%04x", port, addr, reg); + ESP_LOGV(TAG, "Reading port %d, addr 0x%03"PRIx16", reg 0x%04"PRIx32"", (int) port, addr, reg); TickType_t timeout = 0; #if defined (I2C_ZERO) @@ -217,7 +217,7 @@ esp_err_t I2C_FN(_read)(i2c_port_t port, uint16_t addr, uint32_t reg, uint8_t *b i2c_cmd_link_delete(cmd); I2C_FN(_unlock)((int)port); } else { - ESP_LOGE(TAG, "Lock could not be obtained for port %d.", (int)port); + ESP_LOGE(TAG, "Lock could not be obtained for port %d.", port); return ESP_ERR_TIMEOUT; } @@ -239,7 +239,7 @@ esp_err_t I2C_FN(_write)(i2c_port_t port, uint16_t addr, uint32_t reg, const uin // May seem weird, but init starts with a check if it's needed, no need for that check twice. I2C_FN(_init)(port); - ESP_LOGV(TAG, "Writing port %d, addr 0x%03x, reg 0x%04x", port, addr, reg); + ESP_LOGV(TAG, "Writing port %d, addr 0x%03"PRIx16", reg 0x%04"PRIx32"", (int) port, addr, reg); TickType_t timeout = 0; #if defined (I2C_ZERO)