fix: enhance error logging for SPI data transfer and display chip info
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ void LVGLHandler::touch_read_cb_(lv_indev_t* indev, lv_indev_data_t* data) {
|
||||
esp_lcd_touch_get_data(tp_handle, point_data, &touch_cnt, 1);
|
||||
|
||||
if (touch_cnt > 0) {
|
||||
ESP_LOGI(TAG, "Touch data read successfully: x=%d, y=%d", point_data[0].x, point_data[0].y);
|
||||
// ESP_LOGI(TAG, "Touch data read successfully: x=%d, y=%d", point_data[0].x, point_data[0].y);
|
||||
data->point.x = point_data[0].x;
|
||||
data->point.y = point_data[0].y;
|
||||
data->state = LV_INDEV_STATE_PRESSED;
|
||||
|
||||
Reference in New Issue
Block a user