51 reg32 &= ~(0x7 << (channel * 3));
52 reg32 |= (time << (channel * 3));
56 reg32 &= ~(0x7 << ((channel - 10) * 3));
57 reg32 |= (time << ((channel - 10) * 3));
77 for (i = 0; i <= 9; i++) {
78 reg32 |= (time << (i * 3));
82 for (i = 10; i <= 17; i++) {
83 reg32 |= (time << ((i - 10) * 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.
void adc_disable_vbat_sensor(void)
Disable The VBat Sensor.
void adc_set_multi_mode(uint32_t mode)
ADC Set Dual/Triple Mode.
void adc_enable_vbat_sensor(void)
Enable The VBat Sensor.