mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'refactor/remove_usage_of_logging_in_hal' into 'master'
hal: remove usages of esp_log in HAL Closes IDF-2159 See merge request espressif/esp-idf!15017
This commit is contained in:
commit
b1f851b8f8
@ -18,7 +18,6 @@
|
||||
#include "hal/adc_hal.h"
|
||||
#include "hal/adc_types.h"
|
||||
#include "hal/adc_hal_conf.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
Digital controller setting
|
||||
|
@ -21,3 +21,9 @@
|
||||
#define HAL_LOGI(...) ESP_LOGI(__VA_ARGS__)
|
||||
#define HAL_LOGD(...) ESP_LOGD(__VA_ARGS__)
|
||||
#define HAL_LOGV(...) ESP_LOGV(__VA_ARGS__)
|
||||
|
||||
#define HAL_EARLY_LOGE(...) ESP_EARLY_LOGE(__VA_ARGS__)
|
||||
#define HAL_EARLY_LOGW(...) ESP_EARLY_LOGW(__VA_ARGS__)
|
||||
#define HAL_EARLY_LOGI(...) ESP_EARLY_LOGI(__VA_ARGS__)
|
||||
#define HAL_EARLY_LOGD(...) ESP_EARLY_LOGD(__VA_ARGS__)
|
||||
#define HAL_EARLY_LOGV(...) ESP_EARLY_LOGV(__VA_ARGS__)
|
||||
|
@ -325,11 +325,11 @@ static void send_new_packet(sdio_slave_context_t *hal)
|
||||
|
||||
// update pkt_len register to allow host reading.
|
||||
sdio_slave_ll_send_write_len(hal->slc, end_desc->pkt_len);
|
||||
ESP_EARLY_LOGV(TAG, "send_length_write: %d, last_len: %08X", end_desc->pkt_len, sdio_slave_ll_send_read_len(hal->host));
|
||||
HAL_EARLY_LOGV(TAG, "send_length_write: %d, last_len: %08X", end_desc->pkt_len, sdio_slave_ll_send_read_len(hal->host));
|
||||
|
||||
send_set_state(hal, STATE_SENDING);
|
||||
|
||||
ESP_EARLY_LOGD(TAG, "restart new send: %p->%p, pkt_len: %d", start_desc, end_desc, end_desc->pkt_len);
|
||||
HAL_EARLY_LOGD(TAG, "restart new send: %p->%p, pkt_len: %d", start_desc, end_desc, end_desc->pkt_len);
|
||||
}
|
||||
|
||||
static esp_err_t send_check_new_packet(sdio_slave_context_t *hal)
|
||||
@ -374,7 +374,7 @@ esp_err_t sdio_slave_hal_send_reset_counter(sdio_slave_context_t* hal)
|
||||
"reset counter when transmission started", ESP_ERR_INVALID_STATE);
|
||||
|
||||
sdio_slave_ll_send_write_len(hal->slc, 0);
|
||||
ESP_EARLY_LOGV(TAG, "last_len: %08X", sdio_slave_ll_send_read_len(hal->host));
|
||||
HAL_EARLY_LOGV(TAG, "last_len: %08X", sdio_slave_ll_send_read_len(hal->host));
|
||||
|
||||
hal->tail_pkt_len = 0;
|
||||
sdio_slave_hal_send_desc_t *desc = hal->in_flight_head;
|
||||
@ -674,20 +674,20 @@ void sdio_slave_hal_load_buf(sdio_slave_context_t *hal, lldesc_t *desc)
|
||||
|
||||
static inline void show_queue_item(lldesc_t *item)
|
||||
{
|
||||
ESP_EARLY_LOGI(TAG, "=> %p: size: %d(%d), eof: %d, owner: %d", item, item->size, item->length, item->eof, item->owner);
|
||||
ESP_EARLY_LOGI(TAG, " buf: %p, stqe_next: %p", item->buf, item->qe.stqe_next);
|
||||
HAL_EARLY_LOGI(TAG, "=> %p: size: %d(%d), eof: %d, owner: %d", item, item->size, item->length, item->eof, item->owner);
|
||||
HAL_EARLY_LOGI(TAG, " buf: %p, stqe_next: %p", item->buf, item->qe.stqe_next);
|
||||
}
|
||||
|
||||
static void __attribute((unused)) dump_queue(sdio_slave_hal_recv_stailq_t *queue)
|
||||
{
|
||||
int cnt = 0;
|
||||
lldesc_t *item = NULL;
|
||||
ESP_EARLY_LOGI(TAG, ">>>>> first: %p, last: %p <<<<<", queue->stqh_first, queue->stqh_last);
|
||||
HAL_EARLY_LOGI(TAG, ">>>>> first: %p, last: %p <<<<<", queue->stqh_first, queue->stqh_last);
|
||||
STAILQ_FOREACH(item, queue, qe) {
|
||||
cnt++;
|
||||
show_queue_item(item);
|
||||
}
|
||||
ESP_EARLY_LOGI(TAG, "total: %d", cnt);
|
||||
HAL_EARLY_LOGI(TAG, "total: %d", cnt);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user