copied nexa driver from stm32 and added uart functions