usart refactoring