[stm32] headers fixup
[stm32] common code for stm32 - move select() function to common file