/* ADC Set Resolution. 
ADC Resolution can be reduced from 12 bits to 10, 8 or 6 bits for a corresponding reduction in conversion time (resolution + 3 ADC clock cycles). */
void adc_set_resolution(uint32_t adc, uint32_t resolution)
/* ADC Set Resolution. 
ADC Resolution can be reduced from 12 bits to 10, 8 or 6 bits for a corresponding reduction in conversion time (resolution + 3 ADC clock cycles). */
void adc_set_resolution(uint32_t adc, uint32_t resolution)
{
	uint32_t reg32 = ADC_CR1(adc);
	reg32 &= ~ADC_CR1_RES_MASK;
	reg32 |= resolution;
	ADC_CR1(adc) = reg32;
}