int main(void)
{
system_init();
delay_init();
//! [setup_init]
configure_adc();
//! [setup_init]
//! [main]
//! [start_conv]
adc_start_conversion(&adc_instance);
//! [start_conv]
//! [get_res]
uint16_t result;
sio2host_init();
printf("Hello\r\n");
do {
/* Wait for conversion to be done and read out result */
} while (adc_read(&adc_instance, &result) == STATUS_BUSY);
//! [get_res]
printf("Fuck\r\n");
//! [inf_loop]
while (1) {
/* Infinite loop
*/
delay_cycles_ms(5000);
do {
/* Wait for conversion to be done and read out result */
} while (adc_read(&adc_instance, &result) == STATUS_BUSY);
//! [get_res]
printf("%d\r\n",result);
}
//! [inf_loop]
//! [main]
}