refactor: update TAG constants and improve logging format in SPI implementation
This commit is contained in:
@ -43,7 +43,7 @@ static constexpr auto verify_statuses = [](std::span<const uint8_t> statuses) {
|
||||
uint8_t i = 0;
|
||||
for (const auto st : statuses) {
|
||||
if (const auto err = status_to_err(st); err != error::OK) {
|
||||
ESP_LOGE(TAG, "bad status 0x%02x at byte %u", st, i);
|
||||
ESP_LOGE(TAG, "s[%u]=0x%02x", i, st);
|
||||
return err;
|
||||
}
|
||||
i += 1;
|
||||
@ -87,7 +87,7 @@ void init(spi_config_t config) {
|
||||
.clock_speed_hz = config.clock_speed_hz,
|
||||
.spics_io_num = CS_PIN,
|
||||
.flags = SPI_DEVICE_NO_DUMMY,
|
||||
.queue_size = 1,
|
||||
.queue_size = 4,
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(spi_bus_initialize(config.host_id, &bus_config, SPI_DMA_CH_AUTO));
|
||||
|
||||
Reference in New Issue
Block a user