serialport 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,25 @@
1
+ require "../serialport.so"
2
+
3
+
4
+ if ARGV.size < 4
5
+ STDERR.print <<EOF
6
+ Usage: ruby #{$0} num_port bps nbits stopb
7
+ EOF
8
+ exit(1)
9
+ end
10
+
11
+ sp = SerialPort.new(ARGV[0].to_i, ARGV[1].to_i, ARGV[2].to_i, ARGV[3].to_i, SerialPort::NONE)
12
+
13
+ open("/dev/tty", "r+") { |tty|
14
+ tty.sync = true
15
+ Thread.new {
16
+ while true do
17
+ tty.printf("%c", sp.getc)
18
+ end
19
+ }
20
+ while (l = tty.gets) do
21
+ sp.write(l.sub("\n", "\r"))
22
+ end
23
+ }
24
+
25
+ sp.close
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: serialport
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.7.4
5
+ platform: ruby
6
+ authors:
7
+ - Guillaume Pierronnet
8
+ - Alan Stern
9
+ - Daniel E. Shipton
10
+ - Tobin Richard
11
+ autorequire:
12
+ bindir: bin
13
+ cert_chain: []
14
+
15
+ date: 2009-10-13 00:00:00 -07:00
16
+ default_executable:
17
+ dependencies: []
18
+
19
+ description: Ruby/SerialPort is a Ruby library that provides a class for using RS-232 serial ports.
20
+ email: hector@hectorparra.com
21
+ executables: []
22
+
23
+ extensions:
24
+ - extconf.rb
25
+ extra_rdoc_files:
26
+ - README
27
+ files:
28
+ - CHANGELOG
29
+ - MANIFEST
30
+ - README
31
+ - Rakefile
32
+ - VERSION
33
+ - extconf.rb
34
+ - lib/serialport.rb
35
+ - serialport.gemspec
36
+ - src/posix_serialport_impl.c
37
+ - src/serialport.c
38
+ - src/serialport.h
39
+ - src/win_serialport_impl.c
40
+ - test/miniterm.rb
41
+ has_rdoc: true
42
+ homepage: http://github.com/hparra/ruby-serialport/
43
+ licenses: []
44
+
45
+ post_install_message:
46
+ rdoc_options:
47
+ - --charset=UTF-8
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: "0"
55
+ version:
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: "0"
61
+ version:
62
+ requirements: []
63
+
64
+ rubyforge_project:
65
+ rubygems_version: 1.3.5
66
+ signing_key:
67
+ specification_version: 3
68
+ summary: Library for using RS-232 serial ports.
69
+ test_files:
70
+ - test/miniterm.rb