Implement uart in polling mode.