Optional analog inputs are not initialized at ADC module startup.
Calling PIOS_ADC_PinSetup(uint32_t pin) setups them as analog input at a later stage.
- performs undersampling in two steps operating with a half buffer at time;
- Skip costly undersampling for Temperature channel;
- some optimizations to the downsample loops;
- apply compiler speed optimization to PIOS_ADC_downsample_data()