kopia lustrzana https://github.com/espressif/esp-idf
spi: suppress spi_bus_lock_touch log level
The log in the spi_bus_lock_touch may be annoying. This commit suppress the log level, and make the log visible only when the device altered. Resolves https://github.com/espressif/esp-idf/issues/5056pull/5307/head
rodzic
a064e0c4de
commit
e04bb43b9f
|
@ -657,9 +657,10 @@ IRAM_ATTR bool spi_bus_lock_touch(spi_bus_lock_dev_handle_t dev_handle)
|
|||
{
|
||||
spi_bus_lock_dev_t* last_dev = dev_handle->parent->last_dev;
|
||||
dev_handle->parent->last_dev = dev_handle;
|
||||
if (last_dev) {
|
||||
ESP_DRAM_LOGD(TAG, "SPI dev changed from %d to %d",
|
||||
dev_lock_get_id(last_dev), dev_lock_get_id(dev_handle));
|
||||
if (last_dev != dev_handle) {
|
||||
int last_dev_id = (last_dev? dev_lock_get_id(last_dev): -1);
|
||||
ESP_DRAM_LOGV(TAG, "SPI dev changed from %d to %d",
|
||||
last_dev_id, dev_lock_get_id(dev_handle));
|
||||
}
|
||||
return (dev_handle != last_dev);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue