tty i/o api

make interface for simple serial port communcation