2.8.1.2.1 Code

Copy-paste the following code to your user application:
adc_start_conversion(&adc_instance);

uint16_t result;

do {
    /* Wait for conversion to be done and read out result */
} while (adc_read(&adc_instance, &result) == STATUS_BUSY);

while (1) {
    /* Infinite loop */
}