From 8abb7baabe63c7035d4ab85e1c203da46bc81cfc Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Wed, 3 Mar 2010 08:10:35 -0500 Subject: [PATCH] add command line option to set flow control mode --- tools/mc1322x-load.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/mc1322x-load.pl b/tools/mc1322x-load.pl index 2ff23fd14..2c2517dec 100755 --- a/tools/mc1322x-load.pl +++ b/tools/mc1322x-load.pl @@ -12,12 +12,14 @@ my $second = ''; my $term = '/dev/ttyUSB0'; my $baud = '115200'; my $verbose; +my $rts = 'rts'; GetOptions ('file=s' => \$filename, 'secondfile=s' => \$second, 'terminal=s' => \$term, 'verbose' => \$verbose, 'baud=s' => \$baud, + 'rts=s' => \$rts, ) or die 'bad options'; $| = 1; @@ -44,7 +46,11 @@ $ob->baudrate($baud); $ob->parity('none'); $ob->databits(8); $ob->stopbits(1); -$ob->handshake("rts"); +if($rts eq 'rts') { + $ob->handshake('rts'); +} else { + $ob->handshake('none'); +} $ob->read_const_time(1000); # 1 second per unfulfilled "read" call $ob->rts_active(1);