Template based peripherial library for STM32F334x family