Permalink
Browse files

Style nit: convert 1 element tuples to plain atoms

  • Loading branch information...
1 parent c10e84a commit 3ed3a43fd6da58875e35613f1ad1d935ff9fb842 @msantos msantos committed Aug 1, 2010
Showing with 14 additions and 14 deletions.
  1. +7 −7 src/serial.erl
  2. +1 −1 src/slip.erl
  3. +6 −6 src/terminal.erl
View
@@ -49,16 +49,16 @@ loop(Pid,Port) ->
{send, Bytes} ->
send_serial(Port,[?SEND,Bytes]),
serial:loop(Pid,Port);
- {connect} ->
+ connect ->
send_serial(Port,[?CONNECT]),
serial:loop(Pid,Port);
- {disconnect} ->
+ disconnect ->
send_serial(Port,[?DISCONNECT]),
serial:loop(Pid,Port);
{open, TTY} ->
send_serial(Port,[?OPEN,TTY]),
serial:loop(Pid,Port);
- {close} ->
+ close ->
send_serial(Port,[?CLOSE]),
serial:loop(Pid,Port);
{speed, NewInSpeed, NewOutSpeed} ->
@@ -69,16 +69,16 @@ loop(Pid,Port) ->
send_serial(Port,[?SPEED,integer_to_list(NewSpeed)," ",
integer_to_list(NewSpeed),0]),
serial:loop(Pid,Port);
- {parity_odd} ->
+ parity_odd ->
send_serial(Port,[?PARITY_ODD]),
serial:loop(Pid,Port);
- {parity_even} ->
+ parity_even ->
send_serial(Port,[?PARITY_EVEN]),
serial:loop(Pid,Port);
- {break} ->
+ break ->
send_serial(Port,[?BREAK]),
serial:loop(Pid,Port);
- {flow} ->
+ flow ->
send_serial(Port,[?FLOW]),
serial:loop(Pid,Port);
stop ->
View
@@ -43,7 +43,7 @@ start(IPAddress) when is_atom(IPAddress) ->
end.
init(Dest,Who) ->
- Serial = serial:start([{speed,38400},{flow},{open,"/dev/ttya"}]),
+ Serial = serial:start([{speed,38400},flow,{open,"/dev/ttya"}]),
loop(Dest,Who,Serial).
loop(Dest,Who,Serial) ->
View
@@ -13,7 +13,7 @@
start(Speed) ->
% SerialPort = serial:start([{speed,Speed}]), % roland
- SerialPort = serial:start([{speed,Speed},{flow},{open,?DEVICE}]),
+ SerialPort = serial:start([{speed,Speed},flow,{open,?DEVICE}]),
spawn_link(terminal,tty_listner,[SerialPort]),
serial_listner().
@@ -145,14 +145,14 @@ gs_loop(Serial) ->
{gs,speed,click,_Data,[NewSpeed,_Nr]} ->
Serial ! {speed,list_to_integer(NewSpeed)};
{gs,break,click,_Data,_Opts} ->
- Serial ! {break};
+ Serial ! break;
{gs,hangup,click,_Data,_Opts} ->
- Serial ! {disconnect},
- Serial ! {connect};
+ Serial ! disconnect,
+ Serial ! connect;
{gs,disconnect,click,_Data,_Opts} ->
- Serial ! {disconnect};
+ Serial ! disconnect;
{gs,connect,click,_Data,_Opts} ->
- Serial ! {connect};
+ Serial ! connect;
{gs,open,click,_Data,_Opts} ->
Serial ! {open,?DEVICE};
{gs,exit,click,_Data,_Args} ->

0 comments on commit 3ed3a43

Please sign in to comment.