rt-thread-official/bsp/gd32/arm/libraries/gd32_drivers/drv_dma.h

33 lines
1.0 KiB
C

/*
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2024-03-19 Evlers first implementation
*/
#ifndef _DRV_DMA_H_
#define _DRV_DMA_H_
#define DRV_DMA_CONFIG(dmax, chx, subx) { \
.periph = DMA##dmax, \
.channel = DMA_CH##chx, \
.rcu = RCU_DMA##dmax, \
.subperiph = DMA_SUBPERI##subx, \
.irq = DMA##dmax##_Channel##chx##_IRQn, \
}
struct dma_config
{
uint32_t periph;
rcu_periph_enum rcu;
dma_channel_enum channel;
dma_subperipheral_enum subperiph;
IRQn_Type irq;
};
#endif /* _DRV_DMA_H_ */