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 11 #ifndef __DRV_DMA_H__ 12 #define __DRV_DMA_H__ 13 14 /******************************************************************************* 15 * Include files 16 ******************************************************************************/ 17 #include <rtthread.h> 18 #include "drv_irq.h" 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 struct dma_config 25 { 26 CM_DMA_TypeDef *Instance; 27 rt_uint32_t channel; 28 rt_uint32_t clock; 29 rt_uint32_t trigger_select; 30 en_event_src_t trigger_event; 31 rt_uint32_t flag; 32 struct hc32_irq_config irq_config; 33 func_ptr_t irq_callback; 34 }; 35 36 #ifdef __cplusplus 37 } 38 #endif 39 40 #endif /* __DRV_DMA_H__ */ 41 42