diff --git a/IOTeensy.cpp b/IOTeensy.cpp index 18d9d4d..8f8ac27 100644 --- a/IOTeensy.cpp +++ b/IOTeensy.cpp @@ -87,7 +87,7 @@ void CIO::startInt() ADC0_SC2 = ADC_SC2_REFSEL(1) | ADC_SC2_ADTRG; // Voltage ref internal, hardware trigger ADC0_SC3 = ADC_SC3_AVGE | ADC_SC3_AVGS(0); // Enable averaging, 4 samples - ADC0_SC3 = ADC_SC3_CAL; + ADC0_SC3 |= ADC_SC3_CAL; while (ADC0_SC3 & ADC_SC3_CAL) // Wait for calibration ; @@ -108,7 +108,7 @@ void CIO::startInt() ADC1_SC2 = ADC_SC2_REFSEL(1); // Voltage ref internal, software trigger ADC1_SC3 = ADC_SC3_AVGE | ADC_SC3_AVGS(0); // Enable averaging, 4 samples - ADC1_SC3 = ADC_SC3_CAL; + ADC1_SC3 |= ADC_SC3_CAL; while (ADC1_SC3 & ADC_SC3_CAL) // Wait for calibration ;