kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/heap_dma_pool_fixes' into 'master'
heap: Fixes around DMA reserved pool See merge request idf/esp-idf!3034pull/2367/head
commit
6976f5671c
|
@ -185,7 +185,7 @@ esp_err_t esp_spiram_reserve_dma_pool(size_t size) {
|
|||
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);
|
||||
if (e != ESP_OK) {
|
||||
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) {
|
||||
err = ESP_ERR_NO_MEM;
|
||||
goto done;
|
||||
|
|
Ładowanie…
Reference in New Issue