Add UART receiving buffer and did refactoring for bsp files.