     }
     /* send communication register id 0x00 */
     SPI.transfer(0x00);
-    /* send write command to the specified register 0x00 - 0xFF */
+    /* send write command to the desired register 0x00 - 0xFF */
     SPI.transfer(0x00 | reg);
-    /* write the specified amount of bytes */
+    /* write the desired amount of bytes */
     for (int i = 0; i < write_len; i++) {
         SPI.transfer(value[i]);
     }

    }
    /* send communication register id 0x00 */
    SPI.transfer(0x00);
    /* send read command to the specified register 0x00 - 0xFF */
    SPI.transfer(0x40 | reg);
    /* read the specified amount of bytes */
    for (int i = 0; i < read_len; i++) {
        value[i] = SPI.transfer(0x00);
    }

        return 1;
    }
    byte value[2];
    /* convert channel number to channel register value */
    byte channel_reg = 0x10 | channel;
    /* read desired channel configuration */
    get_adc_register(channel_reg, value, 2);
    /* clear the enable bit */
    value[0] &= ~(1 << 7);
    /* enable or disable this channel */
    value[0] |= (status << 7);
    /* define the default analog input */
    byte ain = (channel << 1);
    /* set default AINs */
    value[0] = 0xFC;
    value[1] = 0x00;

    /* user desired analog input values */
    if (ain1 != NULL) {
        value[0] |= (ain1 >> 3);
        value[1] |= (ain1 << 5);
        /* when 2 analog input values were set */
        if (ain2 != NULL) {
            value[1] |= ain2;
        }
    /* set automatic values for BIPOLAR output */
    } else if (adc_setup_coding_output == BIPOLAR_CODED_OUTPUT) {
        value[0] |= (ain >> 3);
        value[1] |= (ain << 5);
        value[1] |= (ain + 1);
    /* set automatic value for UNIPOLAR output */
    } else {
        value[0] |= (channel >> 3);
        value[1] |= (channel << 5);
        value[1] |= channel;
    }
    print_byte(value[1]);

    /* update desired channel configuration */
    set_adc_register(channel_reg, value, 2);
    /* return error code */
    return 0;
}
