wiringpi-ruby 2.0.0 → 2.1.3
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/ext/wiringpi/WiringPi/devLib/ds1302.c +240 -0
- data/ext/wiringpi/WiringPi/devLib/ds1302.h +44 -0
- data/ext/wiringpi/WiringPi/devLib/font.h +2577 -0
- data/ext/wiringpi/WiringPi/devLib/gertboard.c +164 -0
- data/ext/wiringpi/WiringPi/devLib/gertboard.h +45 -0
- data/ext/wiringpi/WiringPi/devLib/lcd.c +495 -0
- data/ext/wiringpi/WiringPi/devLib/lcd.h +52 -0
- data/ext/wiringpi/WiringPi/devLib/lcd128x64.c +673 -0
- data/ext/wiringpi/WiringPi/devLib/lcd128x64.h +39 -0
- data/ext/wiringpi/WiringPi/devLib/maxdetect.c +238 -0
- data/ext/wiringpi/WiringPi/devLib/maxdetect.h +40 -0
- data/ext/wiringpi/WiringPi/devLib/piFace.c +112 -0
- data/ext/wiringpi/WiringPi/devLib/piFace.h +32 -0
- data/ext/wiringpi/WiringPi/devLib/piFaceOld.c +177 -0
- data/ext/wiringpi/WiringPi/devLib/piGlow.c +118 -0
- data/ext/wiringpi/WiringPi/devLib/piGlow.h +45 -0
- data/ext/wiringpi/WiringPi/devLib/piNes.c +113 -0
- data/ext/wiringpi/WiringPi/devLib/piNes.h +45 -0
- data/ext/wiringpi/WiringPi/devLib/scrollPhat.c +430 -0
- data/ext/wiringpi/WiringPi/devLib/scrollPhat.h +39 -0
- data/ext/wiringpi/WiringPi/devLib/scrollPhatFont.h +544 -0
- data/ext/wiringpi/WiringPi/examples/Gertboard/7segments.c +221 -0
- data/ext/wiringpi/WiringPi/examples/Gertboard/buttons.c +83 -0
- data/ext/wiringpi/WiringPi/examples/Gertboard/gertboard.c +96 -0
- data/ext/wiringpi/WiringPi/examples/Gertboard/record.c +60 -0
- data/ext/wiringpi/WiringPi/examples/Gertboard/temperature.c +78 -0
- data/ext/wiringpi/WiringPi/examples/Gertboard/voltmeter.c +73 -0
- data/ext/wiringpi/WiringPi/examples/Gertboard/vumeter.c +152 -0
- data/ext/wiringpi/WiringPi/examples/PiFace/blink.c +59 -0
- data/ext/wiringpi/WiringPi/examples/PiFace/buttons.c +103 -0
- data/ext/wiringpi/WiringPi/examples/PiFace/ladder.c +337 -0
- data/ext/wiringpi/WiringPi/examples/PiFace/metro.c +111 -0
- data/ext/wiringpi/WiringPi/examples/PiFace/motor.c +120 -0
- data/ext/wiringpi/WiringPi/examples/PiFace/reaction.c +194 -0
- data/ext/wiringpi/WiringPi/examples/PiGlow/piGlow0.c +51 -0
- data/ext/wiringpi/WiringPi/examples/PiGlow/piGlow1.c +258 -0
- data/ext/wiringpi/WiringPi/examples/PiGlow/piglow.c +176 -0
- data/ext/wiringpi/WiringPi/examples/blink-thread.c +61 -0
- data/ext/wiringpi/WiringPi/examples/blink.c +48 -0
- data/ext/wiringpi/WiringPi/examples/blink12.c +111 -0
- data/ext/wiringpi/WiringPi/examples/blink12drcs.c +125 -0
- data/ext/wiringpi/WiringPi/examples/blink6drcs.c +115 -0
- data/ext/wiringpi/WiringPi/examples/blink8-drcn.c +61 -0
- data/ext/wiringpi/WiringPi/examples/blink8.c +57 -0
- data/ext/wiringpi/WiringPi/examples/clock.c +201 -0
- data/ext/wiringpi/WiringPi/examples/delayTest.c +102 -0
- data/ext/wiringpi/WiringPi/examples/ds1302.c +238 -0
- data/ext/wiringpi/WiringPi/examples/header.h +23 -0
- data/ext/wiringpi/WiringPi/examples/isr-osc.c +118 -0
- data/ext/wiringpi/WiringPi/examples/isr.c +110 -0
- data/ext/wiringpi/WiringPi/examples/lcd-adafruit.c +347 -0
- data/ext/wiringpi/WiringPi/examples/lcd.c +286 -0
- data/ext/wiringpi/WiringPi/examples/lowPower.c +68 -0
- data/ext/wiringpi/WiringPi/examples/max31855.c +60 -0
- data/ext/wiringpi/WiringPi/examples/nes.c +67 -0
- data/ext/wiringpi/WiringPi/examples/okLed.c +82 -0
- data/ext/wiringpi/WiringPi/examples/pwm.c +58 -0
- data/ext/wiringpi/WiringPi/examples/q2w/binary.c +79 -0
- data/ext/wiringpi/WiringPi/examples/q2w/blink-io.c +61 -0
- data/ext/wiringpi/WiringPi/examples/q2w/blink.c +50 -0
- data/ext/wiringpi/WiringPi/examples/q2w/bright.c +59 -0
- data/ext/wiringpi/WiringPi/examples/q2w/button.c +63 -0
- data/ext/wiringpi/WiringPi/examples/q2w/volts.c +62 -0
- data/ext/wiringpi/WiringPi/examples/rht03.c +86 -0
- data/ext/wiringpi/WiringPi/examples/scrollPhat/scphat.c +230 -0
- data/ext/wiringpi/WiringPi/examples/scrollPhat/test.c +115 -0
- data/ext/wiringpi/WiringPi/examples/serialRead.c +48 -0
- data/ext/wiringpi/WiringPi/examples/serialTest.c +75 -0
- data/ext/wiringpi/WiringPi/examples/servo.c +57 -0
- data/ext/wiringpi/WiringPi/examples/softPwm.c +89 -0
- data/ext/wiringpi/WiringPi/examples/softTone.c +54 -0
- data/ext/wiringpi/WiringPi/examples/speed.c +95 -0
- data/ext/wiringpi/WiringPi/examples/spiSpeed.c +118 -0
- data/ext/wiringpi/WiringPi/examples/wfi.c +161 -0
- data/ext/wiringpi/WiringPi/gpio/gpio.c +1538 -0
- data/ext/wiringpi/WiringPi/gpio/readall.c +403 -0
- data/ext/wiringpi/WiringPi/version.h +3 -0
- data/ext/wiringpi/WiringPi/wiringPi/ads1115.c +293 -0
- data/ext/wiringpi/WiringPi/wiringPi/ads1115.h +55 -0
- data/ext/wiringpi/WiringPi/wiringPi/bmp180.c +237 -0
- data/ext/wiringpi/WiringPi/wiringPi/bmp180.h +34 -0
- data/ext/wiringpi/WiringPi/wiringPi/drcNet.c +405 -0
- data/ext/wiringpi/WiringPi/wiringPi/drcNet.h +42 -0
- data/ext/wiringpi/WiringPi/wiringPi/drcSerial.c +196 -0
- data/ext/wiringpi/WiringPi/wiringPi/drcSerial.h +33 -0
- data/ext/wiringpi/WiringPi/wiringPi/ds18b20.c +146 -0
- data/ext/wiringpi/WiringPi/wiringPi/ds18b20.h +34 -0
- data/ext/wiringpi/WiringPi/wiringPi/htu21d.c +150 -0
- data/ext/wiringpi/WiringPi/wiringPi/htu21d.h +34 -0
- data/ext/wiringpi/WiringPi/wiringPi/max31855.c +99 -0
- data/ext/wiringpi/WiringPi/wiringPi/max31855.h +33 -0
- data/ext/wiringpi/WiringPi/wiringPi/max5322.c +84 -0
- data/ext/wiringpi/WiringPi/wiringPi/max5322.h +33 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp23008.c +149 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp23008.h +33 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp23016.c +164 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp23016.h +33 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp23016reg.h +48 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp23017.c +195 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp23017.h +33 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp23s08.c +188 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp23s08.h +33 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp23s17.c +235 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp23s17.h +33 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp23x08.h +73 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp23x0817.h +87 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp3002.c +76 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp3002.h +33 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp3004.c +76 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp3004.h +33 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp3422.c +125 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp3422.h +43 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp4802.c +76 -0
- data/ext/wiringpi/WiringPi/wiringPi/mcp4802.h +33 -0
- data/ext/wiringpi/WiringPi/wiringPi/pcf8574.c +126 -0
- data/ext/wiringpi/WiringPi/wiringPi/pcf8574.h +33 -0
- data/ext/wiringpi/WiringPi/wiringPi/pcf8591.c +90 -0
- data/ext/wiringpi/WiringPi/wiringPi/pcf8591.h +33 -0
- data/ext/wiringpi/WiringPi/wiringPi/piHiPri.c +51 -0
- data/ext/wiringpi/WiringPi/wiringPi/piThread.c +63 -0
- data/ext/wiringpi/WiringPi/wiringPi/pseudoPins.c +95 -0
- data/ext/wiringpi/WiringPi/wiringPi/pseudoPins.h +26 -0
- data/ext/wiringpi/WiringPi/wiringPi/rht03.c +252 -0
- data/ext/wiringpi/WiringPi/wiringPi/rht03.h +25 -0
- data/ext/wiringpi/WiringPi/wiringPi/sn3218.c +75 -0
- data/ext/wiringpi/WiringPi/wiringPi/sn3218.h +33 -0
- data/ext/wiringpi/WiringPi/wiringPi/softPwm.c +186 -0
- data/ext/wiringpi/WiringPi/wiringPi/softPwm.h +35 -0
- data/ext/wiringpi/WiringPi/wiringPi/softServo.c +211 -0
- data/ext/wiringpi/WiringPi/wiringPi/softServo.h +35 -0
- data/ext/wiringpi/WiringPi/wiringPi/softTone.c +150 -0
- data/ext/wiringpi/WiringPi/wiringPi/softTone.h +39 -0
- data/ext/wiringpi/WiringPi/wiringPi/sr595.c +109 -0
- data/ext/wiringpi/WiringPi/wiringPi/sr595.h +34 -0
- data/ext/wiringpi/WiringPi/wiringPi/wiringPi.c +2507 -0
- data/ext/wiringpi/WiringPi/wiringPi/wiringPi.h +269 -0
- data/ext/wiringpi/WiringPi/wiringPi/wiringPiI2C.c +233 -0
- data/ext/wiringpi/WiringPi/wiringPi/wiringPiI2C.h +42 -0
- data/ext/wiringpi/WiringPi/wiringPi/wiringPiSPI.c +144 -0
- data/ext/wiringpi/WiringPi/wiringPi/wiringPiSPI.h +36 -0
- data/ext/wiringpi/WiringPi/wiringPi/wiringSerial.c +225 -0
- data/ext/wiringpi/WiringPi/wiringPi/wiringSerial.h +38 -0
- data/ext/wiringpi/WiringPi/wiringPi/wiringShift.c +83 -0
- data/ext/wiringpi/WiringPi/wiringPi/wiringShift.h +41 -0
- data/ext/wiringpi/WiringPi/wiringPi/wpiExtensions.c +928 -0
- data/ext/wiringpi/WiringPi/wiringPi/wpiExtensions.h +26 -0
- data/ext/wiringpi/WiringPi/wiringPiD/daemonise.c +82 -0
- data/ext/wiringpi/WiringPi/wiringPiD/daemonise.h +9 -0
- data/ext/wiringpi/WiringPi/wiringPiD/drcNetCmd.h +43 -0
- data/ext/wiringpi/WiringPi/wiringPiD/network.c +330 -0
- data/ext/wiringpi/WiringPi/wiringPiD/network.h +31 -0
- data/ext/wiringpi/WiringPi/wiringPiD/runRemote.c +126 -0
- data/ext/wiringpi/WiringPi/wiringPiD/runRemote.h +29 -0
- data/ext/wiringpi/WiringPi/wiringPiD/wiringpid.c +382 -0
- data/ext/wiringpi/wiringpi_wrap.c +636 -219
- data/lib/wiringpi.rb +25 -12
- data/lib/wiringpi/gpio.rb +90 -83
- data/lib/wiringpi/i2c.rb +29 -22
- data/lib/wiringpi/modules/mcp23017.rb +15 -0
- data/lib/wiringpi/modules/mcp23s17.rb +16 -0
- data/lib/wiringpi/scrollphat.rb +14 -14
- data/lib/wiringpi/serial.rb +8 -18
- data/lib/wiringpi/spi.rb +14 -11
- data/lib/wiringpi/watch.rb +24 -0
- metadata +160 -4
- data/lib/wiringpi/event.rb +0 -21
- data/lib/wiringpi/mcp23x17.rb +0 -31
@@ -1,6 +1,6 @@
|
|
1
1
|
/* ----------------------------------------------------------------------------
|
2
2
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
3
|
-
* Version
|
3
|
+
* Version 4.0.2
|
4
4
|
*
|
5
5
|
* This file is not intended to be easily readable and contains a number of
|
6
6
|
* coding conventions designed to improve portability and efficiency. Do not make
|
@@ -8,7 +8,11 @@
|
|
8
8
|
* interface file instead.
|
9
9
|
* ----------------------------------------------------------------------------- */
|
10
10
|
|
11
|
+
|
12
|
+
#ifndef SWIGRUBY
|
11
13
|
#define SWIGRUBY
|
14
|
+
#endif
|
15
|
+
|
12
16
|
|
13
17
|
/* -----------------------------------------------------------------------------
|
14
18
|
* This section contains generic SWIG labels for method/variable
|
@@ -77,9 +81,11 @@
|
|
77
81
|
#endif
|
78
82
|
|
79
83
|
/* exporting methods */
|
80
|
-
#if (__GNUC__
|
81
|
-
#
|
82
|
-
#
|
84
|
+
#if defined(__GNUC__)
|
85
|
+
# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
|
86
|
+
# ifndef GCC_HASCLASSVISIBILITY
|
87
|
+
# define GCC_HASCLASSVISIBILITY
|
88
|
+
# endif
|
83
89
|
# endif
|
84
90
|
#endif
|
85
91
|
|
@@ -118,6 +124,19 @@
|
|
118
124
|
# define _SCL_SECURE_NO_DEPRECATE
|
119
125
|
#endif
|
120
126
|
|
127
|
+
/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
|
128
|
+
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
|
129
|
+
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
|
130
|
+
#endif
|
131
|
+
|
132
|
+
/* Intel's compiler complains if a variable which was never initialised is
|
133
|
+
* cast to void, which is a common idiom which we use to indicate that we
|
134
|
+
* are aware a variable isn't used. So we just silence that warning.
|
135
|
+
* See: https://github.com/swig/swig/issues/192 for more discussion.
|
136
|
+
*/
|
137
|
+
#ifdef __INTEL_COMPILER
|
138
|
+
# pragma warning disable 592
|
139
|
+
#endif
|
121
140
|
|
122
141
|
/* -----------------------------------------------------------------------------
|
123
142
|
* This section contains generic SWIG labels for method/variable
|
@@ -186,9 +205,11 @@
|
|
186
205
|
#endif
|
187
206
|
|
188
207
|
/* exporting methods */
|
189
|
-
#if (__GNUC__
|
190
|
-
#
|
191
|
-
#
|
208
|
+
#if defined(__GNUC__)
|
209
|
+
# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
|
210
|
+
# ifndef GCC_HASCLASSVISIBILITY
|
211
|
+
# define GCC_HASCLASSVISIBILITY
|
212
|
+
# endif
|
192
213
|
# endif
|
193
214
|
#endif
|
194
215
|
|
@@ -227,6 +248,19 @@
|
|
227
248
|
# define _SCL_SECURE_NO_DEPRECATE
|
228
249
|
#endif
|
229
250
|
|
251
|
+
/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
|
252
|
+
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
|
253
|
+
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
|
254
|
+
#endif
|
255
|
+
|
256
|
+
/* Intel's compiler complains if a variable which was never initialised is
|
257
|
+
* cast to void, which is a common idiom which we use to indicate that we
|
258
|
+
* are aware a variable isn't used. So we just silence that warning.
|
259
|
+
* See: https://github.com/swig/swig/issues/192 for more discussion.
|
260
|
+
*/
|
261
|
+
#ifdef __INTEL_COMPILER
|
262
|
+
# pragma warning disable 592
|
263
|
+
#endif
|
230
264
|
|
231
265
|
/* -----------------------------------------------------------------------------
|
232
266
|
* swigrun.swg
|
@@ -273,6 +307,7 @@
|
|
273
307
|
/* Flags for pointer conversions */
|
274
308
|
#define SWIG_POINTER_DISOWN 0x1
|
275
309
|
#define SWIG_CAST_NEW_MEMORY 0x2
|
310
|
+
#define SWIG_POINTER_NO_NULL 0x4
|
276
311
|
|
277
312
|
/* Flags for new pointer objects */
|
278
313
|
#define SWIG_POINTER_OWN 0x1
|
@@ -725,16 +760,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|
725
760
|
char d = *(c++);
|
726
761
|
unsigned char uu;
|
727
762
|
if ((d >= '0') && (d <= '9'))
|
728
|
-
uu = ((d - '0') << 4);
|
763
|
+
uu = (unsigned char)((d - '0') << 4);
|
729
764
|
else if ((d >= 'a') && (d <= 'f'))
|
730
|
-
uu = ((d - ('a'-10)) << 4);
|
765
|
+
uu = (unsigned char)((d - ('a'-10)) << 4);
|
731
766
|
else
|
732
767
|
return (char *) 0;
|
733
768
|
d = *(c++);
|
734
769
|
if ((d >= '0') && (d <= '9'))
|
735
|
-
uu |= (d - '0');
|
770
|
+
uu |= (unsigned char)(d - '0');
|
736
771
|
else if ((d >= 'a') && (d <= 'f'))
|
737
|
-
uu |= (d - ('a'-10));
|
772
|
+
uu |= (unsigned char)(d - ('a'-10));
|
738
773
|
else
|
739
774
|
return (char *) 0;
|
740
775
|
*u = uu;
|
@@ -911,42 +946,53 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
911
946
|
#ifndef RSTRUCT_PTR
|
912
947
|
# define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
|
913
948
|
#endif
|
949
|
+
#ifndef RTYPEDDATA_P
|
950
|
+
# define RTYPEDDATA_P(x) (TYPE(x) != T_DATA)
|
951
|
+
#endif
|
914
952
|
|
915
953
|
|
916
954
|
|
917
955
|
/*
|
918
|
-
*
|
919
|
-
*
|
956
|
+
* The following macros are used for providing the correct type of a
|
957
|
+
* function pointer to the Ruby C API.
|
958
|
+
* Starting with Ruby 2.7 (corresponding to RB_METHOD_DEFINITION_DECL being
|
959
|
+
* defined) these macros act transparently due to Ruby's moving away from
|
960
|
+
* ANYARGS and instead employing strict function signatures.
|
961
|
+
*
|
962
|
+
* Note: In case of C (not C++) the macros are transparent even before
|
963
|
+
* Ruby 2.7 due to the fact that the Ruby C API used function declarators
|
964
|
+
* with empty parentheses, which allows for an unspecified number of
|
965
|
+
* arguments.
|
920
966
|
*
|
921
|
-
*
|
922
|
-
*
|
923
|
-
* like rb_define_method() and rb_define_singleton_method().
|
967
|
+
* PROTECTFUNC(f) is used for the function pointer argument of the Ruby
|
968
|
+
* C API function rb_protect().
|
924
969
|
*
|
925
|
-
*
|
926
|
-
*
|
927
|
-
*
|
970
|
+
* VALUEFUNC(f) is used for the function pointer argument(s) of Ruby C API
|
971
|
+
* functions like rb_define_method() and rb_define_singleton_method().
|
972
|
+
*
|
973
|
+
* VOIDFUNC(f) is used to typecast a C function that implements either
|
974
|
+
* the "mark" or "free" stuff for a Ruby Data object, so that it can be
|
975
|
+
* passed as an argument to Ruby C API functions like Data_Wrap_Struct()
|
928
976
|
* and Data_Make_Struct().
|
977
|
+
*
|
978
|
+
* SWIG_RUBY_VOID_ANYARGS_FUNC(f) is used for the function pointer
|
979
|
+
* argument(s) of Ruby C API functions like rb_define_virtual_variable().
|
980
|
+
*
|
981
|
+
* SWIG_RUBY_INT_ANYARGS_FUNC(f) is used for the function pointer
|
982
|
+
* argument(s) of Ruby C API functions like st_foreach().
|
929
983
|
*/
|
930
|
-
|
931
|
-
#
|
932
|
-
#
|
933
|
-
#
|
934
|
-
#
|
935
|
-
#
|
936
|
-
# else
|
937
|
-
# ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
|
938
|
-
# define PROTECTFUNC(f) ((VALUE (*)()) f)
|
939
|
-
# define VALUEFUNC(f) ((VALUE (*)()) f)
|
940
|
-
# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
|
941
|
-
# else /* These definitions should work for Ruby 1.7+ */
|
942
|
-
# define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
|
943
|
-
# define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
|
944
|
-
# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
|
945
|
-
# endif
|
946
|
-
# endif
|
984
|
+
#if defined(__cplusplus) && !defined(RB_METHOD_DEFINITION_DECL)
|
985
|
+
# define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
|
986
|
+
# define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
|
987
|
+
# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
|
988
|
+
# define SWIG_RUBY_VOID_ANYARGS_FUNC(f) ((void (*)(ANYARGS))(f))
|
989
|
+
# define SWIG_RUBY_INT_ANYARGS_FUNC(f) ((int (*)(ANYARGS))(f))
|
947
990
|
#else
|
991
|
+
# define PROTECTFUNC(f) (f)
|
948
992
|
# define VALUEFUNC(f) (f)
|
949
993
|
# define VOIDFUNC(f) (f)
|
994
|
+
# define SWIG_RUBY_VOID_ANYARGS_FUNC(f) (f)
|
995
|
+
# define SWIG_RUBY_INT_ANYARGS_FUNC(f) (f)
|
950
996
|
#endif
|
951
997
|
|
952
998
|
/* Don't use for expressions have side effect */
|
@@ -1134,7 +1180,7 @@ void Ruby_Format_OverloadedError(
|
|
1134
1180
|
/* -----------------------------------------------------------------------------
|
1135
1181
|
* rubytracking.swg
|
1136
1182
|
*
|
1137
|
-
* This file contains support for tracking mappings from
|
1183
|
+
* This file contains support for tracking mappings from
|
1138
1184
|
* Ruby objects to C++ objects. This functionality is needed
|
1139
1185
|
* to implement mark functions for Ruby's mark and sweep
|
1140
1186
|
* garbage collector.
|
@@ -1144,6 +1190,11 @@ void Ruby_Format_OverloadedError(
|
|
1144
1190
|
extern "C" {
|
1145
1191
|
#endif
|
1146
1192
|
|
1193
|
+
#if !defined(ST_DATA_T_DEFINED)
|
1194
|
+
/* Needs to be explicitly included for Ruby 1.8 and earlier */
|
1195
|
+
#include <st.h>
|
1196
|
+
#endif
|
1197
|
+
|
1147
1198
|
/* Ruby 1.8 actually assumes the first case. */
|
1148
1199
|
#if SIZEOF_VOIDP == SIZEOF_LONG
|
1149
1200
|
# define SWIG2NUM(v) LONG2NUM((unsigned long)v)
|
@@ -1155,109 +1206,69 @@ extern "C" {
|
|
1155
1206
|
# error sizeof(void*) is not the same as long or long long
|
1156
1207
|
#endif
|
1157
1208
|
|
1158
|
-
|
1159
|
-
|
1160
|
-
structs to Ruby Objects.
|
1209
|
+
/* Global hash table to store Trackings from C/C++
|
1210
|
+
structs to Ruby Objects.
|
1161
1211
|
*/
|
1162
|
-
static
|
1212
|
+
static st_table* swig_ruby_trackings = NULL;
|
1213
|
+
|
1214
|
+
static VALUE swig_ruby_trackings_count(ID id, VALUE *var) {
|
1215
|
+
return SWIG2NUM(swig_ruby_trackings->num_entries);
|
1216
|
+
}
|
1163
1217
|
|
1164
|
-
/* Global variable that stores a reference to the ruby
|
1165
|
-
hash table delete function. */
|
1166
|
-
static ID swig_ruby_hash_delete;
|
1167
1218
|
|
1168
|
-
/* Setup a
|
1219
|
+
/* Setup a hash table to store Trackings */
|
1169
1220
|
SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
|
1170
|
-
/* Create a
|
1221
|
+
/* Create a hash table to store Trackings from C++
|
1171
1222
|
objects to Ruby objects. */
|
1172
1223
|
|
1173
|
-
/* Try to see if some other .so has already created a
|
1224
|
+
/* Try to see if some other .so has already created a
|
1174
1225
|
tracking hash table, which we keep hidden in an instance var
|
1175
1226
|
in the SWIG module.
|
1176
1227
|
This is done to allow multiple DSOs to share the same
|
1177
1228
|
tracking table.
|
1178
1229
|
*/
|
1179
|
-
|
1230
|
+
VALUE trackings_value = Qnil;
|
1231
|
+
/* change the variable name so that we can mix modules
|
1232
|
+
compiled with older SWIG's - this used to be called "@__trackings__" */
|
1233
|
+
ID trackings_id = rb_intern( "@__safetrackings__" );
|
1180
1234
|
VALUE verbose = rb_gv_get("VERBOSE");
|
1181
1235
|
rb_gv_set("VERBOSE", Qfalse);
|
1182
|
-
|
1236
|
+
trackings_value = rb_ivar_get( _mSWIG, trackings_id );
|
1183
1237
|
rb_gv_set("VERBOSE", verbose);
|
1184
1238
|
|
1185
|
-
/*
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
}
|
1196
|
-
|
1197
|
-
/* Get a Ruby number to reference a pointer */
|
1198
|
-
SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
|
1199
|
-
/* We cast the pointer to an unsigned long
|
1200
|
-
and then store a reference to it using
|
1201
|
-
a Ruby number object. */
|
1202
|
-
|
1203
|
-
/* Convert the pointer to a Ruby number */
|
1204
|
-
return SWIG2NUM(ptr);
|
1205
|
-
}
|
1206
|
-
|
1207
|
-
/* Get a Ruby number to reference an object */
|
1208
|
-
SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
|
1209
|
-
/* We cast the object to an unsigned long
|
1210
|
-
and then store a reference to it using
|
1211
|
-
a Ruby number object. */
|
1212
|
-
|
1213
|
-
/* Convert the Object to a Ruby number */
|
1214
|
-
return SWIG2NUM(object);
|
1215
|
-
}
|
1216
|
-
|
1217
|
-
/* Get a Ruby object from a previously stored reference */
|
1218
|
-
SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
|
1219
|
-
/* The provided Ruby number object is a reference
|
1220
|
-
to the Ruby object we want.*/
|
1239
|
+
/* The trick here is that we have to store the hash table
|
1240
|
+
pointer in a Ruby variable. We do not want Ruby's GC to
|
1241
|
+
treat this pointer as a Ruby object, so we convert it to
|
1242
|
+
a Ruby numeric value. */
|
1243
|
+
if (trackings_value == Qnil) {
|
1244
|
+
/* No, it hasn't. Create one ourselves */
|
1245
|
+
swig_ruby_trackings = st_init_numtable();
|
1246
|
+
rb_ivar_set( _mSWIG, trackings_id, SWIG2NUM(swig_ruby_trackings) );
|
1247
|
+
} else {
|
1248
|
+
swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value);
|
1249
|
+
}
|
1221
1250
|
|
1222
|
-
|
1223
|
-
|
1251
|
+
rb_define_virtual_variable("SWIG_TRACKINGS_COUNT",
|
1252
|
+
VALUEFUNC(swig_ruby_trackings_count),
|
1253
|
+
SWIG_RUBY_VOID_ANYARGS_FUNC((rb_gvar_setter_t*)NULL));
|
1224
1254
|
}
|
1225
1255
|
|
1226
1256
|
/* Add a Tracking from a C/C++ struct to a Ruby object */
|
1227
1257
|
SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
|
1228
|
-
/* In a Ruby hash table we store the pointer and
|
1229
|
-
the associated Ruby object. The trick here is
|
1230
|
-
that we cannot store the Ruby object directly - if
|
1231
|
-
we do then it cannot be garbage collected. So
|
1232
|
-
instead we typecast it as a unsigned long and
|
1233
|
-
convert it to a Ruby number object.*/
|
1234
|
-
|
1235
|
-
/* Get a reference to the pointer as a Ruby number */
|
1236
|
-
VALUE key = SWIG_RubyPtrToReference(ptr);
|
1237
|
-
|
1238
|
-
/* Get a reference to the Ruby object as a Ruby number */
|
1239
|
-
VALUE value = SWIG_RubyObjectToReference(object);
|
1240
|
-
|
1241
1258
|
/* Store the mapping to the global hash table. */
|
1242
|
-
|
1259
|
+
st_insert(swig_ruby_trackings, (st_data_t)ptr, object);
|
1243
1260
|
}
|
1244
1261
|
|
1245
1262
|
/* Get the Ruby object that owns the specified C/C++ struct */
|
1246
1263
|
SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
|
1247
|
-
/* Get a reference to the pointer as a Ruby number */
|
1248
|
-
VALUE key = SWIG_RubyPtrToReference(ptr);
|
1249
|
-
|
1250
1264
|
/* Now lookup the value stored in the global hash table */
|
1251
|
-
VALUE value
|
1252
|
-
|
1253
|
-
if (
|
1254
|
-
|
1265
|
+
VALUE value;
|
1266
|
+
|
1267
|
+
if (st_lookup(swig_ruby_trackings, (st_data_t)ptr, &value)) {
|
1268
|
+
return value;
|
1269
|
+
} else {
|
1255
1270
|
return Qnil;
|
1256
1271
|
}
|
1257
|
-
else {
|
1258
|
-
/* Convert this value to Ruby object */
|
1259
|
-
return SWIG_RubyReferenceToObject(value);
|
1260
|
-
}
|
1261
1272
|
}
|
1262
1273
|
|
1263
1274
|
/* Remove a Tracking from a C/C++ struct to a Ruby object. It
|
@@ -1265,25 +1276,39 @@ SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
|
|
1265
1276
|
since the same memory address may be reused later to create
|
1266
1277
|
a new object. */
|
1267
1278
|
SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
|
1268
|
-
/*
|
1269
|
-
|
1270
|
-
|
1271
|
-
/* Delete the object from the hash table by calling Ruby's
|
1272
|
-
do this we need to call the Hash.delete method.*/
|
1273
|
-
rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
|
1279
|
+
/* Delete the object from the hash table */
|
1280
|
+
st_delete(swig_ruby_trackings, (st_data_t *)&ptr, NULL);
|
1274
1281
|
}
|
1275
1282
|
|
1276
1283
|
/* This is a helper method that unlinks a Ruby object from its
|
1277
1284
|
underlying C++ object. This is needed if the lifetime of the
|
1278
|
-
Ruby object is longer than the C++ object */
|
1285
|
+
Ruby object is longer than the C++ object. */
|
1279
1286
|
SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
|
1280
1287
|
VALUE object = SWIG_RubyInstanceFor(ptr);
|
1281
1288
|
|
1282
1289
|
if (object != Qnil) {
|
1290
|
+
// object might have the T_ZOMBIE type, but that's just
|
1291
|
+
// because the GC has flagged it as such for a deferred
|
1292
|
+
// destruction. Until then, it's still a T_DATA object.
|
1283
1293
|
DATA_PTR(object) = 0;
|
1284
1294
|
}
|
1285
1295
|
}
|
1286
1296
|
|
1297
|
+
/* This is a helper method that iterates over all the trackings
|
1298
|
+
passing the C++ object pointer and its related Ruby object
|
1299
|
+
to the passed callback function. */
|
1300
|
+
|
1301
|
+
/* Proxy method to abstract the internal trackings datatype */
|
1302
|
+
static int swig_ruby_internal_iterate_callback(st_data_t ptr, st_data_t obj, st_data_t meth) {
|
1303
|
+
((void (*) (void *, VALUE))meth)((void *)ptr, (VALUE)obj);
|
1304
|
+
return ST_CONTINUE;
|
1305
|
+
}
|
1306
|
+
|
1307
|
+
SWIGRUNTIME void SWIG_RubyIterateTrackings( void(*meth)(void* ptr, VALUE obj) ) {
|
1308
|
+
st_foreach(swig_ruby_trackings,
|
1309
|
+
SWIG_RUBY_INT_ANYARGS_FUNC(swig_ruby_internal_iterate_callback),
|
1310
|
+
(st_data_t)meth);
|
1311
|
+
}
|
1287
1312
|
|
1288
1313
|
#ifdef __cplusplus
|
1289
1314
|
}
|
@@ -1342,7 +1367,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
|
|
1342
1367
|
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
|
1343
1368
|
#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags)
|
1344
1369
|
#define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own)
|
1345
|
-
#define swig_owntype
|
1370
|
+
#define swig_owntype swig_ruby_owntype
|
1346
1371
|
|
1347
1372
|
/* for raw packed data */
|
1348
1373
|
#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
|
@@ -1499,10 +1524,11 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
|
1499
1524
|
swig_class *sklass;
|
1500
1525
|
VALUE klass;
|
1501
1526
|
VALUE obj;
|
1502
|
-
|
1527
|
+
|
1503
1528
|
if (!ptr)
|
1504
1529
|
return Qnil;
|
1505
|
-
|
1530
|
+
|
1531
|
+
assert(type);
|
1506
1532
|
if (type->clientdata) {
|
1507
1533
|
sklass = (swig_class *) type->clientdata;
|
1508
1534
|
|
@@ -1510,7 +1536,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
|
1510
1536
|
track = sklass->trackObjects;
|
1511
1537
|
if (track) {
|
1512
1538
|
obj = SWIG_RubyInstanceFor(ptr);
|
1513
|
-
|
1539
|
+
|
1514
1540
|
/* Check the object's type and make sure it has the correct type.
|
1515
1541
|
It might not in cases where methods do things like
|
1516
1542
|
downcast methods. */
|
@@ -1542,7 +1568,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
|
1542
1568
|
obj = Data_Wrap_Struct(klass, 0, 0, ptr);
|
1543
1569
|
}
|
1544
1570
|
rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
|
1545
|
-
|
1571
|
+
|
1546
1572
|
return obj;
|
1547
1573
|
}
|
1548
1574
|
|
@@ -1562,26 +1588,30 @@ SWIGRUNTIMEINLINE char *
|
|
1562
1588
|
SWIG_Ruby_MangleStr(VALUE obj)
|
1563
1589
|
{
|
1564
1590
|
VALUE stype = rb_iv_get(obj, "@__swigtype__");
|
1591
|
+
if (NIL_P(stype))
|
1592
|
+
return NULL;
|
1565
1593
|
return StringValuePtr(stype);
|
1566
1594
|
}
|
1567
1595
|
|
1568
1596
|
/* Acquire a pointer value */
|
1569
|
-
typedef
|
1570
|
-
|
1571
|
-
|
1572
|
-
|
1573
|
-
|
1574
|
-
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1597
|
+
typedef struct {
|
1598
|
+
void (*datafree)(void *);
|
1599
|
+
int own;
|
1600
|
+
} swig_ruby_owntype;
|
1601
|
+
|
1602
|
+
SWIGRUNTIME swig_ruby_owntype
|
1603
|
+
SWIG_Ruby_AcquirePtr(VALUE obj, swig_ruby_owntype own) {
|
1604
|
+
swig_ruby_owntype oldown = {0, 0};
|
1605
|
+
if (TYPE(obj) == T_DATA && !RTYPEDDATA_P(obj)) {
|
1606
|
+
oldown.datafree = RDATA(obj)->dfree;
|
1607
|
+
RDATA(obj)->dfree = own.datafree;
|
1579
1608
|
}
|
1609
|
+
return oldown;
|
1580
1610
|
}
|
1581
1611
|
|
1582
1612
|
/* Convert a pointer value */
|
1583
1613
|
SWIGRUNTIME int
|
1584
|
-
SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
1614
|
+
SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, swig_ruby_owntype *own)
|
1585
1615
|
{
|
1586
1616
|
char *c;
|
1587
1617
|
swig_cast_info *tc;
|
@@ -1589,16 +1619,20 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
|
1589
1619
|
|
1590
1620
|
/* Grab the pointer */
|
1591
1621
|
if (NIL_P(obj)) {
|
1592
|
-
|
1593
|
-
|
1622
|
+
if (ptr)
|
1623
|
+
*ptr = 0;
|
1624
|
+
return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
|
1594
1625
|
} else {
|
1595
|
-
if (TYPE(obj) != T_DATA) {
|
1626
|
+
if (TYPE(obj) != T_DATA || (TYPE(obj) == T_DATA && RTYPEDDATA_P(obj))) {
|
1596
1627
|
return SWIG_ERROR;
|
1597
1628
|
}
|
1598
1629
|
Data_Get_Struct(obj, void, vptr);
|
1599
1630
|
}
|
1600
1631
|
|
1601
|
-
if (own)
|
1632
|
+
if (own) {
|
1633
|
+
own->datafree = RDATA(obj)->dfree;
|
1634
|
+
own->own = 0;
|
1635
|
+
}
|
1602
1636
|
|
1603
1637
|
/* Check to see if the input object is giving up ownership
|
1604
1638
|
of the underlying C struct or C++ object. If so then we
|
@@ -1633,8 +1667,6 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
|
1633
1667
|
/* The object has already been deleted */
|
1634
1668
|
return SWIG_ObjectPreviouslyDeletedError;
|
1635
1669
|
}
|
1636
|
-
*ptr = vptr;
|
1637
|
-
return SWIG_OK;
|
1638
1670
|
}
|
1639
1671
|
}
|
1640
1672
|
if ((c = SWIG_MangleStr(obj)) == NULL) {
|
@@ -1644,12 +1676,23 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
|
|
1644
1676
|
if (!tc) {
|
1645
1677
|
return SWIG_ERROR;
|
1646
1678
|
} else {
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1679
|
+
if (ptr) {
|
1680
|
+
if (tc->type == ty) {
|
1681
|
+
*ptr = vptr;
|
1682
|
+
} else {
|
1683
|
+
int newmemory = 0;
|
1684
|
+
*ptr = SWIG_TypeCast(tc, vptr, &newmemory);
|
1685
|
+
if (newmemory == SWIG_CAST_NEW_MEMORY) {
|
1686
|
+
assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
|
1687
|
+
if (own)
|
1688
|
+
own->own = own->own | SWIG_CAST_NEW_MEMORY;
|
1689
|
+
}
|
1690
|
+
}
|
1691
|
+
}
|
1650
1692
|
}
|
1651
1693
|
} else {
|
1652
|
-
|
1694
|
+
if (ptr)
|
1695
|
+
*ptr = vptr;
|
1653
1696
|
}
|
1654
1697
|
|
1655
1698
|
return SWIG_OK;
|
@@ -1675,7 +1718,7 @@ SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
|
|
1675
1718
|
return rb_str_new2(result);
|
1676
1719
|
}
|
1677
1720
|
|
1678
|
-
/* Convert a packed
|
1721
|
+
/* Convert a packed pointer value */
|
1679
1722
|
SWIGRUNTIME int
|
1680
1723
|
SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
|
1681
1724
|
swig_cast_info *tc;
|
@@ -1798,7 +1841,7 @@ static VALUE mWiringpi;
|
|
1798
1841
|
#define SWIG_RUBY_THREAD_END_BLOCK
|
1799
1842
|
|
1800
1843
|
|
1801
|
-
#define SWIGVERSION
|
1844
|
+
#define SWIGVERSION 0x040002
|
1802
1845
|
#define SWIG_VERSION SWIGVERSION
|
1803
1846
|
|
1804
1847
|
|
@@ -1834,6 +1877,13 @@ static VALUE mWiringpi;
|
|
1834
1877
|
#include "WiringPi/wiringPi/softServo.h"
|
1835
1878
|
#include "WiringPi/wiringPi/softTone.h"
|
1836
1879
|
#include "WiringPi/wiringPi/sr595.h"
|
1880
|
+
#include "WiringPi/wiringPi/bmp180.h"
|
1881
|
+
#include "WiringPi/wiringPi/drcNet.h"
|
1882
|
+
#include "WiringPi/wiringPi/ds18b20.h"
|
1883
|
+
#include "WiringPi/wiringPi/htu21d.h"
|
1884
|
+
#include "WiringPi/wiringPi/pseudoPins.h"
|
1885
|
+
#include "WiringPi/wiringPi/rht03.h"
|
1886
|
+
#include "WiringPi/wiringPi/wpiExtensions.h"
|
1837
1887
|
#include "WiringPi/devLib/ds1302.h"
|
1838
1888
|
#include "WiringPi/devLib/font.h"
|
1839
1889
|
#include "WiringPi/devLib/gertboard.h"
|
@@ -1843,6 +1893,7 @@ static VALUE mWiringpi;
|
|
1843
1893
|
#include "WiringPi/devLib/piGlow.h"
|
1844
1894
|
#include "WiringPi/devLib/piNes.h"
|
1845
1895
|
#include "WiringPi/devLib/scrollPhat.h"
|
1896
|
+
#include "WiringPi/devLib/piFace.h"
|
1846
1897
|
|
1847
1898
|
|
1848
1899
|
#include <limits.h>
|
@@ -1856,15 +1907,16 @@ static VALUE mWiringpi;
|
|
1856
1907
|
|
1857
1908
|
|
1858
1909
|
SWIGINTERN VALUE
|
1859
|
-
SWIG_ruby_failed(
|
1910
|
+
SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2))
|
1860
1911
|
{
|
1861
1912
|
return Qnil;
|
1862
1913
|
}
|
1863
1914
|
|
1864
1915
|
|
1865
|
-
/*@SWIG:/usr/share/
|
1866
|
-
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE
|
1916
|
+
/*@SWIG:/usr/local/Cellar/swig/4.0.2/share/swig/4.0.2/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
1917
|
+
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg)
|
1867
1918
|
{
|
1919
|
+
VALUE *args = (VALUE *)arg;
|
1868
1920
|
VALUE obj = args[0];
|
1869
1921
|
VALUE type = TYPE(obj);
|
1870
1922
|
long *res = (long *)(args[1]);
|
@@ -1882,7 +1934,7 @@ SWIG_AsVal_long (VALUE obj, long* val)
|
|
1882
1934
|
VALUE a[2];
|
1883
1935
|
a[0] = obj;
|
1884
1936
|
a[1] = (VALUE)(&v);
|
1885
|
-
if (rb_rescue(
|
1937
|
+
if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
|
1886
1938
|
if (val) *val = v;
|
1887
1939
|
return SWIG_OK;
|
1888
1940
|
}
|
@@ -1929,7 +1981,7 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
|
|
1929
1981
|
if (cptr) {
|
1930
1982
|
if (alloc) {
|
1931
1983
|
if (*alloc == SWIG_NEWOBJ) {
|
1932
|
-
*cptr = (char *)memcpy(
|
1984
|
+
*cptr = (char *)memcpy(malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
|
1933
1985
|
} else {
|
1934
1986
|
*cptr = cstr;
|
1935
1987
|
*alloc = SWIG_OLDOBJ;
|
@@ -1967,23 +2019,10 @@ SWIG_From_int (int value)
|
|
1967
2019
|
}
|
1968
2020
|
|
1969
2021
|
|
1970
|
-
|
1971
|
-
|
1972
|
-
{
|
1973
|
-
return ULONG2NUM(value);
|
1974
|
-
}
|
1975
|
-
|
1976
|
-
|
1977
|
-
SWIGINTERNINLINE VALUE
|
1978
|
-
SWIG_From_unsigned_SS_int (unsigned int value)
|
1979
|
-
{
|
1980
|
-
return SWIG_From_unsigned_SS_long (value);
|
1981
|
-
}
|
1982
|
-
|
1983
|
-
|
1984
|
-
/*@SWIG:/usr/share/swig3.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
1985
|
-
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
|
2022
|
+
/*@SWIG:/usr/local/Cellar/swig/4.0.2/share/swig/4.0.2/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2023
|
+
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE arg)
|
1986
2024
|
{
|
2025
|
+
VALUE *args = (VALUE *)arg;
|
1987
2026
|
VALUE obj = args[0];
|
1988
2027
|
VALUE type = TYPE(obj);
|
1989
2028
|
unsigned long *res = (unsigned long *)(args[1]);
|
@@ -2001,7 +2040,7 @@ SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
|
|
2001
2040
|
VALUE a[2];
|
2002
2041
|
a[0] = obj;
|
2003
2042
|
a[1] = (VALUE)(&v);
|
2004
|
-
if (rb_rescue(
|
2043
|
+
if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
|
2005
2044
|
if (val) *val = v;
|
2006
2045
|
return SWIG_OK;
|
2007
2046
|
}
|
@@ -2026,6 +2065,20 @@ SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val)
|
|
2026
2065
|
}
|
2027
2066
|
|
2028
2067
|
|
2068
|
+
SWIGINTERNINLINE VALUE
|
2069
|
+
SWIG_From_unsigned_SS_long (unsigned long value)
|
2070
|
+
{
|
2071
|
+
return ULONG2NUM(value);
|
2072
|
+
}
|
2073
|
+
|
2074
|
+
|
2075
|
+
SWIGINTERNINLINE VALUE
|
2076
|
+
SWIG_From_unsigned_SS_int (unsigned int value)
|
2077
|
+
{
|
2078
|
+
return SWIG_From_unsigned_SS_long (value);
|
2079
|
+
}
|
2080
|
+
|
2081
|
+
|
2029
2082
|
SWIGINTERN int
|
2030
2083
|
SWIG_AsVal_unsigned_SS_char (VALUE obj, unsigned char *val)
|
2031
2084
|
{
|
@@ -2140,6 +2193,35 @@ fail:
|
|
2140
2193
|
}
|
2141
2194
|
|
2142
2195
|
|
2196
|
+
SWIGINTERN VALUE
|
2197
|
+
_wrap_wiringPiVersion(int argc, VALUE *argv, VALUE self) {
|
2198
|
+
int *arg1 = (int *) 0 ;
|
2199
|
+
int *arg2 = (int *) 0 ;
|
2200
|
+
void *argp1 = 0 ;
|
2201
|
+
int res1 = 0 ;
|
2202
|
+
void *argp2 = 0 ;
|
2203
|
+
int res2 = 0 ;
|
2204
|
+
|
2205
|
+
if ((argc < 2) || (argc > 2)) {
|
2206
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
2207
|
+
}
|
2208
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_int, 0 | 0 );
|
2209
|
+
if (!SWIG_IsOK(res1)) {
|
2210
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "int *","wiringPiVersion", 1, argv[0] ));
|
2211
|
+
}
|
2212
|
+
arg1 = (int *)(argp1);
|
2213
|
+
res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_int, 0 | 0 );
|
2214
|
+
if (!SWIG_IsOK(res2)) {
|
2215
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "int *","wiringPiVersion", 2, argv[1] ));
|
2216
|
+
}
|
2217
|
+
arg2 = (int *)(argp2);
|
2218
|
+
wiringPiVersion(arg1,arg2);
|
2219
|
+
return Qnil;
|
2220
|
+
fail:
|
2221
|
+
return Qnil;
|
2222
|
+
}
|
2223
|
+
|
2224
|
+
|
2143
2225
|
SWIGINTERN VALUE
|
2144
2226
|
_wrap_wiringPiSetup(int argc, VALUE *argv, VALUE self) {
|
2145
2227
|
int result;
|
@@ -2426,6 +2508,22 @@ fail:
|
|
2426
2508
|
}
|
2427
2509
|
|
2428
2510
|
|
2511
|
+
SWIGINTERN VALUE
|
2512
|
+
_wrap_piGpioLayout(int argc, VALUE *argv, VALUE self) {
|
2513
|
+
int result;
|
2514
|
+
VALUE vresult = Qnil;
|
2515
|
+
|
2516
|
+
if ((argc < 0) || (argc > 0)) {
|
2517
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2518
|
+
}
|
2519
|
+
result = (int)piGpioLayout();
|
2520
|
+
vresult = SWIG_From_int((int)(result));
|
2521
|
+
return vresult;
|
2522
|
+
fail:
|
2523
|
+
return Qnil;
|
2524
|
+
}
|
2525
|
+
|
2526
|
+
|
2429
2527
|
SWIGINTERN VALUE
|
2430
2528
|
_wrap_piBoardRev(int argc, VALUE *argv, VALUE self) {
|
2431
2529
|
int result;
|
@@ -2625,43 +2723,6 @@ fail:
|
|
2625
2723
|
}
|
2626
2724
|
|
2627
2725
|
|
2628
|
-
SWIGINTERN VALUE
|
2629
|
-
_wrap_digitalWriteByte(int argc, VALUE *argv, VALUE self) {
|
2630
|
-
int arg1 ;
|
2631
|
-
int val1 ;
|
2632
|
-
int ecode1 = 0 ;
|
2633
|
-
|
2634
|
-
if ((argc < 1) || (argc > 1)) {
|
2635
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2636
|
-
}
|
2637
|
-
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
2638
|
-
if (!SWIG_IsOK(ecode1)) {
|
2639
|
-
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","digitalWriteByte", 1, argv[0] ));
|
2640
|
-
}
|
2641
|
-
arg1 = (int)(val1);
|
2642
|
-
digitalWriteByte(arg1);
|
2643
|
-
return Qnil;
|
2644
|
-
fail:
|
2645
|
-
return Qnil;
|
2646
|
-
}
|
2647
|
-
|
2648
|
-
|
2649
|
-
SWIGINTERN VALUE
|
2650
|
-
_wrap_digitalReadByte(int argc, VALUE *argv, VALUE self) {
|
2651
|
-
unsigned int result;
|
2652
|
-
VALUE vresult = Qnil;
|
2653
|
-
|
2654
|
-
if ((argc < 0) || (argc > 0)) {
|
2655
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2656
|
-
}
|
2657
|
-
result = (unsigned int)digitalReadByte();
|
2658
|
-
vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
|
2659
|
-
return vresult;
|
2660
|
-
fail:
|
2661
|
-
return Qnil;
|
2662
|
-
}
|
2663
|
-
|
2664
|
-
|
2665
2726
|
SWIGINTERN VALUE
|
2666
2727
|
_wrap_pwmSetMode(int argc, VALUE *argv, VALUE self) {
|
2667
2728
|
int arg1 ;
|
@@ -2754,6 +2815,80 @@ fail:
|
|
2754
2815
|
}
|
2755
2816
|
|
2756
2817
|
|
2818
|
+
SWIGINTERN VALUE
|
2819
|
+
_wrap_digitalReadByte(int argc, VALUE *argv, VALUE self) {
|
2820
|
+
unsigned int result;
|
2821
|
+
VALUE vresult = Qnil;
|
2822
|
+
|
2823
|
+
if ((argc < 0) || (argc > 0)) {
|
2824
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2825
|
+
}
|
2826
|
+
result = (unsigned int)digitalReadByte();
|
2827
|
+
vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
|
2828
|
+
return vresult;
|
2829
|
+
fail:
|
2830
|
+
return Qnil;
|
2831
|
+
}
|
2832
|
+
|
2833
|
+
|
2834
|
+
SWIGINTERN VALUE
|
2835
|
+
_wrap_digitalReadByte2(int argc, VALUE *argv, VALUE self) {
|
2836
|
+
unsigned int result;
|
2837
|
+
VALUE vresult = Qnil;
|
2838
|
+
|
2839
|
+
if ((argc < 0) || (argc > 0)) {
|
2840
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2841
|
+
}
|
2842
|
+
result = (unsigned int)digitalReadByte2();
|
2843
|
+
vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
|
2844
|
+
return vresult;
|
2845
|
+
fail:
|
2846
|
+
return Qnil;
|
2847
|
+
}
|
2848
|
+
|
2849
|
+
|
2850
|
+
SWIGINTERN VALUE
|
2851
|
+
_wrap_digitalWriteByte(int argc, VALUE *argv, VALUE self) {
|
2852
|
+
int arg1 ;
|
2853
|
+
int val1 ;
|
2854
|
+
int ecode1 = 0 ;
|
2855
|
+
|
2856
|
+
if ((argc < 1) || (argc > 1)) {
|
2857
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2858
|
+
}
|
2859
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
2860
|
+
if (!SWIG_IsOK(ecode1)) {
|
2861
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","digitalWriteByte", 1, argv[0] ));
|
2862
|
+
}
|
2863
|
+
arg1 = (int)(val1);
|
2864
|
+
digitalWriteByte(arg1);
|
2865
|
+
return Qnil;
|
2866
|
+
fail:
|
2867
|
+
return Qnil;
|
2868
|
+
}
|
2869
|
+
|
2870
|
+
|
2871
|
+
SWIGINTERN VALUE
|
2872
|
+
_wrap_digitalWriteByte2(int argc, VALUE *argv, VALUE self) {
|
2873
|
+
int arg1 ;
|
2874
|
+
int val1 ;
|
2875
|
+
int ecode1 = 0 ;
|
2876
|
+
|
2877
|
+
if ((argc < 1) || (argc > 1)) {
|
2878
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2879
|
+
}
|
2880
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
2881
|
+
if (!SWIG_IsOK(ecode1)) {
|
2882
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","digitalWriteByte2", 1, argv[0] ));
|
2883
|
+
}
|
2884
|
+
arg1 = (int)(val1);
|
2885
|
+
digitalWriteByte2(arg1);
|
2886
|
+
return Qnil;
|
2887
|
+
fail:
|
2888
|
+
return Qnil;
|
2889
|
+
}
|
2890
|
+
|
2891
|
+
|
2757
2892
|
SWIGINTERN VALUE
|
2758
2893
|
_wrap_waitForInterrupt(int argc, VALUE *argv, VALUE self) {
|
2759
2894
|
int arg1 ;
|
@@ -4522,6 +4657,256 @@ fail:
|
|
4522
4657
|
}
|
4523
4658
|
|
4524
4659
|
|
4660
|
+
SWIGINTERN VALUE
|
4661
|
+
_wrap_bmp180Setup(int argc, VALUE *argv, VALUE self) {
|
4662
|
+
int arg1 ;
|
4663
|
+
int val1 ;
|
4664
|
+
int ecode1 = 0 ;
|
4665
|
+
int result;
|
4666
|
+
VALUE vresult = Qnil;
|
4667
|
+
|
4668
|
+
if ((argc < 1) || (argc > 1)) {
|
4669
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4670
|
+
}
|
4671
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
4672
|
+
if (!SWIG_IsOK(ecode1)) {
|
4673
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","bmp180Setup", 1, argv[0] ));
|
4674
|
+
}
|
4675
|
+
arg1 = (int)(val1);
|
4676
|
+
result = (int)bmp180Setup(arg1);
|
4677
|
+
vresult = SWIG_From_int((int)(result));
|
4678
|
+
return vresult;
|
4679
|
+
fail:
|
4680
|
+
return Qnil;
|
4681
|
+
}
|
4682
|
+
|
4683
|
+
|
4684
|
+
SWIGINTERN VALUE
|
4685
|
+
_wrap_drcSetupNet(int argc, VALUE *argv, VALUE self) {
|
4686
|
+
int arg1 ;
|
4687
|
+
int arg2 ;
|
4688
|
+
char *arg3 = (char *) 0 ;
|
4689
|
+
char *arg4 = (char *) 0 ;
|
4690
|
+
char *arg5 = (char *) 0 ;
|
4691
|
+
int val1 ;
|
4692
|
+
int ecode1 = 0 ;
|
4693
|
+
int val2 ;
|
4694
|
+
int ecode2 = 0 ;
|
4695
|
+
int res3 ;
|
4696
|
+
char *buf3 = 0 ;
|
4697
|
+
int alloc3 = 0 ;
|
4698
|
+
int res4 ;
|
4699
|
+
char *buf4 = 0 ;
|
4700
|
+
int alloc4 = 0 ;
|
4701
|
+
int res5 ;
|
4702
|
+
char *buf5 = 0 ;
|
4703
|
+
int alloc5 = 0 ;
|
4704
|
+
int result;
|
4705
|
+
VALUE vresult = Qnil;
|
4706
|
+
|
4707
|
+
if ((argc < 5) || (argc > 5)) {
|
4708
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
|
4709
|
+
}
|
4710
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
4711
|
+
if (!SWIG_IsOK(ecode1)) {
|
4712
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","drcSetupNet", 1, argv[0] ));
|
4713
|
+
}
|
4714
|
+
arg1 = (int)(val1);
|
4715
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
4716
|
+
if (!SWIG_IsOK(ecode2)) {
|
4717
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","drcSetupNet", 2, argv[1] ));
|
4718
|
+
}
|
4719
|
+
arg2 = (int)(val2);
|
4720
|
+
res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3);
|
4721
|
+
if (!SWIG_IsOK(res3)) {
|
4722
|
+
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","drcSetupNet", 3, argv[2] ));
|
4723
|
+
}
|
4724
|
+
arg3 = (char *)(buf3);
|
4725
|
+
res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4);
|
4726
|
+
if (!SWIG_IsOK(res4)) {
|
4727
|
+
SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","drcSetupNet", 4, argv[3] ));
|
4728
|
+
}
|
4729
|
+
arg4 = (char *)(buf4);
|
4730
|
+
res5 = SWIG_AsCharPtrAndSize(argv[4], &buf5, NULL, &alloc5);
|
4731
|
+
if (!SWIG_IsOK(res5)) {
|
4732
|
+
SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "char const *","drcSetupNet", 5, argv[4] ));
|
4733
|
+
}
|
4734
|
+
arg5 = (char *)(buf5);
|
4735
|
+
result = (int)drcSetupNet(arg1,arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5);
|
4736
|
+
vresult = SWIG_From_int((int)(result));
|
4737
|
+
if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
|
4738
|
+
if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
|
4739
|
+
if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
|
4740
|
+
return vresult;
|
4741
|
+
fail:
|
4742
|
+
if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
|
4743
|
+
if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
|
4744
|
+
if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
|
4745
|
+
return Qnil;
|
4746
|
+
}
|
4747
|
+
|
4748
|
+
|
4749
|
+
SWIGINTERN VALUE
|
4750
|
+
_wrap_ds18b20Setup(int argc, VALUE *argv, VALUE self) {
|
4751
|
+
int arg1 ;
|
4752
|
+
char *arg2 = (char *) 0 ;
|
4753
|
+
int val1 ;
|
4754
|
+
int ecode1 = 0 ;
|
4755
|
+
int res2 ;
|
4756
|
+
char *buf2 = 0 ;
|
4757
|
+
int alloc2 = 0 ;
|
4758
|
+
int result;
|
4759
|
+
VALUE vresult = Qnil;
|
4760
|
+
|
4761
|
+
if ((argc < 2) || (argc > 2)) {
|
4762
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
4763
|
+
}
|
4764
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
4765
|
+
if (!SWIG_IsOK(ecode1)) {
|
4766
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","ds18b20Setup", 1, argv[0] ));
|
4767
|
+
}
|
4768
|
+
arg1 = (int)(val1);
|
4769
|
+
res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
|
4770
|
+
if (!SWIG_IsOK(res2)) {
|
4771
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","ds18b20Setup", 2, argv[1] ));
|
4772
|
+
}
|
4773
|
+
arg2 = (char *)(buf2);
|
4774
|
+
result = (int)ds18b20Setup(arg1,(char const *)arg2);
|
4775
|
+
vresult = SWIG_From_int((int)(result));
|
4776
|
+
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
4777
|
+
return vresult;
|
4778
|
+
fail:
|
4779
|
+
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
4780
|
+
return Qnil;
|
4781
|
+
}
|
4782
|
+
|
4783
|
+
|
4784
|
+
SWIGINTERN VALUE
|
4785
|
+
_wrap_htu21dSetup(int argc, VALUE *argv, VALUE self) {
|
4786
|
+
int arg1 ;
|
4787
|
+
int val1 ;
|
4788
|
+
int ecode1 = 0 ;
|
4789
|
+
int result;
|
4790
|
+
VALUE vresult = Qnil;
|
4791
|
+
|
4792
|
+
if ((argc < 1) || (argc > 1)) {
|
4793
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4794
|
+
}
|
4795
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
4796
|
+
if (!SWIG_IsOK(ecode1)) {
|
4797
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","htu21dSetup", 1, argv[0] ));
|
4798
|
+
}
|
4799
|
+
arg1 = (int)(val1);
|
4800
|
+
result = (int)htu21dSetup(arg1);
|
4801
|
+
vresult = SWIG_From_int((int)(result));
|
4802
|
+
return vresult;
|
4803
|
+
fail:
|
4804
|
+
return Qnil;
|
4805
|
+
}
|
4806
|
+
|
4807
|
+
|
4808
|
+
SWIGINTERN VALUE
|
4809
|
+
_wrap_pseudoPinsSetup(int argc, VALUE *argv, VALUE self) {
|
4810
|
+
int arg1 ;
|
4811
|
+
int val1 ;
|
4812
|
+
int ecode1 = 0 ;
|
4813
|
+
int result;
|
4814
|
+
VALUE vresult = Qnil;
|
4815
|
+
|
4816
|
+
if ((argc < 1) || (argc > 1)) {
|
4817
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
4818
|
+
}
|
4819
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
4820
|
+
if (!SWIG_IsOK(ecode1)) {
|
4821
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","pseudoPinsSetup", 1, argv[0] ));
|
4822
|
+
}
|
4823
|
+
arg1 = (int)(val1);
|
4824
|
+
result = (int)pseudoPinsSetup(arg1);
|
4825
|
+
vresult = SWIG_From_int((int)(result));
|
4826
|
+
return vresult;
|
4827
|
+
fail:
|
4828
|
+
return Qnil;
|
4829
|
+
}
|
4830
|
+
|
4831
|
+
|
4832
|
+
SWIGINTERN VALUE
|
4833
|
+
_wrap_rht03Setup(int argc, VALUE *argv, VALUE self) {
|
4834
|
+
int arg1 ;
|
4835
|
+
int arg2 ;
|
4836
|
+
int val1 ;
|
4837
|
+
int ecode1 = 0 ;
|
4838
|
+
int val2 ;
|
4839
|
+
int ecode2 = 0 ;
|
4840
|
+
int result;
|
4841
|
+
VALUE vresult = Qnil;
|
4842
|
+
|
4843
|
+
if ((argc < 2) || (argc > 2)) {
|
4844
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
4845
|
+
}
|
4846
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
4847
|
+
if (!SWIG_IsOK(ecode1)) {
|
4848
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","rht03Setup", 1, argv[0] ));
|
4849
|
+
}
|
4850
|
+
arg1 = (int)(val1);
|
4851
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
4852
|
+
if (!SWIG_IsOK(ecode2)) {
|
4853
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","rht03Setup", 2, argv[1] ));
|
4854
|
+
}
|
4855
|
+
arg2 = (int)(val2);
|
4856
|
+
result = (int)rht03Setup(arg1,arg2);
|
4857
|
+
vresult = SWIG_From_int((int)(result));
|
4858
|
+
return vresult;
|
4859
|
+
fail:
|
4860
|
+
return Qnil;
|
4861
|
+
}
|
4862
|
+
|
4863
|
+
|
4864
|
+
SWIGINTERN VALUE
|
4865
|
+
_wrap_loadWPiExtension(int argc, VALUE *argv, VALUE self) {
|
4866
|
+
char *arg1 = (char *) 0 ;
|
4867
|
+
char *arg2 = (char *) 0 ;
|
4868
|
+
int arg3 ;
|
4869
|
+
int res1 ;
|
4870
|
+
char *buf1 = 0 ;
|
4871
|
+
int alloc1 = 0 ;
|
4872
|
+
int res2 ;
|
4873
|
+
char *buf2 = 0 ;
|
4874
|
+
int alloc2 = 0 ;
|
4875
|
+
int val3 ;
|
4876
|
+
int ecode3 = 0 ;
|
4877
|
+
int result;
|
4878
|
+
VALUE vresult = Qnil;
|
4879
|
+
|
4880
|
+
if ((argc < 3) || (argc > 3)) {
|
4881
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
|
4882
|
+
}
|
4883
|
+
res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
|
4884
|
+
if (!SWIG_IsOK(res1)) {
|
4885
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char *","loadWPiExtension", 1, argv[0] ));
|
4886
|
+
}
|
4887
|
+
arg1 = (char *)(buf1);
|
4888
|
+
res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
|
4889
|
+
if (!SWIG_IsOK(res2)) {
|
4890
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","loadWPiExtension", 2, argv[1] ));
|
4891
|
+
}
|
4892
|
+
arg2 = (char *)(buf2);
|
4893
|
+
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
4894
|
+
if (!SWIG_IsOK(ecode3)) {
|
4895
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","loadWPiExtension", 3, argv[2] ));
|
4896
|
+
}
|
4897
|
+
arg3 = (int)(val3);
|
4898
|
+
result = (int)loadWPiExtension(arg1,arg2,arg3);
|
4899
|
+
vresult = SWIG_From_int((int)(result));
|
4900
|
+
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
|
4901
|
+
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
4902
|
+
return vresult;
|
4903
|
+
fail:
|
4904
|
+
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
|
4905
|
+
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
|
4906
|
+
return Qnil;
|
4907
|
+
}
|
4908
|
+
|
4909
|
+
|
4525
4910
|
SWIGINTERN VALUE
|
4526
4911
|
_wrap_ds1302rtcRead(int argc, VALUE *argv, VALUE self) {
|
4527
4912
|
int arg1 ;
|
@@ -6438,6 +6823,30 @@ fail:
|
|
6438
6823
|
}
|
6439
6824
|
|
6440
6825
|
|
6826
|
+
SWIGINTERN VALUE
|
6827
|
+
_wrap_piFaceSetup(int argc, VALUE *argv, VALUE self) {
|
6828
|
+
int arg1 ;
|
6829
|
+
int val1 ;
|
6830
|
+
int ecode1 = 0 ;
|
6831
|
+
int result;
|
6832
|
+
VALUE vresult = Qnil;
|
6833
|
+
|
6834
|
+
if ((argc < 1) || (argc > 1)) {
|
6835
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
6836
|
+
}
|
6837
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
6838
|
+
if (!SWIG_IsOK(ecode1)) {
|
6839
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","piFaceSetup", 1, argv[0] ));
|
6840
|
+
}
|
6841
|
+
arg1 = (int)(val1);
|
6842
|
+
result = (int)piFaceSetup(arg1);
|
6843
|
+
vresult = SWIG_From_int((int)(result));
|
6844
|
+
return vresult;
|
6845
|
+
fail:
|
6846
|
+
return Qnil;
|
6847
|
+
}
|
6848
|
+
|
6849
|
+
|
6441
6850
|
|
6442
6851
|
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
6443
6852
|
|
@@ -6529,7 +6938,7 @@ SWIGRUNTIME void
|
|
6529
6938
|
SWIG_InitializeModule(void *clientdata) {
|
6530
6939
|
size_t i;
|
6531
6940
|
swig_module_info *module_head, *iter;
|
6532
|
-
int
|
6941
|
+
int init;
|
6533
6942
|
|
6534
6943
|
/* check to see if the circular list has been setup, if not, set it up */
|
6535
6944
|
if (swig_module.next==0) {
|
@@ -6548,22 +6957,18 @@ SWIG_InitializeModule(void *clientdata) {
|
|
6548
6957
|
/* This is the first module loaded for this interpreter */
|
6549
6958
|
/* so set the swig module into the interpreter */
|
6550
6959
|
SWIG_SetModule(clientdata, &swig_module);
|
6551
|
-
module_head = &swig_module;
|
6552
6960
|
} else {
|
6553
6961
|
/* the interpreter has loaded a SWIG module, but has it loaded this one? */
|
6554
|
-
found=0;
|
6555
6962
|
iter=module_head;
|
6556
6963
|
do {
|
6557
6964
|
if (iter==&swig_module) {
|
6558
|
-
|
6559
|
-
|
6965
|
+
/* Our module is already in the list, so there's nothing more to do. */
|
6966
|
+
return;
|
6560
6967
|
}
|
6561
6968
|
iter=iter->next;
|
6562
6969
|
} while (iter!= module_head);
|
6563
6970
|
|
6564
|
-
/*
|
6565
|
-
if (found) return;
|
6566
|
-
/* otherwise we must add out module into the list */
|
6971
|
+
/* otherwise we must add our module into the list */
|
6567
6972
|
swig_module.next = module_head->next;
|
6568
6973
|
module_head->next = &swig_module;
|
6569
6974
|
}
|
@@ -6576,7 +6981,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
6576
6981
|
|
6577
6982
|
/* Now work on filling in swig_module.types */
|
6578
6983
|
#ifdef SWIGRUNTIME_DEBUG
|
6579
|
-
printf("SWIG_InitializeModule: size %
|
6984
|
+
printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
|
6580
6985
|
#endif
|
6581
6986
|
for (i = 0; i < swig_module.size; ++i) {
|
6582
6987
|
swig_type_info *type = 0;
|
@@ -6584,7 +6989,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
6584
6989
|
swig_cast_info *cast;
|
6585
6990
|
|
6586
6991
|
#ifdef SWIGRUNTIME_DEBUG
|
6587
|
-
printf("SWIG_InitializeModule: type %
|
6992
|
+
printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
|
6588
6993
|
#endif
|
6589
6994
|
|
6590
6995
|
/* if there is another module already loaded */
|
@@ -6660,7 +7065,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
6660
7065
|
for (i = 0; i < swig_module.size; ++i) {
|
6661
7066
|
int j = 0;
|
6662
7067
|
swig_cast_info *cast = swig_module.cast_initial[i];
|
6663
|
-
printf("SWIG_InitializeModule: type %
|
7068
|
+
printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
|
6664
7069
|
while (cast->type) {
|
6665
7070
|
printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
|
6666
7071
|
cast++;
|
@@ -6728,6 +7133,7 @@ SWIGEXPORT void Init_wiringpi(void) {
|
|
6728
7133
|
rb_define_module_function(mWiringpi, "wiringPiFailure", _wrap_wiringPiFailure, -1);
|
6729
7134
|
rb_define_module_function(mWiringpi, "wiringPiFindNode", _wrap_wiringPiFindNode, -1);
|
6730
7135
|
rb_define_module_function(mWiringpi, "wiringPiNewNode", _wrap_wiringPiNewNode, -1);
|
7136
|
+
rb_define_module_function(mWiringpi, "wiringPiVersion", _wrap_wiringPiVersion, -1);
|
6731
7137
|
rb_define_module_function(mWiringpi, "wiringPiSetup", _wrap_wiringPiSetup, -1);
|
6732
7138
|
rb_define_module_function(mWiringpi, "wiringPiSetupSys", _wrap_wiringPiSetupSys, -1);
|
6733
7139
|
rb_define_module_function(mWiringpi, "wiringPiSetupGpio", _wrap_wiringPiSetupGpio, -1);
|
@@ -6740,6 +7146,7 @@ SWIGEXPORT void Init_wiringpi(void) {
|
|
6740
7146
|
rb_define_module_function(mWiringpi, "pwmWrite", _wrap_pwmWrite, -1);
|
6741
7147
|
rb_define_module_function(mWiringpi, "analogRead", _wrap_analogRead, -1);
|
6742
7148
|
rb_define_module_function(mWiringpi, "analogWrite", _wrap_analogWrite, -1);
|
7149
|
+
rb_define_module_function(mWiringpi, "piGpioLayout", _wrap_piGpioLayout, -1);
|
6743
7150
|
rb_define_module_function(mWiringpi, "piBoardRev", _wrap_piBoardRev, -1);
|
6744
7151
|
rb_define_module_function(mWiringpi, "piBoardId", _wrap_piBoardId, -1);
|
6745
7152
|
rb_define_module_function(mWiringpi, "wpiPinToGpio", _wrap_wpiPinToGpio, -1);
|
@@ -6747,12 +7154,14 @@ SWIGEXPORT void Init_wiringpi(void) {
|
|
6747
7154
|
rb_define_module_function(mWiringpi, "setPadDrive", _wrap_setPadDrive, -1);
|
6748
7155
|
rb_define_module_function(mWiringpi, "getAlt", _wrap_getAlt, -1);
|
6749
7156
|
rb_define_module_function(mWiringpi, "pwmToneWrite", _wrap_pwmToneWrite, -1);
|
6750
|
-
rb_define_module_function(mWiringpi, "digitalWriteByte", _wrap_digitalWriteByte, -1);
|
6751
|
-
rb_define_module_function(mWiringpi, "digitalReadByte", _wrap_digitalReadByte, -1);
|
6752
7157
|
rb_define_module_function(mWiringpi, "pwmSetMode", _wrap_pwmSetMode, -1);
|
6753
7158
|
rb_define_module_function(mWiringpi, "pwmSetRange", _wrap_pwmSetRange, -1);
|
6754
7159
|
rb_define_module_function(mWiringpi, "pwmSetClock", _wrap_pwmSetClock, -1);
|
6755
7160
|
rb_define_module_function(mWiringpi, "gpioClockSet", _wrap_gpioClockSet, -1);
|
7161
|
+
rb_define_module_function(mWiringpi, "digitalReadByte", _wrap_digitalReadByte, -1);
|
7162
|
+
rb_define_module_function(mWiringpi, "digitalReadByte2", _wrap_digitalReadByte2, -1);
|
7163
|
+
rb_define_module_function(mWiringpi, "digitalWriteByte", _wrap_digitalWriteByte, -1);
|
7164
|
+
rb_define_module_function(mWiringpi, "digitalWriteByte2", _wrap_digitalWriteByte2, -1);
|
6756
7165
|
rb_define_module_function(mWiringpi, "waitForInterrupt", _wrap_waitForInterrupt, -1);
|
6757
7166
|
rb_define_module_function(mWiringpi, "piThreadCreate", _wrap_piThreadCreate, -1);
|
6758
7167
|
rb_define_module_function(mWiringpi, "piLock", _wrap_piLock, -1);
|
@@ -6809,6 +7218,13 @@ SWIGEXPORT void Init_wiringpi(void) {
|
|
6809
7218
|
rb_define_module_function(mWiringpi, "softToneStop", _wrap_softToneStop, -1);
|
6810
7219
|
rb_define_module_function(mWiringpi, "softToneWrite", _wrap_softToneWrite, -1);
|
6811
7220
|
rb_define_module_function(mWiringpi, "sr595Setup", _wrap_sr595Setup, -1);
|
7221
|
+
rb_define_module_function(mWiringpi, "bmp180Setup", _wrap_bmp180Setup, -1);
|
7222
|
+
rb_define_module_function(mWiringpi, "drcSetupNet", _wrap_drcSetupNet, -1);
|
7223
|
+
rb_define_module_function(mWiringpi, "ds18b20Setup", _wrap_ds18b20Setup, -1);
|
7224
|
+
rb_define_module_function(mWiringpi, "htu21dSetup", _wrap_htu21dSetup, -1);
|
7225
|
+
rb_define_module_function(mWiringpi, "pseudoPinsSetup", _wrap_pseudoPinsSetup, -1);
|
7226
|
+
rb_define_module_function(mWiringpi, "rht03Setup", _wrap_rht03Setup, -1);
|
7227
|
+
rb_define_module_function(mWiringpi, "loadWPiExtension", _wrap_loadWPiExtension, -1);
|
6812
7228
|
rb_define_module_function(mWiringpi, "ds1302rtcRead", _wrap_ds1302rtcRead, -1);
|
6813
7229
|
rb_define_module_function(mWiringpi, "ds1302rtcWrite", _wrap_ds1302rtcWrite, -1);
|
6814
7230
|
rb_define_module_function(mWiringpi, "ds1302ramRead", _wrap_ds1302ramRead, -1);
|
@@ -6868,5 +7284,6 @@ SWIGEXPORT void Init_wiringpi(void) {
|
|
6868
7284
|
rb_define_module_function(mWiringpi, "scrollPhatPrintSpeed", _wrap_scrollPhatPrintSpeed, -1);
|
6869
7285
|
rb_define_module_function(mWiringpi, "scrollPhatIntensity", _wrap_scrollPhatIntensity, -1);
|
6870
7286
|
rb_define_module_function(mWiringpi, "scrollPhatSetup", _wrap_scrollPhatSetup, -1);
|
7287
|
+
rb_define_module_function(mWiringpi, "piFaceSetup", _wrap_piFaceSetup, -1);
|
6871
7288
|
}
|
6872
7289
|
|