Merge branch 'bugfix/heap_dma_pool_fixes' into 'master'
heap: Fixes around DMA reserved pool See merge request idf/esp-idf!3034
This commit is contained in:
commit
6976f5671c
2 changed files with 2 additions and 2 deletions
|
@ -185,7 +185,7 @@ esp_err_t esp_spiram_reserve_dma_pool(size_t size) {
|
||||||
return ESP_ERR_NO_MEM;
|
return ESP_ERR_NO_MEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t caps[] = { MALLOC_CAP_DMA|MALLOC_CAP_INTERNAL, 0, MALLOC_CAP_8BIT|MALLOC_CAP_32BIT };
|
uint32_t caps[] = { 0, MALLOC_CAP_DMA|MALLOC_CAP_INTERNAL, MALLOC_CAP_8BIT|MALLOC_CAP_32BIT };
|
||||||
esp_err_t e = heap_caps_add_region_with_caps(caps, (intptr_t) dma_heap, (intptr_t) dma_heap+next_size-1);
|
esp_err_t e = heap_caps_add_region_with_caps(caps, (intptr_t) dma_heap, (intptr_t) dma_heap+next_size-1);
|
||||||
if (e != ESP_OK) {
|
if (e != ESP_OK) {
|
||||||
return e;
|
return e;
|
||||||
|
|
|
@ -206,7 +206,7 @@ esp_err_t heap_caps_add_region_with_caps(const uint32_t caps[], intptr_t start,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
heap_t *p_new = malloc(sizeof(heap_t));
|
heap_t *p_new = heap_caps_malloc(sizeof(heap_t), MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
|
||||||
if (p_new == NULL) {
|
if (p_new == NULL) {
|
||||||
err = ESP_ERR_NO_MEM;
|
err = ESP_ERR_NO_MEM;
|
||||||
goto done;
|
goto done;
|
||||||
|
|
Loading…
Reference in a new issue