diff --git a/components/app_trace/app_trace.c b/components/app_trace/app_trace.c index 3c5011a812..46e5bcf1fc 100644 --- a/components/app_trace/app_trace.c +++ b/components/app_trace/app_trace.c @@ -26,8 +26,6 @@ #define ESP_APPTRACE_MAX_VPRINTF_ARGS 256 #define ESP_APPTRACE_HOST_BUF_SIZE 256 -#define ESP_APPTRACE_PRINT_LOCK 0 - const static char *TAG = "esp_apptrace"; /** tracing module internal data */ @@ -90,7 +88,7 @@ void esp_apptrace_down_buffer_config(uint8_t *buf, uint32_t size) return; } // currently down buffer is supported for JTAG interface only - // TODO: one more argument should be added to this function to specify HW inteface: JTAG, UART0 etc + // TODO: one more argument should be added to this function to specify HW interface: JTAG, UART0 etc ch = &s_trace_channels[ESP_APPTRACE_DEST_JTAG]; if (ch->hw != NULL) { if (ch->hw->down_buffer_config != NULL) { diff --git a/components/app_trace/app_trace_util.c b/components/app_trace/app_trace_util.c index 11f150c734..44299b381e 100644 --- a/components/app_trace/app_trace_util.c +++ b/components/app_trace/app_trace_util.c @@ -9,12 +9,14 @@ #include "esp_app_trace_util.h" #include "sdkconfig.h" +#define ESP_APPTRACE_PRINT_LOCK 0 + /////////////////////////////////////////////////////////////////////////////// ///////////////////////////////// Locks ///////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// #if ESP_APPTRACE_PRINT_LOCK -static esp_apptrace_lock_t s_log_lock = {.irq_stat = 0, .portmux = portMUX_INITIALIZER_UNLOCKED}; +static esp_apptrace_lock_t s_log_lock = { .mux = portMUX_INITIALIZER_UNLOCKED }; #endif int esp_apptrace_log_lock(void) @@ -31,7 +33,7 @@ int esp_apptrace_log_lock(void) void esp_apptrace_log_unlock(void) { - #if ESP_APPTRACE_PRINT_LOCK +#if ESP_APPTRACE_PRINT_LOCK esp_apptrace_lock_give(&s_log_lock); #endif } @@ -87,7 +89,7 @@ esp_err_t esp_apptrace_lock_give(esp_apptrace_lock_t *lock) uint8_t *esp_apptrace_rb_produce(esp_apptrace_rb_t *rb, uint32_t size) { uint8_t *ptr = rb->data + rb->wr; - // check for avalable space + // check for available space if (rb->rd <= rb->wr) { // |?R......W??| if (rb->wr + size >= rb->size) {