1 /**
2   * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
3   *
4   * SPDX-License-Identifier: Apache-2.0
5   ******************************************************************************
6   * @file    drv_heap.h
7   * @version V0.1
8   * @brief   heap interface
9   *
10   * Change Logs:
11   * Date           Author          Notes
12   * 2019-03-26     Cliff.Chen      first implementation
13   *
14   ******************************************************************************
15   */
16 #ifndef __DRV_HEAP_H
17 #define __DRV_HEAP_H
18 
19 #ifdef RT_USING_UNCACHE_HEAP
20 rt_err_t rt_uncache_heap_init(void *begin_addr, void *end_addr);
21 void *rt_malloc_uncache(rt_size_t size);
22 void rt_free_uncache(void *ptr);
23 #endif
24 
25 #ifdef RT_USING_LARGE_HEAP
26 rt_err_t rt_large_heap_init(void *begin_addr, void *end_addr);
27 void *rt_malloc_large(rt_size_t size);
28 void rt_free_large(void *ptr);
29 void *rt_dma_malloc_large(rt_size_t size);
30 void rt_dma_free_large(void *ptr);
31 #endif
32 
33 #ifdef RT_USING_DTCM_HEAP
34 void *rt_malloc_dtcm(rt_size_t size);
35 void rt_free_dtcm(void *ptr);
36 void *rt_dma_malloc_dtcm(rt_size_t size);
37 void rt_dma_free_dtcm(void *ptr);
38 #endif
39 
40 #ifdef RT_USING_PSRAM_HEAP
41 void *rt_malloc_psram(rt_size_t size);
42 void rt_free_psram(void *ptr);
43 void *rt_dma_malloc_psram(rt_size_t size);
44 void rt_dma_free_psram(void *ptr);
45 #endif
46 
47 #endif
48