48 reg32 &= ~(0x7 << (channel * 3));
49 reg32 |= (time << (channel * 3));
51 }
else if (channel < 20) {
53 reg32 &= ~(0x7 << ((channel - 10) * 3));
54 reg32 |= (time << ((channel - 10) * 3));
58 reg32 &= ~(0x7 << ((channel - 20) * 3));
59 reg32 |= (time << ((channel - 20) * 3));
79 for (i = 0; i <= 9; i++) {
80 reg32 |= (time << (i * 3));
void adc_set_sample_time_on_all_channels(uint32_t adc, uint8_t time)
ADC Set the Sample Time for All Channels.
void adc_set_sample_time(uint32_t adc, uint8_t channel, uint8_t time)
ADC Set the Sample Time for a Single Channel.