1
6
7
8
9
10
11
12
13
14
15
16
17
18
19
22
/* ... */
#include "pico.h"
#include "hardware/adc.h"
#include "hardware/resets.h"
void adc_init(void) {
reset_unreset_block_num_wait_blocking(RESET_ADC);
adc_hw->cs = ADC_CS_EN_BITS;
while (!(adc_hw->cs & ADC_CS_READY_BITS)) {
tight_loop_contents();
}while (!(adc_hw->cs & ADC_CS_READY_BITS)) { ... }
}{ ... }