     bool pass_test = true;
 
     // measurement will be ready if value < 1.0V
-    adc->enableCompare(1.0/3.3*adc->getMaxValue(ADC_NUM::ADC_0), 0, ADC_NUM::ADC_0);
+    adc->enableCompare(1.0/3.3*adc->getMaxValue(ADC_0), 0, ADC_0);
 
     pinMode(pin_cmp, INPUT_PULLUP); // set to max
     // this should fail
-    value = adc->analogRead(pin_cmp, ADC_NUM::ADC_0);
+    value = adc->analogRead(pin_cmp, ADC_0);
     if (adc->adc0->fail_flag != ADC_ERROR::COMPARISON) {
         Serial.println("Comparison didn't fail.");
         adc->adc0->printError();

    pinMode(pin_cmp, INPUT_PULLDOWN); // set to min
    adc->adc0->resetError();
    // this should be ok
    value = adc->analogRead(pin_cmp, ADC_NUM::ADC_0);
    if(adc->adc0->fail_flag != ADC_ERROR::CLEAR) {
        Serial.println("Some other error happened when comparison should have succeeded.");
        adc->adc0->printError();

    bool pass_test = true;

    // ready if value lies out of [1.0,2.0] V
    adc->enableCompareRange(1.0*adc->getMaxValue(ADC_0)/3.3, 2.0*adc->getMaxValue(ADC_0)/3.3, 0, 1, ADC_0);


    pinMode(pin_cmp, INPUT_PULLUP); // set to max
    // this should be ok
    value = adc->analogRead(pin_cmp, ADC_0);
    if(adc->adc0->fail_flag != ADC_ERROR::CLEAR) {
        Serial.println("Some other error happened when comparison should have succeeded.");
        adc->adc0->printError();
