dma.h 613 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-08-04 JasonHu First Version
  9. */
  10. #ifndef __HW_DMA_H__
  11. #define __HW_DMA_H__
  12. #include <rtdef.h>
  13. struct rt_hw_dma
  14. {
  15. rt_ubase_t paddr;
  16. rt_ubase_t vaddr;
  17. rt_size_t size;
  18. rt_ubase_t alignment; /* addr align */
  19. };
  20. typedef struct rt_hw_dma rt_hw_dma_t;
  21. rt_err_t rt_hw_dma_alloc(rt_hw_dma_t *dma);
  22. rt_err_t rt_hw_dma_free(rt_hw_dma_t *dma);
  23. rt_err_t rt_hw_dma_init(rt_ubase_t start, rt_ubase_t end);
  24. #endif /* __HW_DMA_H__ */