1
6
7
8
13
14
15
16
17
18
21
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
77
81
82
83
86
89
90
91
94
95
96
97
100
101
102
103
106
111
112
115
116
117
118
119
120
/* ... */
#pragma once
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include "esp_err.h"
#include "esp_heap_caps.h"5 includes
#ifdef __cplusplus
extern "C" {
#endif
/* ... */
typedef struct {
int extra_heap_caps;
size_t dma_alignment_bytes;
}{ ... } esp_dma_mem_info_t;
/* ... */
esp_err_t esp_dma_capable_malloc(size_t size, const esp_dma_mem_info_t *dma_mem_info, void **out_ptr, size_t *actual_size);
/* ... */
esp_err_t esp_dma_capable_calloc(size_t calloc_num, size_t size, const esp_dma_mem_info_t *dma_mem_info, void **out_ptr, size_t *actual_size);
/* ... */
bool esp_dma_is_buffer_alignment_satisfied(const void *ptr, size_t size, esp_dma_mem_info_t dma_mem_info);
/* ... */
typedef struct {
bool is_desc;
bool on_psram;
}{ ... } dma_alignment_info_t;
/* ... */
/* ... */
#define ESP_DMA_MALLOC_FLAG_PSRAM BIT(0)
/* ... */
esp_err_t esp_dma_malloc(size_t size, uint32_t flags, void **out_ptr, size_t *actual_size)
__attribute__((deprecated("esp_dma_malloc is deprecated, please use esp_dma_capable_malloc")));
/* ... */
esp_err_t esp_dma_calloc(size_t n, size_t size, uint32_t flags, void **out_ptr, size_t *actual_size)
__attribute__((deprecated("esp_dma_calloc is deprecated, please use esp_dma_capable_calloc")));
/* ... */
typedef enum {
ESP_DMA_BUF_LOCATION_INTERNAL,
ESP_DMA_BUF_LOCATION_PSRAM,
ESP_DMA_BUF_LOCATION_AUTO,
}{ ... } esp_dma_buf_location_t;
/* ... */
bool esp_dma_is_buffer_aligned(const void *ptr, size_t size, esp_dma_buf_location_t location)
__attribute__((deprecated("esp_dma_is_buffer_aligned is deprecated, please use esp_dma_is_buffer_alignment_satisfied")));
#ifdef __cplusplus
}Deprecated APIs
{...}#endif