Allow ADC DMA stream to be specified.

This commit is contained in:
Hydra 2016-11-17 15:27:17 +01:00 committed by Dominic Clifton
parent dc7609faf7
commit c3943f4ec2
1 changed files with 5 additions and 1 deletions

View File

@ -37,8 +37,12 @@
#define ADC_INSTANCE ADC1
#endif
#ifndef ADC1_DMA_STREAM
#define ADC1_DMA_STREAM DMA2_Stream4
#endif
const adcDevice_t adcHardware[] = {
{ .ADCx = ADC1, .rccADC = RCC_APB2(ADC1), .DMAy_Streamx = DMA2_Stream4, .channel = DMA_Channel_0 },
{ .ADCx = ADC1, .rccADC = RCC_APB2(ADC1), .DMAy_Streamx = ADC1_DMA_STREAM, .channel = DMA_Channel_0 },
//{ .ADCx = ADC2, .rccADC = RCC_APB2(ADC2), .DMAy_Streamx = DMA2_Stream1, .channel = DMA_Channel_0 }
};