Updated acc to comments

This commit is contained in:
Alexey Gerenkov
2017-07-24 20:07:21 +03:00
parent c2c9149a24
commit 60c45ae2c4
2 changed files with 5 additions and 19 deletions

View File

@@ -364,24 +364,10 @@ static inline esp_err_t esp_apptrace_lock_cleanup()
esp_err_t esp_apptrace_lock(esp_apptrace_tmo_t *tmo)
{
#if CONFIG_ESP32_APPTRACE_LOCK_ENABLE
//unsigned cur, elapsed, start = xthal_get_ccount();
esp_err_t ret = esp_apptrace_lock_take(&s_trace_buf.lock, tmo);
if (ret != ESP_OK) {
return ESP_FAIL;
}
// decrease tmo by actual waiting time
// cur = xthal_get_ccount();
// if (start <= cur) {
// elapsed = cur - start;
// } else {
// elapsed = ULONG_MAX - start + cur;
// }
// if (ESP_APPTRACE_CPUTICKS2US(elapsed) > *tmo) {
// *tmo = 0;
// } else {
// *tmo -= ESP_APPTRACE_CPUTICKS2US(elapsed);
// }
#endif
return ESP_OK;
}

View File

@@ -140,7 +140,7 @@ They allow developers to ocupy chunk of read buffer and process it in-place. The
} else {
printf("No data");
}
esp_err_t res = esp_apptrace_buffer_put(ESP_APPTRACE_DEST_TRAX, ptr, 100/*tmo in us*/);
esp_err_t res = esp_apptrace_down_buffer_put(ESP_APPTRACE_DEST_TRAX, ptr, 100/*tmo in us*/);
if (res != ESP_OK) {
/* in case of error host tracing tool (e.g. OpenOCD) will report incomplete user buffer */
ESP_LOGE("Failed to put buffer!");