Browse Source

Fix analogReadResolution ADC1 cal

teensy4-core
PaulStoffregen 8 years ago
parent
commit
2185bdc936
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      teensy3/analog.c

+ 6
- 1
teensy3/analog.c View File

@@ -327,7 +327,12 @@ void analogReadRes(unsigned int bits)
analog_right_shift = config - bits;
if (config != analog_config_bits) {
analog_config_bits = config;
if (calibrating) ADC0_SC3 = 0; // cancel cal
if (calibrating) {
ADC0_SC3 = 0; // cancel cal
#ifdef HAS_KINETIS_ADC1
ADC1_SC3 = 0;
#endif
}
analog_init();
}
}

Loading…
Cancel
Save