F3: use ADC device from PG
This commit is contained in:
parent
d557203fac
commit
1df0147a2b
|
@ -118,9 +118,10 @@ void adcInit(const adcConfig_t *config)
|
||||||
adcOperatingConfig[ADC_CURRENT].tag = config->current.ioTag; //CURRENT_METER_ADC_CHANNEL;
|
adcOperatingConfig[ADC_CURRENT].tag = config->current.ioTag; //CURRENT_METER_ADC_CHANNEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ADCDevice device = adcDeviceByInstance(ADC_INSTANCE);
|
ADCDevice device = ADC_CFG_TO_DEV(config->device);
|
||||||
if (device == ADCINVALID)
|
if (device == ADCINVALID) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef ADC24_DMA_REMAP
|
#ifdef ADC24_DMA_REMAP
|
||||||
SYSCFG_DMAChannelRemapConfig(SYSCFG_DMARemap_ADC2ADC4, ENABLE);
|
SYSCFG_DMAChannelRemapConfig(SYSCFG_DMARemap_ADC2ADC4, ENABLE);
|
||||||
|
|
|
@ -211,8 +211,9 @@ void adcInit(const adcConfig_t *config)
|
||||||
}
|
}
|
||||||
|
|
||||||
ADCDevice device = ADC_CFG_TO_DEV(config->device);
|
ADCDevice device = ADC_CFG_TO_DEV(config->device);
|
||||||
if (device == ADCINVALID)
|
if (device == ADCINVALID) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
adcDevice_t adc = adcHardware[device];
|
adcDevice_t adc = adcHardware[device];
|
||||||
|
|
||||||
|
|
|
@ -237,8 +237,9 @@ void adcInit(const adcConfig_t *config)
|
||||||
}
|
}
|
||||||
|
|
||||||
ADCDevice device = adcDeviceByInstance(ADC_INSTANCE);
|
ADCDevice device = adcDeviceByInstance(ADC_INSTANCE);
|
||||||
if (device == ADCINVALID)
|
if (device == ADCINVALID) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
adc = adcHardware[device];
|
adc = adcHardware[device];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue