STM32 Library refactoring