12345678910111213141516171819202122232425262728293031323334 |
- #ifndef __ADC_H
- #define __ADC_H
- #include "stm32f4xx.h"
- #define ADC_CHANNEL 2
- extern u16 uAD_Buff_A[ADC_CHANNEL]; //ADC采集缓存A
- extern u16 uAD_Buff_B[ADC_CHANNEL]; //ADC采集缓存B
- void ADC_GPIO_Config(u32 RCC_APBnPeriphn, GPIO_TypeDef *GPIOx,u16 PIN);
- void ADC_DMA_Config(u32 RCC_AHB_DMA,u32 DMA_Channel,ADC_TypeDef* ADCn,DMA_Stream_TypeDef *DMA_Stream);
- void ADC_DMA_Mode_Config(u32 RCC_APB_ADCn, u32 ADC_ExternalTrigConv, ADC_TypeDef* ADCn, u8 ADC_Channel[], u8 Channel_num);
- void ADC_NVIC_Config(u8 IRQChannel, u8 pre, u8 sub);
- void ADC_TIM_Config(TIM_TypeDef* TIMx,u16 psc, u16 per,
- void(*ClockCMD)(uint32_t, FunctionalState),u32 RCC_APBnPeriphn, //APB时钟使能设置
- void(*TIM_OCInit)(TIM_TypeDef*, TIM_OCInitTypeDef*), //OC通道设置
- void(*TIM_OCPreloadConfig)(TIM_TypeDef*, uint16_t));
- void ADC_SOFT_Mode_Config(u32 RCC_APBnPeriphn, ADC_TypeDef* ADCn, u8 Channel_num);
-
- u16 Get_SOFT_ADC(ADC_TypeDef* ADCn, u8 ADC_Channe);
-
- #endif
|