himem: Fixed incorrect out_ptr when calling esp_himem_map range_offset non-zero

Closes: https://github.com/espressif/esp-idf/issues/5639
This commit is contained in:
Xiao Xufeng 2023-04-05 01:27:17 +08:00
parent 9f2012156c
commit ef4db26eca

View File

@ -331,7 +331,7 @@ esp_err_t esp_himem_map(esp_himem_handle_t handle, esp_himem_rangehandle_t range
}
//Set out pointer
*out_ptr = (void *)(VIRT_HIMEM_RANGE_START + (range->block_start + range_offset) * CACHE_BLOCKSIZE);
*out_ptr = (void *)(VIRT_HIMEM_RANGE_START + (range->block_start + range_block) * CACHE_BLOCKSIZE);
return ESP_OK;
}