lgpio 0.1.7 → 0.1.8

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
  SHA256:
3
- metadata.gz: 175af29acc6f0bb362dc017458e1ca9948f5d0c73ac0693f4a06b2e4e64f2842
4
- data.tar.gz: c7eebe2b025a40e98c3e7fc7574eb1f7572e7c147a88a32d7b4a9bfdb0cb0882
3
+ metadata.gz: 3007d43d8623a895efdcfb2089ccc3c9105bde952af5095d904019d2df56eaaf
4
+ data.tar.gz: 8aa7f8ecf78eff10e04deb2bc5a5732b939cbbaa99f7b4f578dd8320a7634fb7
5
5
  SHA512:
6
- metadata.gz: e3f5bfc169dfeb319fdfc06c4de1058682e9bee1f547a9eebecc1eb9ad2d50403bda912a67aef171e66b828d22740b04925b83c0e3494204c73c0b32dbbe7931
7
- data.tar.gz: f3d17767bf96c7af4631945ac0a7812628698cb483634fc0c1a45513a8ac5107bc613799be32b95b2c4b251e51a4c95c253f107691767d5351b8b1e073f5d965
6
+ metadata.gz: 93cc1be6fcafd45e98a11272f608241adc2c809f0ff6d71333a63f93453bb34fba4a75155cb973c06407b6cea281fbdd934664970077a1608718f0f218eb49cd
7
+ data.tar.gz: f94f8859d0b7c3999687263a54979472fd73df50c0a3e09319aeb908c3b4e7de1bac458d97478f0ddeba19e4fe10d061c57e9331fc6910f386101315f4d087d5
@@ -43,7 +43,7 @@ LGPIO.chip_close(chip_handle)
43
43
 
44
44
  fps = FRAME_COUNT / (finish - start)
45
45
  # Also calculate C calls per second, using roughly 20 calls per byte written.
46
- data_calls = START_ARRAY.length + ((PATTERN_1.length + PATTERN_2.length) / 2) * 20
46
+ data_calls = (START_ARRAY.length + (PATTERN_1.length + PATTERN_2.length) / 2) * 20
47
47
  # Add DC, SELECT and clock idle calls.
48
48
  total_calls = data_calls + 8
49
49
  cps = ((total_calls * fps) / 1000.0).round
data/lgpio.gemspec CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
4
4
  s.name = 'lgpio'
5
5
  s.version = LGPIO::VERSION
6
6
  s.licenses = ['MIT']
7
- s.summary = "lgpio (lg) bindings for Ruby"
8
- s.description = "Use GPIO / PWM / I2C / SPI / UART on Linux SBCs in Ruby"
7
+ s.summary = "Use Linux GPIO, I2C, SPI and PWM in Ruby"
8
+ s.description = "Use Linux GPIO, I2C, SPI and PWM in Ruby"
9
9
 
10
10
  s.authors = ["vickash"]
11
11
  s.email = 'mail@vickash.com'
@@ -16,6 +16,10 @@ module LGPIO
16
16
  initialize_pins
17
17
  end
18
18
 
19
+ def config
20
+ @config ||= { handle: handle, clock: clock, input: input, output: output }
21
+ end
22
+
19
23
  def initialize_pins
20
24
  LGPIO.gpio_claim_output(handle, LGPIO::SET_PULL_NONE, clock, LGPIO::LOW)
21
25
  LGPIO.gpio_claim_input(handle, LGPIO::SET_PULL_NONE, input) if input
data/lib/lgpio/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module LGPIO
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lgpio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - vickash
@@ -10,7 +10,7 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2024-09-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: Use GPIO / PWM / I2C / SPI / UART on Linux SBCs in Ruby
13
+ description: Use Linux GPIO, I2C, SPI and PWM in Ruby
14
14
  email: mail@vickash.com
15
15
  executables: []
16
16
  extensions:
@@ -85,5 +85,5 @@ requirements: []
85
85
  rubygems_version: 3.5.16
86
86
  signing_key:
87
87
  specification_version: 4
88
- summary: lgpio (lg) bindings for Ruby
88
+ summary: Use Linux GPIO, I2C, SPI and PWM in Ruby
89
89
  test_files: []