stm32lx: refactor and add support for STM32L0xx