stm32/adc: Factor code to optimise adc_read_channel and adc_read.
stm32/adc: Factor code to optimise adc_read_channel and adc_read.

Saves 200 bytes of code space.

kerneltask/micropython,ryannathans/micropython,MrSurly/micropython,swegener/micropython,kerneltask/micropython,MrSurly/micropython,pozetroninc/micropython,adafruit/circuitpython,swegener/micropython,tobbad/micropython,pozetroninc/micropython,kerneltask/micropython,pfalcon/micropython,swegener/micropython,bvernoux/micropython,dmazzella/micropython,adafruit/micropython,tralamazza/micropython,selste/micropython,ryannathans/micropython,trezor/micropython,pramasoul/micropython,swegener/micropython,selste/micropython,bvernoux/micropython,MrSurly/micropython,ryannathans/micropython,henriknelson/micropython,tobbad/micropython,pfalcon/micropython,pramasoul/micropython,trezor/micropython,tralamazza/micropython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython,trezor/micropython,adafruit/circuitpython,henriknelson/micropython,adafruit/circuitpython,henriknelson/micropython,henriknelson/micropython,trezor/micropython,trezor/micropython,adafruit/micropython,tralamazza/micropython,pfalcon/micropython,MrSurly/micropython,kerneltask/micropython,swegener/micropython,tralamazza/micropython,selste/micropython,adafruit/circuitpython,tobbad/micropython,adafruit/circuitpython,pfalcon/micropython,dmazzella/micropython,kerneltask/micropython,bvernoux/micropython,ryannathans/micropython,tobbad/micropython,selste/micropython,MrSurly/micropython,pramasoul/micropython,henriknelson/micropython,pozetroninc/micropython,bvernoux/micropython,tobbad/micropython,adafruit/micropython,dmazzella/micropython,ryannathans/micropython,pramasoul/micropython,bvernoux/micropython,pozetroninc/micropython,dmazzella/micropython,pfalcon/micropython,selste/micropython,pramasoul/micropython,pozetroninc/micropython