drv_dma.h 914 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (C) 2022-2024, Xiaohua Semiconductor Co., Ltd.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-04-28 CDT first version
  9. */
  10. #ifndef __DRV_DMA_H__
  11. #define __DRV_DMA_H__
  12. /*******************************************************************************
  13. * Include files
  14. ******************************************************************************/
  15. #include <rtthread.h>
  16. #include "drv_irq.h"
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. struct dma_config
  21. {
  22. CM_DMA_TypeDef *Instance;
  23. rt_uint32_t channel;
  24. rt_uint32_t clock;
  25. rt_uint32_t trigger_select;
  26. en_event_src_t trigger_event;
  27. rt_uint32_t flag;
  28. struct hc32_irq_config irq_config;
  29. func_ptr_t irq_callback;
  30. };
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif /* __DRV_DMA_H__ */