drv_dma.h 930 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. * Copyright (c) 2022, Xiaohua Semiconductor Co., Ltd.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0
  6. *
  7. * Change Logs:
  8. * Date Author Notes
  9. * 2022-04-28 CDT first version
  10. */
  11. #ifndef __DRV_DMA_H__
  12. #define __DRV_DMA_H__
  13. /*******************************************************************************
  14. * Include files
  15. ******************************************************************************/
  16. #include <rtthread.h>
  17. #include "drv_irq.h"
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. struct dma_config
  22. {
  23. CM_DMA_TypeDef *Instance;
  24. rt_uint32_t channel;
  25. rt_uint32_t clock;
  26. rt_uint32_t trigger_select;
  27. en_event_src_t trigger_event;
  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__ */