mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
change(aes): refactor DMA buffer allocation
This commit is contained in:
parent
b52b99a756
commit
3e3e1c77ba
@ -8,7 +8,6 @@
|
||||
#include "esp_attr.h"
|
||||
#include "esp_cache.h"
|
||||
#include "esp_check.h"
|
||||
#include "esp_dma_utils.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_heap_caps.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
@ -323,13 +322,7 @@ static inline void dma_desc_append(crypto_dma_desc_t **head, crypto_dma_desc_t *
|
||||
|
||||
static inline void *aes_dma_calloc(size_t num, size_t size, uint32_t caps, size_t *actual_size)
|
||||
{
|
||||
void *ptr = NULL;
|
||||
esp_dma_mem_info_t dma_mem_info = {
|
||||
.extra_heap_caps = caps,
|
||||
.dma_alignment_bytes = DMA_DESC_MEM_ALIGN_SIZE,
|
||||
};
|
||||
esp_dma_capable_calloc(num, size, &dma_mem_info, &ptr, actual_size);
|
||||
return ptr;
|
||||
return heap_caps_aligned_calloc(DMA_DESC_MEM_ALIGN_SIZE, num, size, caps | MALLOC_CAP_DMA | MALLOC_CAP_8BIT);
|
||||
}
|
||||
|
||||
static inline esp_err_t dma_desc_link(crypto_dma_desc_t *dmadesc, size_t crypto_dma_desc_num, size_t cache_line_size)
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/lock.h>
|
||||
|
||||
#include "esp_dma_utils.h"
|
||||
#include "esp_private/esp_crypto_lock_internal.h"
|
||||
#include "esp_private/esp_cache_private.h"
|
||||
#include "esp_log.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user