add hardware init
add new uart code
fix uart receive bug
refine uart code