From 60751a31cfb9aa4cf9dc3e6f2d84c61f2ce116c9 Mon Sep 17 00:00:00 2001 From: Valeriy Chudnikov Date: Mon, 13 Mar 2023 12:42:28 +0300 Subject: [PATCH] types casting to overcome format errors in idf v5 --- lvgl_i2c/i2c_manager.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lvgl_i2c/i2c_manager.c b/lvgl_i2c/i2c_manager.c index 1333354..13ccc12 100644 --- a/lvgl_i2c/i2c_manager.c +++ b/lvgl_i2c/i2c_manager.c @@ -186,7 +186,8 @@ 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%03"PRIx16", reg 0x%04"PRIx32"", (int) port, addr, reg); + ESP_LOGV(TAG, "Reading port %d, addr 0x%03x, reg 0x%04x", + (int) port, (unsigned int) addr, (unsigned int) reg); TickType_t timeout = 0; #if defined (I2C_ZERO) @@ -239,7 +240,8 @@ 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%03"PRIx16", reg 0x%04"PRIx32"", (int) port, addr, reg); + ESP_LOGV(TAG, "Writing port %d, addr 0x%03x, reg 0x%04x", + (int) port, (unsigned int) addr, (unsigned int) reg); TickType_t timeout = 0; #if defined (I2C_ZERO)