Merge pull request #5660 from jepler/esp32s3-spi

espressif: busio.SPI: Use SPI_DMA_CH_AUTO
This commit is contained in:
MicroDev 2021-12-06 10:24:51 +05:30 committed by GitHub
commit 7df172ba19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,7 +93,7 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self,
mp_raise_ValueError(translate("All SPI peripherals are in use"));
}
esp_err_t result = spi_bus_initialize(self->host_id, &bus_config, self->host_id /* dma channel */);
esp_err_t result = spi_bus_initialize(self->host_id, &bus_config, SPI_DMA_CH_AUTO);
if (result == ESP_ERR_NO_MEM) {
mp_raise_msg(&mp_type_MemoryError, translate("ESP-IDF memory allocation failed"));
} else if (result == ESP_ERR_INVALID_ARG) {