mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 09:39:10 -04:00
spi: always put spihost handle in SRAM
Closes https://github.com/espressif/esp-idf/issues/4635
This commit is contained in:
parent
0c99aef08d
commit
4fb879c11e
@ -238,8 +238,8 @@ esp_err_t spi_bus_initialize(spi_host_device_t host, const spi_bus_config_t *bus
|
|||||||
SPI_CHECK(false, "dma channel already in use", ESP_ERR_INVALID_STATE);
|
SPI_CHECK(false, "dma channel already in use", ESP_ERR_INVALID_STATE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// spihost contains atomic variables, which should not be put in PSRAM
|
||||||
spihost[host]=malloc(sizeof(spi_host_t));
|
spihost[host] = heap_caps_malloc(sizeof(spi_host_t), MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
||||||
if (spihost[host]==NULL) {
|
if (spihost[host]==NULL) {
|
||||||
ret = ESP_ERR_NO_MEM;
|
ret = ESP_ERR_NO_MEM;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user