beaglebone 1.2.1 → 1.2.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ed81caba27855ff271a53a81170711ab6c9446c3
4
- data.tar.gz: ddb6cd07d587893349484831dcc1a2dc79efdf7f
3
+ metadata.gz: 68eaf4ade8ad13496f5398d406cb224abb91bdb8
4
+ data.tar.gz: ca0aac0679b26ea1307c469d552406478754c863
5
5
  SHA512:
6
- metadata.gz: 280aef13c737bd72af3ad5488c077aeb601bd32f24006d0d7f2b5c5a9b81e5a14fc17174f4082cb305f8ead8a85ee16b6716532862328eab83a2d035d443a306
7
- data.tar.gz: 491cd675da47b7edbf5ef1bd478b514f6277319e3ae6ea5c70b9b40091fd37008bd0c3b33a4d9be41c9e249c29bf1391b25f10ba46f876841123dd7ac9b9be8e
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.1 which includes Rubygems.
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. The examples directory has sample code in both formats.
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
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'beaglebone'
3
- s.version = '1.2.1'
4
- s.date = '2014-05-06'
3
+ s.version = '1.2.2'
4
+ s.date = '2014-08-01'
5
5
  s.summary = 'Beaglebone IO Gem'
6
6
  s.description = 'A Full Featured Beaglebone IO Gem'
7
7
  s.author = 'Rob Mosher'
@@ -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 },
@@ -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 (#{date}" if data < 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 = (' ' * pad) + 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.1
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-05-06 00:00:00.000000000 Z
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