use the same code for stm32f100 and stm32f103 uart