Browse Source

Fix analogReadResolution ADC1 cal

main
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

analog_right_shift = config - bits; analog_right_shift = config - bits;
if (config != analog_config_bits) { if (config != analog_config_bits) {
analog_config_bits = config; 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(); analog_init();
} }
} }

Loading…
Cancel
Save