drv_heap.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #ifdef RT_USING_UNCACHE_HEAP
  19. rt_err_t rt_uncache_heap_init(void *begin_addr, void *end_addr);
  20. void *rt_malloc_uncache(rt_size_t size);
  21. void rt_free_uncache(void *ptr);
  22. #endif
  23. #ifdef RT_USING_LARGE_HEAP
  24. rt_err_t rt_large_heap_init(void *begin_addr, void *end_addr);
  25. void *rt_malloc_large(rt_size_t size);
  26. void rt_free_large(void *ptr);
  27. void *rt_dma_malloc_large(rt_size_t size);
  28. void rt_dma_free_large(void *ptr);
  29. #endif
  30. #ifdef RT_USING_DTCM_HEAP
  31. void *rt_malloc_dtcm(rt_size_t size);
  32. void rt_free_dtcm(void *ptr);
  33. void *rt_dma_malloc_dtcm(rt_size_t size);
  34. void rt_dma_free_dtcm(void *ptr);
  35. #endif
  36. #ifdef RT_USING_PSRAM_HEAP
  37. void *rt_malloc_psram(rt_size_t size);
  38. void rt_free_psram(void *ptr);
  39. void *rt_dma_malloc_psram(rt_size_t size);
  40. void rt_dma_free_psram(void *ptr);
  41. #endif
  42. #endif