Adding termios configuration and reading from tty device with some other code refactoring. The character read from serial device are currently only printf-ed to console.