Skip to content

Commit dff97f3

Browse files
committed
Replace log header with esp_log in esp_io_expander.c for consistent logging and remove unused log header in esp_panel_axs15231b.c
1 parent 5f23172 commit dff97f3

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/esp_io_expander.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include "esp_bit_defs.h"
1313
#include "esp_check.h"
14-
#include "log_.h"
14+
#include "esp_log.h"
1515

1616
#include "esp_io_expander.h"
1717

@@ -36,7 +36,7 @@ esp_err_t esp_io_expander_set_dir(esp_io_expander_handle_t handle, uint32_t pin_
3636
{
3737
ESP_RETURN_ON_FALSE(handle, ESP_ERR_INVALID_ARG, TAG, "Invalid handle");
3838
if (pin_num_mask >= BIT64(VALID_IO_COUNT(handle))) {
39-
log_w(TAG, "Pin num mask out of range, bit higher than %d won't work", VALID_IO_COUNT(handle) - 1);
39+
ESP_LOGW(TAG, "Pin num mask out of range, bit higher than %d won't work", VALID_IO_COUNT(handle) - 1);
4040
}
4141

4242
bool is_output = (direction == IO_EXPANDER_OUTPUT) ? true : false;
@@ -64,7 +64,7 @@ esp_err_t esp_io_expander_set_level(esp_io_expander_handle_t handle, uint32_t pi
6464
{
6565
ESP_RETURN_ON_FALSE(handle, ESP_ERR_INVALID_ARG, TAG, "Invalid handle");
6666
if (pin_num_mask >= BIT64(VALID_IO_COUNT(handle))) {
67-
log_w(TAG, "Pin num mask out of range, bit higher than %d won't work", VALID_IO_COUNT(handle) - 1);
67+
ESP_LOGW(TAG, "Pin num mask out of range, bit higher than %d won't work", VALID_IO_COUNT(handle) - 1);
6868
}
6969

7070
uint32_t dir_reg, dir_bit;
@@ -79,7 +79,7 @@ esp_err_t esp_io_expander_set_level(esp_io_expander_handle_t handle, uint32_t pi
7979
if ((dir_bit && handle->config.flags.dir_out_bit_zero) || (!dir_bit && !handle->config.flags.dir_out_bit_zero)) {
8080
/* 1. 1 && Set 1 to input */
8181
/* 2. 0 && Set 0 to input */
82-
log_e(TAG, "Pin[%d] can't set level in input mode", i);
82+
ESP_LOGE(TAG, "Pin[%d] can't set level in input mode", i);
8383
return ESP_ERR_INVALID_STATE;
8484
}
8585
}
@@ -112,7 +112,7 @@ esp_err_t esp_io_expander_get_level(esp_io_expander_handle_t handle, uint32_t pi
112112
ESP_RETURN_ON_FALSE(handle, ESP_ERR_INVALID_ARG, TAG, "Invalid handle");
113113
ESP_RETURN_ON_FALSE(level_mask, ESP_ERR_INVALID_ARG, TAG, "Invalid level");
114114
if (pin_num_mask >= BIT64(VALID_IO_COUNT(handle))) {
115-
log_w(TAG, "Pin num mask out of range, bit higher than %d won't work", VALID_IO_COUNT(handle) - 1);
115+
ESP_LOGW(TAG, "Pin num mask out of range, bit higher than %d won't work", VALID_IO_COUNT(handle) - 1);
116116
}
117117

118118
uint32_t input_reg;
@@ -151,7 +151,7 @@ esp_err_t esp_io_expander_print_state(esp_io_expander_handle_t handle)
151151
}
152152

153153
for (int i = 0; i < io_count; i++) {
154-
log_i(TAG, "Index[%d] | Dir[%s] | In[%d] | Out[%d]", i, (dir_reg & BIT(i)) ? "Out" : "In",
154+
ESP_LOGI(TAG, "Index[%d] | Dir[%s] | In[%d] | Out[%d]", i, (dir_reg & BIT(i)) ? "Out" : "In",
155155
(input_reg & BIT(i)) ? 1 : 0, (output_reg & BIT(i)) ? 1 : 0);
156156
}
157157

src/esp_panel_axs15231b.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifdef DISPLAY_AXS15231B_QSPI
22

33
#include <esp_panel_axs15231b.h>
4-
#include <esp32-hal-log.h>
54
#include <esp_rom_gpio.h>
65
#include <esp_heap_caps.h>
76
#include <memory.h>

0 commit comments

Comments
 (0)