Generic serial driver for Erlang on UNIX and Windows