beaglebone 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/beaglebone.gemspec +2 -2
- data/lib/beaglebone/beaglebone.rb +0 -1
- data/lib/beaglebone/gpio.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68eaf4ade8ad13496f5398d406cb224abb91bdb8
|
4
|
+
data.tar.gz: ca0aac0679b26ea1307c469d552406478754c863
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bc2e2a6e7e4bd32084faa96dd12a4d4fa6f7f6bcaafecaa151a824c04721d9445b24f1041069da6f6807e7fa8245116578c10f56ce635673b575428104b66bc
|
7
|
+
data.tar.gz: 3c1ca6528e16c2e8a771d6baa18e07be2d209b5f2b5e21a7be20793d506d5876f6c573b923191dbc941f1c94fb230c63c1937a74d72cfd768d2e8d581e768b81
|
data/README.md
CHANGED
@@ -51,7 +51,7 @@ The purpose of this library is to provide easy access to all of the IO features
|
|
51
51
|
|
52
52
|
## Installation
|
53
53
|
### Installing Ruby
|
54
|
-
Ruby and Rubygems are required to use this gem. To install, simply run the command below. This will install Ruby 1.9.
|
54
|
+
Ruby and Rubygems are required to use this gem. To install, simply run the command below. This will install Ruby 1.9.3 which includes Rubygems.
|
55
55
|
|
56
56
|
```
|
57
57
|
sudo apt-get install ruby
|
@@ -729,7 +729,7 @@ spi.disable
|
|
729
729
|
```
|
730
730
|
|
731
731
|
## Examples (Procedural)
|
732
|
-
This library supports _procedural_ methods as well as _object oriented_ methods. They are virtually identical to the _object oriented_ methods, except the first argument they take is the pin. If a callback is required, it is still passed first, before the pin.
|
732
|
+
This library supports _procedural_ methods as well as _object oriented_ methods. They are virtually identical to the _object oriented_ methods, except the first argument they take is the pin. If a callback is required, it is still passed first, before the pin.
|
733
733
|
|
734
734
|
The procedural versions of the examples are available in the file [procedural-examples.md](procedural-examples.md).
|
735
735
|
|
data/beaglebone.gemspec
CHANGED
@@ -88,7 +88,6 @@ module Beaglebone
|
|
88
88
|
:P9_14 => { :gpio => 50, :gpiofunc => 'gpio1_18', :muxoffset => '0x048', :pwm => 'pwm_1a', :pwm_id => 1, :pwm_mux => 6 },
|
89
89
|
:P9_15 => { :gpio => 48, :gpiofunc => 'gpio1_16', :muxoffset => '0x040' },
|
90
90
|
:P9_16 => { :gpio => 51, :gpiofunc => 'gpio1_19', :muxoffset => '0x04c', :pwm => 'pwm_1b', :pwm_id => 1, :pwm_mux => 6 },
|
91
|
-
# these gpio values for P9_17 and P9_18 are swapped due to http://bugs.elinux.org/issues/81
|
92
91
|
:P9_17 => { :gpio => 5, :gpiofunc => 'gpio0_5', :muxoffset => '0x15c', :i2c => 'i2c1_scl', :i2c_id => 1, :spi => 'spi0_cs0', :spi_id => 0 },
|
93
92
|
:P9_18 => { :gpio => 4, :gpiofunc => 'gpio0_4', :muxoffset => '0x158', :i2c => 'i2c1_sda', :i2c_id => 1, :spi => 'spi0_d1', :spi_id => 0 },
|
94
93
|
:P9_19 => { :i2c => 'i2c2_scl', :i2c_id => 2, :uart => 'uart1_rtsn', :uart_id => 1, :spi => 'spi1_cs1', :spi_id => 1 },
|
data/lib/beaglebone/gpio.rb
CHANGED
@@ -299,12 +299,12 @@ module Beaglebone #:nodoc:
|
|
299
299
|
# @example
|
300
300
|
# GPIO.shift_out(:P9_11, :P9_12, :P9_13, 255)
|
301
301
|
def shift_out(latch_pin, clock_pin, data_pin, data, lsb=nil)
|
302
|
-
raise ArgumentError, "data must be > 0 (#{
|
302
|
+
raise ArgumentError, "data must be > 0 (#{data})" if data < 0
|
303
303
|
digital_write(latch_pin, :LOW)
|
304
304
|
|
305
305
|
binary = data.to_s(2)
|
306
|
-
pad = 8 - (binary.size % 8 )
|
307
|
-
binary = (
|
306
|
+
pad = 8 - ( binary.size % 8 )
|
307
|
+
binary = ( '0' * pad ) + binary if pad.between?(1,7)
|
308
308
|
|
309
309
|
binary.reverse! if lsb
|
310
310
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaglebone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Mosher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Full Featured Beaglebone IO Gem
|
14
14
|
email: nyt-rubygems@countercultured.net
|