rpi_gpio 0.3.1 → 0.3.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.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # rpi_gpio v0.3.1
1
+ # rpi_gpio v0.3.2
2
2
 
3
3
  Ruby conversion of [RPi.GPIO Python module](https://pypi.python.org/pypi/RPi.GPIO)
4
4
 
@@ -221,6 +221,10 @@ VALUE GPIO_setup(VALUE self, VALUE channel, VALUE hash)
221
221
  const char *pud_str = NULL;
222
222
  int pud = PUD_OFF;
223
223
  int func;
224
+
225
+ VALUE initialize_val = Qnil;
226
+ const char *initialize_str = NULL;
227
+ int initialize = HIGH;
224
228
 
225
229
  // func to set up channel stored in channel variable
226
230
  int setup_one(void) {
@@ -249,6 +253,9 @@ VALUE GPIO_setup(VALUE self, VALUE channel, VALUE hash)
249
253
  }
250
254
  }
251
255
 
256
+ if (direction == OUTPUT && (initialize == LOW || initialize == HIGH)) {
257
+ output_gpio(gpio, initialize);
258
+ }
252
259
  setup_gpio(gpio, direction, pud);
253
260
  gpio_direction[gpio] = direction;
254
261
  return 1;
data/lib/rpi_gpio.so CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpi_gpio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: