auto-sync

This commit is contained in:
rusEfi 2014-09-11 19:02:54 -05:00
parent 686b9ad125
commit fca0dd2087
1 changed files with 8 additions and 6 deletions

View File

@ -227,7 +227,7 @@ static void initAdcPin(ioportid_t port, int pin, const char *msg) {
}
adc_channel_e getAdcChannel(brain_pin_e pin) {
switch(pin) {
switch (pin) {
case GPIOA_0:
return EFI_ADC_0;
case GPIOA_1:
@ -503,11 +503,13 @@ void initAdcInputs(void) {
slowAdc.init();
pwmStart(EFI_INTERNAL_SLOW_ADC_PWM, &pwmcfg_slow);
fastAdc.init();
/*
* Initializes the PWM driver.
*/
pwmStart(EFI_INTERNAL_FAST_ADC_PWM, &pwmcfg_fast);
if (boardConfiguration->isFastAdcEnabled) {
fastAdc.init();
/*
* Initializes the PWM driver.
*/
pwmStart(EFI_INTERNAL_FAST_ADC_PWM, &pwmcfg_fast);
}
// ADC_CHANNEL_IN0 // PA0
// ADC_CHANNEL_IN1 // PA1