fix: enhance error logging for SPI data transfer and display chip info

This commit is contained in:
GW_MC
2026-01-29 12:46:14 +08:00
parent fc79e92660
commit b7d2373b0b
3 changed files with 11 additions and 2 deletions

View File

@@ -222,6 +222,11 @@ esp_err_t EPDHandler::transfer_spi_data(const uint8_t* data, const size_t& lengt
esp_err_t ret = spi_device_polling_transmit(spi_, &t);
if (ret != ESP_OK) {
ESP_LOGE(TAG, "Failed to send SPI chunk at offset %zu: %s", offset, esp_err_to_name(ret));
if (ret == ESP_ERR_NO_MEM) {
ESP_LOGE(TAG, "Current free heap size: %u bytes", esp_get_free_heap_size());
ESP_LOGE(TAG, "Current free DMA-capable memory size: %u bytes",
heap_caps_get_free_size(MALLOC_CAP_DMA));
}
return ret;
}