From ef0946a6cc14afe0dec983c553a96b6216fc8506 Mon Sep 17 00:00:00 2001 From: C47D Date: Wed, 13 Oct 2021 23:01:26 -0500 Subject: [PATCH] st7796s: Replace ESP_LOG with LVGL logging --- lvgl_tft/st7796s.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lvgl_tft/st7796s.c b/lvgl_tft/st7796s.c index 48a767c..68f8f9a 100644 --- a/lvgl_tft/st7796s.c +++ b/lvgl_tft/st7796s.c @@ -9,14 +9,13 @@ #include "st7796s.h" #include "disp_spi.h" #include "driver/gpio.h" -#include "esp_log.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" /********************* * DEFINES *********************/ -#define TAG "ST7796S" +#define TAG "ST7796S: " /********************** * TYPEDEFS @@ -96,7 +95,7 @@ void st7796s_init(void) vTaskDelay(100 / portTICK_RATE_MS); #endif - ESP_LOGI(TAG, "Initialization."); + LV_LOG_INFO(TAG, "Initialization."); //Send all the commands uint16_t cmd = 0; @@ -194,7 +193,7 @@ static void st7796s_set_orientation(uint8_t orientation) const char *orientation_str[] = { "PORTRAIT", "PORTRAIT_INVERTED", "LANDSCAPE", "LANDSCAPE_INVERTED"}; - ESP_LOGI(TAG, "Display orientation: %s", orientation_str[orientation]); + LV_LOG_INFO(TAG, "Display orientation: %s", orientation_str[orientation]); #if defined CONFIG_LV_PREDEFINED_DISPLAY_M5STACK const uint8_t data[] = {0x68, 0x68, 0x08, 0x08}; @@ -206,7 +205,7 @@ static void st7796s_set_orientation(uint8_t orientation) const uint8_t data[] = {0x48, 0x88, 0x28, 0xE8}; #endif - ESP_LOGD(TAG, "0x36 command value: 0x%02X", data[orientation]); + LV_LOG_INFO(TAG, "0x36 command value: 0x%02X", data[orientation]); st7796s_send_cmd(0x36); st7796s_send_data((void *)&data[orientation], 1);