#ifndef _BSP_DMA_H #define _BSP_DMA_H #include "stm32f0xx.h" #include "bsp_usart.h" #define DEBUG_USART_DMA DMA1 #define DEBUG_USART_DMA_CHANNEL DMA1_Channel6 #define DEBUG_USART_DMA_RemapRequest DMA1_CH6_USART2_RX #define DEBUG_USART_DMA_CLK RCC_AHBPeriph_DMA1 #define NH3_USART_DMA DMA1 #define NH3_USART_DMA_CHANNEL DMA1_Channel1 #define NH3_USART_DMA_RemapRequest DMA1_CH1_USART1_RX #define NH3_USART_DMA_CLK RCC_AHBPeriph_DMA1 #define H2S_USART_DMA DMA1 #define H2S_USART_DMA_CHANNEL DMA1_Channel5 #define H2S_USART_DMA_RemapRequest DMA1_CH5_USART5_RX #define H2S_USART_DMA_CLK RCC_AHBPeriph_DMA1 #define CH2O_USART_DMA DMA1 #define CH2O_USART_DMA_CHANNEL DMA1_Channel3 #define CH2O_USART_DMA_RemapRequest DMA1_CH3_USART3_RX #define CH2O_USART_DMA_CLK RCC_AHBPeriph_DMA1 #define PM25_USART_DMA DMA2 #define PM25_USART_DMA_CHANNEL DMA2_Channel2 #define PM25_USART_DMA_RemapRequest DMA2_CH2_USART4_RX #define PM25_USART_DMA_CLK RCC_AHBPeriph_DMA2 #define CO2_USART_DMA DMA1 #define CO2_USART_DMA_CHANNEL DMA1_Channel6 #define CO2_USART_DMA_RemapRequest DMA1_CH6_USART2_RX #define CO2_USART_DMA_CLK RCC_AHBPeriph_DMA1 #define LORA_USART_DMA DMA2 #define LORA_USART_DMA_CHANNEL DMA2_Channel3 #define LORA_USART_DMA_RemapRequest DMA2_CH3_USART8_RX #define LORA_USART_DMA_CLK RCC_AHBPeriph_DMA2 void Usart_DMA_Config(DMA_Channel_TypeDef* DMAy_Channelx,uint32_t RCC_AHBPeriph, USART_TypeDef* USARTx,uint8_t* Data_Buffer,uint32_t Data_Length, DMA_TypeDef* DMAy, uint32_t DMAx_CHy_RemapRequest); void USARTx_DMA_CONFIG(void); #endif /* _BSP_DMA_H */