From a0e915eebca28d2ec4c1bec37e640ee368e41fdd Mon Sep 17 00:00:00 2001 From: C47D Date: Fri, 22 Oct 2021 18:41:47 -0500 Subject: [PATCH] Remove TAG from LVGL log API The filename is appended at the beginning of the log output by default, we don't need to do it. --- lvgl_tft/EVE_commands.c | 10 ++++------ lvgl_tft/GC9A01.c | 7 +++---- lvgl_tft/hx8357.c | 4 +--- lvgl_tft/il3820.c | 3 +-- lvgl_tft/ili9163c.c | 6 ++---- lvgl_tft/ili9341.c | 1 - lvgl_tft/ili9481.c | 7 +++---- lvgl_tft/ili9486.c | 7 +++---- lvgl_tft/ili9488.c | 9 ++++----- lvgl_tft/jd79653a.c | 32 +++++++++++++++----------------- lvgl_tft/ra8875.c | 14 ++++++-------- lvgl_tft/sh1107.c | 1 - lvgl_tft/ssd1306.c | 2 -- lvgl_tft/st7735s.c | 11 +++++------ lvgl_tft/st7789.c | 1 - lvgl_tft/st7796s.c | 7 +++---- lvgl_tft/uc8151d.c | 18 ++++++++---------- 17 files changed, 58 insertions(+), 82 deletions(-) diff --git a/lvgl_tft/EVE_commands.c b/lvgl_tft/EVE_commands.c index 5e132e4..8765609 100644 --- a/lvgl_tft/EVE_commands.c +++ b/lvgl_tft/EVE_commands.c @@ -57,8 +57,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH #include "soc/soc_memory_layout.h" #include "disp_spi.h" -#define TAG_LOG "FT81X: " - /* data structure for SPI reading that has (optional) space for inserted dummy byte */ typedef struct _spi_read_data { #if defined(DISP_SPI_FULL_DUPLEX) @@ -871,13 +869,13 @@ uint8_t EVE_init(void) /* The most reliable DIO/QIO switching point is after EVE start up but before reading the ChipID. */ #if defined(DISP_SPI_TRANS_MODE_DIO) - LV_LOG_INFO(TAG_LOG, "Switching to DIO mode"); + LV_LOG_INFO("Switching to DIO mode"); DELAY_MS(20); /* different boards may take a different delay but this generally seems to work */ EVE_memWrite16(REG_SPI_WIDTH, SPI_WIDTH_DIO); SPIInherentSendFlags = DISP_SPI_MODE_DIO | DISP_SPI_MODE_DIOQIO_ADDR; SPIDummyReadBits = 4; /* Esp32 DMA SPI transaction dummy_bits works more like clock cycles, so in DIO 4 dummy_bits == 8 total bits */ #elif defined(DISP_SPI_TRANS_MODE_QIO) - LV_LOG_INFO(TAG_LOG, "Switching to QIO mode"); + LV_LOG_INFO("Switching to QIO mode"); DELAY_MS(20); /* different boards may take a different delay but this generally seems to work */ EVE_memWrite16(REG_SPI_WIDTH, SPI_WIDTH_QIO); SPIInherentSendFlags = DISP_SPI_MODE_QIO | DISP_SPI_MODE_DIOQIO_ADDR; @@ -893,7 +891,7 @@ uint8_t EVE_init(void) timeout++; if(timeout > 400) { - LV_LOG_WARN(TAG_LOG, "Failed to read ChipID...aborting initialization."); + LV_LOG_WARN("Failed to read ChipID...aborting initialization."); return 0; } } @@ -905,7 +903,7 @@ uint8_t EVE_init(void) timeout++; if(timeout > 50) /* experimental, 10 was the lowest value to get the BT815 started with, the touch-controller was the last to get out of reset */ { - LV_LOG_WARN(TAG_LOG, "Failed to read CPU status...aborting initialization."); + LV_LOG_WARN("Failed to read CPU status...aborting initialization."); return 0; } } diff --git a/lvgl_tft/GC9A01.c b/lvgl_tft/GC9A01.c index 8ec916d..81a71d3 100644 --- a/lvgl_tft/GC9A01.c +++ b/lvgl_tft/GC9A01.c @@ -16,7 +16,6 @@ /********************* * DEFINES *********************/ - #define TAG "GC9A01: " /********************** * TYPEDEFS @@ -126,7 +125,7 @@ void GC9A01_init(void) vTaskDelay(100 / portTICK_RATE_MS); #endif - LV_LOG_INFO(TAG "Initialization."); + LV_LOG_INFO("Initialization."); //Send all the commands uint16_t cmd = 0; @@ -226,7 +225,7 @@ static void GC9A01_set_orientation(uint8_t orientation) "PORTRAIT", "PORTRAIT_INVERTED", "LANDSCAPE", "LANDSCAPE_INVERTED" }; - LV_LOG_INFO(TAG "Display orientation: %s", orientation_str[orientation]); + LV_LOG_INFO("Display orientation: %s", orientation_str[orientation]); #if defined CONFIG_LV_PREDEFINED_DISPLAY_M5STACK const uint8_t data[] = {0x68, 0x68, 0x08, 0x08}; @@ -236,7 +235,7 @@ static void GC9A01_set_orientation(uint8_t orientation) const uint8_t data[] = {0x08, 0xC8, 0x68, 0xA8}; #endif - LV_LOG_INFO(TAG "0x36 command value: 0x%02X", data[orientation]); + LV_LOG_INFO("0x36 command value: 0x%02X", data[orientation]); GC9A01_send_cmd(0x36); GC9A01_send_data((void *) &data[orientation], 1); diff --git a/lvgl_tft/hx8357.c b/lvgl_tft/hx8357.c index 41209f6..a22287b 100644 --- a/lvgl_tft/hx8357.c +++ b/lvgl_tft/hx8357.c @@ -24,8 +24,6 @@ /********************* * DEFINES *********************/ -#define TAG "HX8357: " - #define MADCTL_MY 0x80 ///< Bottom to top #define MADCTL_MX 0x40 ///< Right to left #define MADCTL_MV 0x20 ///< Reverse Mode @@ -173,7 +171,7 @@ void hx8357_init(void) vTaskDelay(120 / portTICK_RATE_MS); #endif - LV_LOG_INFO(TAG, "Initialization."); + LV_LOG_INFO("Initialization."); //Send all the commands const uint8_t *addr = (displayType == HX8357B) ? initb : initd; diff --git a/lvgl_tft/il3820.c b/lvgl_tft/il3820.c index 691e84d..31fea55 100644 --- a/lvgl_tft/il3820.c +++ b/lvgl_tft/il3820.c @@ -38,7 +38,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH /********************* * DEFINES *********************/ -#define TAG "IL3820: " /** * SSD1673, SSD1608 compatible EPD controller driver. @@ -278,7 +277,7 @@ static void il3820_waitbusy(int wait_ms) vTaskDelay(10 / portTICK_RATE_MS); } - LV_LOG_ERROR( TAG, "busy exceeded %dms", i*10 ); + LV_LOG_ERROR("Busy exceeded %dms", i*10 ); } /* Set DC signal to command mode */ diff --git a/lvgl_tft/ili9163c.c b/lvgl_tft/ili9163c.c index b12479b..56b9fca 100644 --- a/lvgl_tft/ili9163c.c +++ b/lvgl_tft/ili9163c.c @@ -16,8 +16,6 @@ /********************* * DEFINES *********************/ -#define TAG "ILI9163C: " - // ILI9163C specific commands used in init #define ILI9163C_NOP 0x00 #define ILI9163C_SWRESET 0x01 @@ -108,7 +106,7 @@ static void ili9163c_reset(void); void ili9163c_init(void) { - LV_LOG_INFO(TAG, "Init"); + LV_LOG_INFO("Init"); lcd_init_cmd_t ili_init_cmds[] = { {ILI9163C_SWRESET, {0}, 0x80}, // Software reset, 0 args, w/delay 120ms @@ -228,7 +226,7 @@ static void ili9163c_set_orientation(uint8_t orientation) const char *orientation_str[] = { "PORTRAIT", "PORTRAIT_INVERTED", "LANDSCAPE", "LANDSCAPE_INVERTED"}; - LV_LOG_INFO(TAG, "Display orientation: %s", orientation_str[orientation]); + LV_LOG_INFO("Display orientation: %s", orientation_str[orientation]); uint8_t data[] = {0x48, 0x88, 0xA8, 0x68}; diff --git a/lvgl_tft/ili9341.c b/lvgl_tft/ili9341.c index e4b89b0..4c02f40 100644 --- a/lvgl_tft/ili9341.c +++ b/lvgl_tft/ili9341.c @@ -14,7 +14,6 @@ /********************* * DEFINES *********************/ -#define TAG "ILI9341" #define END_OF_CMD_MARKER 0xFFU #define MEMORY_ACCESS_CONTROL_REG 0x36U diff --git a/lvgl_tft/ili9481.c b/lvgl_tft/ili9481.c index c587c2b..a599059 100644 --- a/lvgl_tft/ili9481.c +++ b/lvgl_tft/ili9481.c @@ -15,7 +15,6 @@ /********************* * DEFINES *********************/ - #define TAG "ILI9481: " /********************** * TYPEDEFS @@ -86,7 +85,7 @@ void ili9481_init(void) vTaskDelay(100 / portTICK_RATE_MS); #endif - LV_LOG_INFO(TAG "Initialization."); + LV_LOG_INFO("Initialization."); // Exit sleep ili9481_send_cmd(0x01); /* Software reset */ @@ -115,7 +114,7 @@ void ili9481_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * col uint8_t *mybuf; do { mybuf = (uint8_t *) heap_caps_malloc(3 * size * sizeof(uint8_t), MALLOC_CAP_DMA); - if (mybuf == NULL) LV_LOG_WARN(TAG "Could not allocate enough DMA memory!"); + if (mybuf == NULL) LV_LOG_WARN("Could not allocate enough DMA memory!"); } while (mybuf == NULL); uint32_t LD = 0; @@ -194,7 +193,7 @@ static void ili9481_set_orientation(uint8_t orientation) "PORTRAIT", "PORTRAIT_INVERTED", "LANDSCAPE", "LANDSCAPE_INVERTED" }; - LV_LOG_INFO(TAG "Display orientation: %s", orientation_str[orientation]); + LV_LOG_INFO("Display orientation: %s", orientation_str[orientation]); uint8_t data[] = {0x48, 0x4B, 0x28, 0x2B}; ili9481_send_cmd(ILI9481_CMD_MEMORY_ACCESS_CONTROL); diff --git a/lvgl_tft/ili9486.c b/lvgl_tft/ili9486.c index afc5fd4..b4e3a0a 100644 --- a/lvgl_tft/ili9486.c +++ b/lvgl_tft/ili9486.c @@ -15,7 +15,6 @@ /********************* * DEFINES *********************/ -#define TAG "ILI9486: " /********************** * TYPEDEFS @@ -79,7 +78,7 @@ void ili9486_init(void) vTaskDelay(100 / portTICK_RATE_MS); #endif - LV_LOG_INFO(TAG, "ILI9486 Initialization."); + LV_LOG_INFO("ILI9486 Initialization."); //Send all the commands uint16_t cmd = 0; @@ -170,11 +169,11 @@ static void ili9486_set_orientation(uint8_t orientation) "PORTRAIT", "PORTRAIT_INVERTED", "LANDSCAPE", "LANDSCAPE_INVERTED" }; - LV_LOG_INFO(TAG, "Display orientation: %s", orientation_str[orientation]); + LV_LOG_INFO("Display orientation: %s", orientation_str[orientation]); const uint8_t data[] = {0x48, 0x88, 0x28, 0xE8}; - LV_LOG_INFO(TAG, "0x36 command value: 0x%02X", data[orientation]); + LV_LOG_INFO("0x36 command value: 0x%02X", data[orientation]); ili9486_send_cmd(0x36); ili9486_send_data((void *) &data[orientation], 1); diff --git a/lvgl_tft/ili9488.c b/lvgl_tft/ili9488.c index 60e8657..7a2ab9e 100644 --- a/lvgl_tft/ili9488.c +++ b/lvgl_tft/ili9488.c @@ -16,7 +16,6 @@ /********************* * DEFINES *********************/ -#define TAG "ILI9488: " /********************** * TYPEDEFS @@ -89,7 +88,7 @@ void ili9488_init(void) vTaskDelay(100 / portTICK_RATE_MS); #endif - LV_LOG_INFO(TAG, "ILI9488 initialization."); + LV_LOG_INFO("ILI9488 initialization."); // Exit sleep ili9488_send_cmd(0x01); /* Software reset */ @@ -118,7 +117,7 @@ void ili9488_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * col uint8_t *mybuf; do { mybuf = (uint8_t *) heap_caps_malloc(3 * size * sizeof(uint8_t), MALLOC_CAP_DMA); - if (mybuf == NULL) LV_LOG_WARN(TAG, "Could not allocate enough DMA memory!"); + if (mybuf == NULL) LV_LOG_WARN("Could not allocate enough DMA memory!"); } while (mybuf == NULL); uint32_t LD = 0; @@ -199,11 +198,11 @@ static void ili9488_set_orientation(uint8_t orientation) "PORTRAIT", "PORTRAIT_INVERTED", "LANDSCAPE", "LANDSCAPE_INVERTED" }; - LV_LOG_INFO(TAG, "Display orientation: %s", orientation_str[orientation]); + LV_LOG_INFO("Display orientation: %s", orientation_str[orientation]); const uint8_t data[] = {0x48, 0x88, 0x28, 0xE8}; - LV_LOG_INFO(TAG, "0x36 command value: 0x%02X", data[orientation]); + LV_LOG_INFO("0x36 command value: 0x%02X", data[orientation]); ili9488_send_cmd(0x36); ili9488_send_data((void *) &data[orientation], 1); diff --git a/lvgl_tft/jd79653a.c b/lvgl_tft/jd79653a.c index d5171ad..f71b673 100644 --- a/lvgl_tft/jd79653a.c +++ b/lvgl_tft/jd79653a.c @@ -33,8 +33,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH #include "disp_spi.h" #include "jd79653a.h" -#define TAG "lv_jd79653a: " - #define PIN_DC CONFIG_LV_DISP_PIN_DC #define PIN_DC_BIT ((1ULL << (uint8_t)(CONFIG_LV_DISP_PIN_DC))) @@ -187,7 +185,7 @@ static void jd79653a_spi_send_fb(uint8_t *data, size_t len) static void jd79653a_spi_send_seq(const jd79653a_seq_t *seq, size_t len) { - LV_LOG_INFO(TAG, "Writing cmd/data sequence, count %u", len); + LV_LOG_INFO("Writing cmd/data sequence, count %u", len); if (!seq || len < 1) return; for (size_t cmd_idx = 0; cmd_idx < len; cmd_idx++) { @@ -243,7 +241,7 @@ static void jd79653a_load_partial_lut() static void jd79653a_partial_in() { - LV_LOG_INFO(TAG, "Partial in!"); + LV_LOG_INFO("Partial in!"); // Panel setting: accept LUT from registers instead of OTP #if defined (CONFIG_LV_DISPLAY_ORIENTATION_PORTRAIT_INVERTED) @@ -271,7 +269,7 @@ static void jd79653a_partial_in() static void jd79653a_partial_out() { - LV_LOG_INFO(TAG, "Partial out!"); + LV_LOG_INFO("Partial out!"); // Panel setting: use LUT from OTP #if defined (CONFIG_LV_DISPLAY_ORIENTATION_PORTRAIT_INVERTED) @@ -298,10 +296,10 @@ static void jd79653a_update_partial(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t { jd79653a_power_on(); jd79653a_partial_in(); - LV_LOG_INFO(TAG, "x1: 0x%x, x2: 0x%x, y1: 0x%x, y2: 0x%x", x1, x2, y1, y2); + LV_LOG_INFO("x1: 0x%x, x2: 0x%x, y1: 0x%x, y2: 0x%x", x1, x2, y1, y2); size_t len = ((x2 - x1 + 1) * (y2 - y1 + 1)) / 8; - LV_LOG_INFO(TAG, "Writing PARTIAL LVGL fb with len: %u", len); + LV_LOG_INFO("Writing PARTIAL LVGL fb with len: %u", len); // Set partial window uint8_t ptl_setting[7] = { x1, x2, 0, y1, 0, y2, 0x01 }; @@ -317,12 +315,12 @@ static void jd79653a_update_partial(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t len -= EPD_ROW_LEN; } - LV_LOG_INFO(TAG, "Partial wait start"); + LV_LOG_INFO("Partial wait start"); jd79653a_spi_send_cmd(0x12); jd79653a_wait_busy(0); - LV_LOG_INFO(TAG, "Partial updated"); + LV_LOG_INFO("Partial updated"); jd79653a_partial_out(); jd79653a_power_off(); } @@ -359,7 +357,7 @@ void jd79653a_fb_set_full_color(uint8_t color) void jd79653a_fb_full_update(uint8_t *data, size_t len) { jd79653a_power_on(); - LV_LOG_INFO(TAG, "Performing full update, len: %u", len); + LV_LOG_INFO("Performing full update, len: %u", len); uint8_t *data_ptr = data; @@ -378,7 +376,7 @@ void jd79653a_fb_full_update(uint8_t *data, size_t len) len -= EPD_ROW_LEN; } - LV_LOG_INFO(TAG, "Rest len: %u", len); + LV_LOG_INFO("Rest len: %u", len); jd79653a_spi_send_cmd(0x12); // Issue refresh command vTaskDelay(pdMS_TO_TICKS(100)); @@ -413,13 +411,13 @@ void jd79653a_lv_fb_flush(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t { size_t len = ((area->x2 - area->x1 + 1) * (area->y2 - area->y1 + 1)) / 8; - LV_LOG_INFO(TAG, "x1: 0x%x, x2: 0x%x, y1: 0x%x, y2: 0x%x", area->x1, area->x2, area->y1, area->y2); - LV_LOG_INFO(TAG, "Writing LVGL fb with len: %u, partial counter: %u", len, partial_counter); + LV_LOG_INFO("x1: 0x%x, x2: 0x%x, y1: 0x%x, y2: 0x%x", area->x1, area->x2, area->y1, area->y2); + LV_LOG_INFO("Writing LVGL fb with len: %u, partial counter: %u", len, partial_counter); uint8_t *buf = (uint8_t *) color_map; if (partial_counter == 0) { - LV_LOG_INFO(TAG, "Refreshing in FULL"); + LV_LOG_INFO("Refreshing in FULL"); jd79653a_fb_full_update(buf, ((EPD_HEIGHT * EPD_WIDTH) / 8)); partial_counter = EPD_PARTIAL_CNT; // Reset partial counter here } else { @@ -445,7 +443,7 @@ void jd79653a_init() // Initialise event group jd79653a_evts = xEventGroupCreate(); if (!jd79653a_evts) { - LV_LOG_ERROR(TAG, "Failed when initialising event group!"); + LV_LOG_ERROR("Failed when initialising event group!"); return; } @@ -465,12 +463,12 @@ void jd79653a_init() // Dump in initialise sequence jd79653a_spi_send_seq(init_seq, EPD_SEQ_LEN(init_seq)); - LV_LOG_INFO(TAG, "Panel init sequence sent"); + LV_LOG_INFO("Panel init sequence sent"); // Check BUSY status here jd79653a_wait_busy(0); - LV_LOG_INFO(TAG, "Panel is up!"); + LV_LOG_INFO("Panel is up!"); } static void jd79653a_reset(void) diff --git a/lvgl_tft/ra8875.c b/lvgl_tft/ra8875.c index 1b431fa..7021a45 100644 --- a/lvgl_tft/ra8875.c +++ b/lvgl_tft/ra8875.c @@ -15,8 +15,6 @@ /********************* * DEFINES *********************/ -#define TAG "RA8875 :" - #define DIV_ROUND_UP(n, d) (((n)+(d)-1)/(d)) #define SPI_CLOCK_SPEED_SLOW_HZ 1000000 @@ -169,7 +167,7 @@ void ra8875_init(void) }; #define INIT_CMDS_SIZE (sizeof(init_cmds)/sizeof(init_cmds[0])) - LV_LOG_INFO(TAG, "Initializing RA8875..."); + LV_LOG_INFO("Initializing RA8875..."); // Initialize non-SPI GPIOs @@ -203,7 +201,7 @@ void ra8875_init(void) vTaskDelay(1); } if (i == 0) { - LV_LOG_WARN(TAG, "WARNING: Memory clear timed out; RA8875 may be unresponsive."); + LV_LOG_WARN("WARNING: Memory clear timed out; RA8875 may be unresponsive."); } // Enable the display @@ -212,7 +210,7 @@ void ra8875_init(void) void ra8875_enable_display(bool enable) { - LV_LOG_INFO(TAG, "%s display.", enable ? "Enabling" : "Disabling"); + LV_LOG_INFO("%s display.", enable ? "Enabling" : "Disabling"); uint8_t val = enable ? (0x80) : (0x00); ra8875_write_cmd(RA8875_REG_PWRR, val); // Power and Display Control Register (PWRR) } @@ -228,14 +226,14 @@ void ra8875_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * colo size_t linelen = (area->x2 - area->x1 + 1); uint8_t * buffer = (uint8_t*)color_map; - LV_LOG_INFO(TAG, "flush: %d,%d at %d,%d", area->x1, area->x2, area->y1, area->y2 ); + LV_LOG_INFO("flush: %d,%d at %d,%d", area->x1, area->x2, area->y1, area->y2 ); // Get lock disp_spi_acquire(); // Set window if needed if ((x1 != area->x1) || (x2 != area->x2)) { - LV_LOG_INFO(TAG, "flush: set window (x1,x2): %d,%d -> %d,%d", x1, x2, area->x1, area->x2); + LV_LOG_INFO("flush: set window (x1,x2): %d,%d -> %d,%d", x1, x2, area->x1, area->x2); ra8875_set_window(area->x1, area->x2, 0, LV_VER_RES_MAX-1); x1 = area->x1; x2 = area->x2; @@ -243,7 +241,7 @@ void ra8875_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * colo // Set cursor if needed if ((x != area->x1) || (y != area->y1)) { - LV_LOG_INFO(TAG, "flush: set cursor (x,y): %d,%d -> %d,%d", x, y, area->x1, area->y1); + LV_LOG_INFO("flush: set cursor (x,y): %d,%d -> %d,%d", x, y, area->x1, area->y1); ra8875_set_memory_write_cursor(area->x1, area->y1); x = area->x1; } diff --git a/lvgl_tft/sh1107.c b/lvgl_tft/sh1107.c index d7f6067..6f787b2 100644 --- a/lvgl_tft/sh1107.c +++ b/lvgl_tft/sh1107.c @@ -16,7 +16,6 @@ /********************* * DEFINES *********************/ - #define TAG "SH1107" /********************** * TYPEDEFS diff --git a/lvgl_tft/ssd1306.c b/lvgl_tft/ssd1306.c index 1700d02..802842c 100644 --- a/lvgl_tft/ssd1306.c +++ b/lvgl_tft/ssd1306.c @@ -22,8 +22,6 @@ /********************* * DEFINES *********************/ -#define TAG "SSD1306" - #define OLED_I2C_PORT (CONFIG_LV_I2C_DISPLAY_PORT) // SLA (0x3C) + WRITE_MODE (0x00) = 0x78 (0b01111000) #define OLED_I2C_ADDRESS 0x3C diff --git a/lvgl_tft/st7735s.c b/lvgl_tft/st7735s.c index 29fd452..0f23a29 100644 --- a/lvgl_tft/st7735s.c +++ b/lvgl_tft/st7735s.c @@ -19,7 +19,6 @@ /********************* * DEFINES *********************/ - #define TAG "ST7735S: " #define AXP192_I2C_ADDRESS 0x34 /********************** @@ -114,7 +113,7 @@ void st7735s_init(void) vTaskDelay(100 / portTICK_RATE_MS); #endif - LV_LOG_INFO(TAG, "ST7735S initialization."); + LV_LOG_INFO("ST7735S initialization."); //Send all the commands uint16_t cmd = 0; @@ -210,7 +209,7 @@ static void st7735s_set_orientation(uint8_t orientation) "PORTRAIT", "PORTRAIT_INVERTED", "LANDSCAPE", "LANDSCAPE_INVERTED" }; - LV_LOG_INFO(TAG, "Display orientation: %s", orientation_str[orientation]); + LV_LOG_INFO("Display orientation: %s", orientation_str[orientation]); /* Portrait: 0xC8 = ST77XX_MADCTL_MX | ST77XX_MADCTL_MY | ST77XX_MADCTL_BGR @@ -219,7 +218,7 @@ static void st7735s_set_orientation(uint8_t orientation) */ uint8_t data[] = {0xC8, 0xC8, 0xA8, 0xA8}; - LV_LOG_INFO(TAG, "0x36 command value: 0x%02X", data[orientation]); + LV_LOG_INFO("0x36 command value: 0x%02X", data[orientation]); st7735s_send_cmd(ST7735_MADCTL); st7735s_send_data((void *) &data[orientation], 1); @@ -231,7 +230,7 @@ static void axp192_write_byte(uint8_t addr, uint8_t data) { err = lvgl_i2c_write(CONFIG_LV_I2C_DISPLAY_PORT, AXP192_I2C_ADDRESS, addr, &data, 1); if (ret != ESP_OK) { - LV_LOG_ERROR(TAG, "AXP192 send failed. code: 0x%.2X", ret); + LV_LOG_ERROR("AXP192 send failed. code: 0x%.2X", ret); } } @@ -243,7 +242,7 @@ static void axp192_init() axp192_write_byte(0x10, 0xFF); // OLED_VPP Enable axp192_write_byte(0x28, 0xCC); // Enable LDO2&LDO3, LED&TFT 3.0V axp192_sleep_out(); - LV_LOG_INFO(TAG, "AXP192 initialized, power enabled for LDO2 and LDO3"); + LV_LOG_INFO("AXP192 initialized, power enabled for LDO2 and LDO3"); } static void axp192_sleep_in() diff --git a/lvgl_tft/st7789.c b/lvgl_tft/st7789.c index 1aa1b75..ba2889a 100644 --- a/lvgl_tft/st7789.c +++ b/lvgl_tft/st7789.c @@ -12,7 +12,6 @@ /********************* * DEFINES *********************/ -#define TAG "ST7789" /********************** * TYPEDEFS diff --git a/lvgl_tft/st7796s.c b/lvgl_tft/st7796s.c index 68f8f9a..8bc07e5 100644 --- a/lvgl_tft/st7796s.c +++ b/lvgl_tft/st7796s.c @@ -15,7 +15,6 @@ /********************* * DEFINES *********************/ -#define TAG "ST7796S: " /********************** * TYPEDEFS @@ -95,7 +94,7 @@ void st7796s_init(void) vTaskDelay(100 / portTICK_RATE_MS); #endif - LV_LOG_INFO(TAG, "Initialization."); + LV_LOG_INFO("Initialization."); //Send all the commands uint16_t cmd = 0; @@ -193,7 +192,7 @@ static void st7796s_set_orientation(uint8_t orientation) const char *orientation_str[] = { "PORTRAIT", "PORTRAIT_INVERTED", "LANDSCAPE", "LANDSCAPE_INVERTED"}; - LV_LOG_INFO(TAG, "Display orientation: %s", orientation_str[orientation]); + LV_LOG_INFO("Display orientation: %s", orientation_str[orientation]); #if defined CONFIG_LV_PREDEFINED_DISPLAY_M5STACK const uint8_t data[] = {0x68, 0x68, 0x08, 0x08}; @@ -205,7 +204,7 @@ static void st7796s_set_orientation(uint8_t orientation) const uint8_t data[] = {0x48, 0x88, 0x28, 0xE8}; #endif - LV_LOG_INFO(TAG, "0x36 command value: 0x%02X", data[orientation]); + LV_LOG_INFO("0x36 command value: 0x%02X", data[orientation]); st7796s_send_cmd(0x36); st7796s_send_data((void *)&data[orientation], 1); diff --git a/lvgl_tft/uc8151d.c b/lvgl_tft/uc8151d.c index e93be7c..91a7f7a 100644 --- a/lvgl_tft/uc8151d.c +++ b/lvgl_tft/uc8151d.c @@ -34,8 +34,6 @@ #include "disp_driver.h" #include "uc8151d.h" -#define TAG "lv_uc8151d: " - #define PIN_DC CONFIG_LV_DISP_PIN_DC #define PIN_DC_BIT ((1ULL << (uint8_t)(CONFIG_LV_DISP_PIN_DC))) @@ -105,7 +103,7 @@ static void uc8151d_spi_send_fb(uint8_t *data, size_t len) static void uc8151d_spi_send_seq(const uc8151d_seq_t *seq, size_t len) { - LV_LOG_INFO(TAG, "Writing cmd/data sequence, count %u", len); + LV_LOG_INFO("Writing cmd/data sequence, count %u", len); if (!seq || len < 1) return; for (size_t cmd_idx = 0; cmd_idx < len; cmd_idx++) { @@ -200,14 +198,14 @@ void uc8151d_lv_fb_flush(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t * { size_t len = ((area->x2 - area->x1 + 1) * (area->y2 - area->y1 + 1)) / 8; - LV_LOG_INFO(TAG, "x1: 0x%x, x2: 0x%x, y1: 0x%x, y2: 0x%x", area->x1, area->x2, area->y1, area->y2); - LV_LOG_INFO(TAG, "Writing LVGL fb with len: %u", len); + LV_LOG_INFO("x1: 0x%x, x2: 0x%x, y1: 0x%x, y2: 0x%x", area->x1, area->x2, area->y1, area->y2); + LV_LOG_INFO("Writing LVGL fb with len: %u", len); uint8_t *buf = (uint8_t *) color_map; uc8151d_full_update(buf); lv_disp_flush_ready(drv); - LV_LOG_INFO(TAG, "Ready"); + LV_LOG_INFO("Ready"); } void uc8151d_lv_set_fb_cb(struct _disp_drv_t *disp_drv, uint8_t *buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, @@ -219,7 +217,7 @@ void uc8151d_lv_set_fb_cb(struct _disp_drv_t *disp_drv, uint8_t *buf, lv_coord_t if (color.full) { BIT_SET(buf[byte_index], 7 - bit_index); } else { - LV_LOG_INFO(TAG, "Clear at x: %u, y: %u", x, y); + LV_LOG_INFO("Clear at x: %u, y: %u", x, y); BIT_CLEAR(buf[byte_index], 7 - bit_index); } } @@ -238,7 +236,7 @@ void uc8151d_init() // Initialise event group uc8151d_evts = xEventGroupCreate(); if (!uc8151d_evts) { - LV_LOG_ERROR(TAG, "Failed when initialising event group!"); + LV_LOG_ERROR("Failed when initialising event group!"); return; } @@ -254,9 +252,9 @@ void uc8151d_init() gpio_install_isr_service(0); gpio_isr_handler_add(PIN_BUSY, uc8151d_busy_intr, (void *) PIN_BUSY); - LV_LOG_INFO(TAG, "IO init finished"); + LV_LOG_INFO("IO init finished"); uc8151d_panel_init(); - LV_LOG_INFO(TAG, "Panel initialised"); + LV_LOG_INFO("Panel initialised"); } static void uc8151d_reset(void)