Workflow

  1. 1.
    Start conversion.
    adc_start_conversion(&adc_instance);
    
  2. 2.
    Wait until conversion is done and read result.
    uint16_t result;
    
    do {
        /* Wait for conversion to be done and read out result */
    } while (adc_read(&adc_instance, &result) == STATUS_BUSY);
    
  3. 3.
    Enter an infinite loop once the conversion is complete.
    while (1) {
        /* Infinite loop */
    }