update uart related codes