+ usage = "%prog [options] [<serialdevice> [<baud>]]"
+ opts = optparse.OptionParser(usage)
+ opts.add_option("-f", "--file",
+ action="store_false", dest="serial", default=True,
+ help="read from file instead of serialdevice")
+ opts.add_option("-n", "--no-adjust",
+ action="store_false", dest="adjustbaud", default=True,
+ help="don't adjust times by serial rate")
+ opts.add_option("-c", "--calibrate-read",
+ action="store_true", dest="calibrate_read", default=False,
+ help="read from serial port to calibrate it")
+ opts.add_option("-C", "--calibrate-write",
+ action="store_true", dest="calibrate_write", default=False,
+ help="write to serial port to calibrate it")
+ opts.add_option("-t", "--time",
+ type="float", dest="time", default=None,
+ help="time to write one byte on serial port (in us)")
+ options, args = opts.parse_args()