#!/usr/bin/ruby
# get_test.rb
=begin
- This file is part of the AVR-Crypto-Lib.
+ This file is part of the ARM-Crypto-Lib.
Copyright (C) 2008, 2009 Daniel Otte (daniel.otte@rub.de)
This program is free software: you can redistribute it and/or modify
along with this program. If not, see <http://www.gnu.org/licenses/>.
=end
+require 'rubygems'
require 'serialport'
def read_line(error_msg=true)
puts("\nPort: "+ARGV[0]+ "@"+ARGV[1]+" "+ARGV[2]+"N"+ARGV[3]+"\n");
$linewidth = 16
-$sp = SerialPort.new(ARGV[0], ARGV[1].to_i, ARGV[2].to_i, ARGV[3].to_i, SerialPort::NONE);
+$sp = SerialPort.new(ARGV[0], ARGV[1].to_i, ARGV[2].to_i, ARGV[3].to_i, SerialPort::SOFT);
$sp.read_timeout=1000; # 1 secound
$extended_wait=100;
$sp.write(command);