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 +4 -4
- data/examples/spi_bb_ssd1306_bench.rb +1 -1
- data/lgpio.gemspec +2 -2
- data/lib/lgpio/spi_bitbang.rb +4 -0
- data/lib/lgpio/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3007d43d8623a895efdcfb2089ccc3c9105bde952af5095d904019d2df56eaaf
|
4
|
+
data.tar.gz: 8aa7f8ecf78eff10e04deb2bc5a5732b939cbbaa99f7b4f578dd8320a7634fb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 + (
|
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 = "
|
8
|
-
s.description = "Use GPIO
|
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'
|
data/lib/lgpio/spi_bitbang.rb
CHANGED
@@ -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
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.
|
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
|
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:
|
88
|
+
summary: Use Linux GPIO, I2C, SPI and PWM in Ruby
|
89
89
|
test_files: []
|