Skip to content
Browse files

set some defaults

  • Loading branch information...
1 parent af5b3d6 commit a7ba2e54e1059a1aaf679ba6beb0fc032d415f94 @nofxx committed
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/buspirate.rb
View
4 lib/buspirate.rb
@@ -10,7 +10,7 @@ class BusPirate
attr_reader :port
- def initialize(device, baudrate, databits, stopbits, parity)
+ def initialize(device, baudrate = 115200, databits = 8, stopbits = 1, parity = SerialPort::NONE)
@port = SerialPort.new(device, :baud => baudrate, :data_bits => databits, :stop_bits => stopbits, :parity => parity)
throw "failed to initialize Bus Pirate on port #{device}" if @port.nil?
end
@@ -28,8 +28,6 @@ def reset_console
@port.putc '#'
end
-
-
def exit_bitbang
@port.putc 0x0f
end

0 comments on commit a7ba2e5

Please sign in to comment.
Something went wrong with that request. Please try again.