wiringpi 1.1.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +7 -0
  2. data/ext/wiringpi/WiringPi/devLib/ds1302.c +240 -0
  3. data/ext/wiringpi/WiringPi/devLib/ds1302.h +44 -0
  4. data/ext/wiringpi/WiringPi/devLib/font.h +2577 -0
  5. data/ext/wiringpi/WiringPi/devLib/gertboard.c +164 -0
  6. data/ext/wiringpi/WiringPi/devLib/gertboard.h +45 -0
  7. data/ext/wiringpi/WiringPi/devLib/lcd.c +495 -0
  8. data/ext/wiringpi/WiringPi/devLib/lcd.h +52 -0
  9. data/ext/wiringpi/WiringPi/devLib/lcd128x64.c +673 -0
  10. data/ext/wiringpi/WiringPi/devLib/lcd128x64.h +39 -0
  11. data/ext/wiringpi/WiringPi/devLib/maxdetect.c +165 -0
  12. data/ext/wiringpi/{serial.h → WiringPi/devLib/maxdetect.h} +14 -15
  13. data/ext/wiringpi/WiringPi/devLib/piFace.c +112 -0
  14. data/ext/wiringpi/WiringPi/devLib/piFace.h +32 -0
  15. data/ext/wiringpi/WiringPi/devLib/piFaceOld.c +178 -0
  16. data/ext/wiringpi/WiringPi/devLib/piGlow.c +118 -0
  17. data/ext/wiringpi/WiringPi/devLib/piGlow.h +45 -0
  18. data/ext/wiringpi/WiringPi/devLib/piNes.c +113 -0
  19. data/ext/wiringpi/WiringPi/devLib/piNes.h +45 -0
  20. data/ext/wiringpi/WiringPi/examples/Gertboard/7segments.c +221 -0
  21. data/ext/wiringpi/WiringPi/examples/Gertboard/buttons.c +83 -0
  22. data/ext/wiringpi/WiringPi/examples/Gertboard/gertboard.c +96 -0
  23. data/ext/wiringpi/WiringPi/examples/Gertboard/record.c +60 -0
  24. data/ext/wiringpi/WiringPi/examples/Gertboard/temperature.c +78 -0
  25. data/ext/wiringpi/WiringPi/examples/Gertboard/voltmeter.c +73 -0
  26. data/ext/wiringpi/WiringPi/examples/Gertboard/vumeter.c +152 -0
  27. data/ext/wiringpi/WiringPi/examples/PiFace/blink.c +59 -0
  28. data/ext/wiringpi/WiringPi/examples/PiFace/buttons.c +103 -0
  29. data/ext/wiringpi/WiringPi/examples/PiFace/ladder.c +337 -0
  30. data/ext/wiringpi/WiringPi/examples/PiFace/metro.c +111 -0
  31. data/ext/wiringpi/WiringPi/examples/PiFace/motor.c +120 -0
  32. data/ext/wiringpi/WiringPi/examples/PiFace/reaction.c +194 -0
  33. data/ext/wiringpi/WiringPi/examples/PiGlow/piGlow0.c +51 -0
  34. data/ext/wiringpi/WiringPi/examples/PiGlow/piGlow1.c +258 -0
  35. data/ext/wiringpi/WiringPi/examples/PiGlow/piglow.c +176 -0
  36. data/ext/wiringpi/WiringPi/examples/blink.c +48 -0
  37. data/ext/wiringpi/WiringPi/examples/blink12.c +111 -0
  38. data/ext/wiringpi/WiringPi/examples/blink12drcs.c +125 -0
  39. data/ext/wiringpi/WiringPi/examples/blink6drcs.c +115 -0
  40. data/ext/wiringpi/WiringPi/examples/blink8.c +57 -0
  41. data/ext/wiringpi/WiringPi/examples/clock.c +201 -0
  42. data/ext/wiringpi/WiringPi/examples/delayTest.c +107 -0
  43. data/ext/wiringpi/WiringPi/examples/ds1302.c +238 -0
  44. data/ext/wiringpi/WiringPi/examples/header.h +23 -0
  45. data/ext/wiringpi/WiringPi/examples/isr-osc.c +118 -0
  46. data/ext/wiringpi/WiringPi/examples/isr.c +110 -0
  47. data/ext/wiringpi/WiringPi/examples/lcd-adafruit.c +347 -0
  48. data/ext/wiringpi/WiringPi/examples/lcd.c +286 -0
  49. data/ext/wiringpi/WiringPi/examples/lowPower.c +68 -0
  50. data/ext/wiringpi/WiringPi/examples/nes.c +67 -0
  51. data/ext/wiringpi/WiringPi/examples/okLed.c +82 -0
  52. data/ext/wiringpi/WiringPi/examples/pwm.c +58 -0
  53. data/ext/wiringpi/WiringPi/examples/q2w/binary.c +79 -0
  54. data/ext/wiringpi/WiringPi/examples/q2w/blink-io.c +61 -0
  55. data/ext/wiringpi/WiringPi/examples/q2w/blink.c +50 -0
  56. data/ext/wiringpi/WiringPi/examples/q2w/bright.c +59 -0
  57. data/ext/wiringpi/WiringPi/examples/q2w/button.c +63 -0
  58. data/ext/wiringpi/WiringPi/examples/q2w/volts.c +62 -0
  59. data/ext/wiringpi/WiringPi/examples/rht03.c +69 -0
  60. data/ext/wiringpi/WiringPi/examples/serialRead.c +48 -0
  61. data/ext/wiringpi/WiringPi/examples/serialTest.c +75 -0
  62. data/ext/wiringpi/WiringPi/examples/servo.c +57 -0
  63. data/ext/wiringpi/WiringPi/examples/softPwm.c +89 -0
  64. data/ext/wiringpi/WiringPi/examples/softTone.c +54 -0
  65. data/ext/wiringpi/WiringPi/examples/speed.c +95 -0
  66. data/ext/wiringpi/WiringPi/examples/spiSpeed.c +118 -0
  67. data/ext/wiringpi/WiringPi/examples/wfi.c +161 -0
  68. data/ext/wiringpi/WiringPi/gpio/gpio.c +1351 -0
  69. data/ext/wiringpi/WiringPi/gpio/pins.c +33 -0
  70. data/ext/wiringpi/WiringPi/gpio/readall.c +334 -0
  71. data/ext/wiringpi/WiringPi/gpio/version.h +1 -0
  72. data/ext/wiringpi/WiringPi/wiringPi/drcSerial.c +201 -0
  73. data/ext/wiringpi/WiringPi/wiringPi/drcSerial.h +33 -0
  74. data/ext/wiringpi/WiringPi/wiringPi/max31855.c +81 -0
  75. data/ext/wiringpi/WiringPi/wiringPi/max31855.h +33 -0
  76. data/ext/wiringpi/WiringPi/wiringPi/max5322.c +84 -0
  77. data/ext/wiringpi/WiringPi/wiringPi/max5322.h +33 -0
  78. data/ext/wiringpi/WiringPi/wiringPi/mcp23008.c +149 -0
  79. data/ext/wiringpi/WiringPi/wiringPi/mcp23008.h +33 -0
  80. data/ext/wiringpi/WiringPi/wiringPi/mcp23016.c +164 -0
  81. data/ext/wiringpi/WiringPi/wiringPi/mcp23016.h +33 -0
  82. data/ext/wiringpi/WiringPi/wiringPi/mcp23016reg.h +48 -0
  83. data/ext/wiringpi/WiringPi/wiringPi/mcp23017.c +195 -0
  84. data/ext/wiringpi/WiringPi/wiringPi/mcp23017.h +33 -0
  85. data/ext/wiringpi/WiringPi/wiringPi/mcp23s08.c +189 -0
  86. data/ext/wiringpi/WiringPi/wiringPi/mcp23s08.h +33 -0
  87. data/ext/wiringpi/WiringPi/wiringPi/mcp23s17.c +236 -0
  88. data/ext/wiringpi/WiringPi/wiringPi/mcp23s17.h +33 -0
  89. data/ext/wiringpi/WiringPi/wiringPi/mcp23x08.h +73 -0
  90. data/ext/wiringpi/WiringPi/wiringPi/mcp23x0817.h +87 -0
  91. data/ext/wiringpi/WiringPi/wiringPi/mcp3002.c +76 -0
  92. data/ext/wiringpi/WiringPi/wiringPi/mcp3002.h +33 -0
  93. data/ext/wiringpi/WiringPi/wiringPi/mcp3004.c +76 -0
  94. data/ext/wiringpi/WiringPi/wiringPi/mcp3004.h +33 -0
  95. data/ext/wiringpi/WiringPi/wiringPi/mcp3422.c +110 -0
  96. data/ext/wiringpi/WiringPi/wiringPi/mcp3422.h +43 -0
  97. data/ext/wiringpi/WiringPi/wiringPi/mcp4802.c +76 -0
  98. data/ext/wiringpi/WiringPi/wiringPi/mcp4802.h +33 -0
  99. data/ext/wiringpi/WiringPi/wiringPi/pcf8574.c +126 -0
  100. data/ext/wiringpi/WiringPi/wiringPi/pcf8574.h +33 -0
  101. data/ext/wiringpi/WiringPi/wiringPi/pcf8591.c +90 -0
  102. data/ext/wiringpi/WiringPi/wiringPi/pcf8591.h +33 -0
  103. data/ext/wiringpi/WiringPi/wiringPi/piHiPri.c +51 -0
  104. data/ext/wiringpi/WiringPi/wiringPi/piThread.c +63 -0
  105. data/ext/wiringpi/WiringPi/wiringPi/sn3218.c +75 -0
  106. data/ext/wiringpi/WiringPi/wiringPi/sn3218.h +33 -0
  107. data/ext/wiringpi/WiringPi/wiringPi/softPwm.c +166 -0
  108. data/ext/wiringpi/WiringPi/wiringPi/softPwm.h +35 -0
  109. data/ext/wiringpi/WiringPi/wiringPi/softServo.c +211 -0
  110. data/ext/wiringpi/WiringPi/wiringPi/softServo.h +35 -0
  111. data/ext/wiringpi/WiringPi/wiringPi/softTone.c +150 -0
  112. data/ext/wiringpi/WiringPi/wiringPi/softTone.h +39 -0
  113. data/ext/wiringpi/WiringPi/wiringPi/sr595.c +109 -0
  114. data/ext/wiringpi/WiringPi/wiringPi/sr595.h +34 -0
  115. data/ext/wiringpi/WiringPi/wiringPi/wiringPi.c +2007 -0
  116. data/ext/wiringpi/WiringPi/wiringPi/wiringPi.h +224 -0
  117. data/ext/wiringpi/WiringPi/wiringPi/wiringPiI2C.c +232 -0
  118. data/ext/wiringpi/WiringPi/wiringPi/wiringPiI2C.h +42 -0
  119. data/ext/wiringpi/WiringPi/wiringPi/wiringPiSPI.c +136 -0
  120. data/ext/wiringpi/WiringPi/wiringPi/wiringPiSPI.h +36 -0
  121. data/ext/wiringpi/{serial.c → WiringPi/wiringPi/wiringSerial.c} +38 -29
  122. data/ext/wiringpi/WiringPi/wiringPi/wiringSerial.h +38 -0
  123. data/ext/wiringpi/{wiringShift.c → WiringPi/wiringPi/wiringShift.c} +3 -4
  124. data/ext/wiringpi/{wiringShift.h → WiringPi/wiringPi/wiringShift.h} +5 -5
  125. data/ext/wiringpi/WiringPi/wiringPi/wpiExtensions.c +731 -0
  126. data/ext/wiringpi/WiringPi/wiringPi/wpiExtensions.h +26 -0
  127. data/ext/wiringpi/extconf.rb +7 -1
  128. data/ext/wiringpi/wiringpi_wrap.c +1741 -218
  129. data/lib/wiringpi.rb +24 -222
  130. data/lib/wiringpi/event.rb +21 -0
  131. data/lib/wiringpi/gpio.rb +139 -0
  132. data/lib/wiringpi/i2c.rb +26 -0
  133. data/lib/wiringpi/mcp23x17.rb +31 -0
  134. data/lib/wiringpi/serial.rb +49 -0
  135. data/lib/wiringpi/spi.rb +15 -0
  136. metadata +146 -22
  137. data/ext/wiringpi/wiringPi.c +0 -729
  138. data/ext/wiringpi/wiringPi.h +0 -69
@@ -0,0 +1,26 @@
1
+ /*
2
+ * extensions.h:
3
+ * Part of the GPIO program to test, peek, poke and otherwise
4
+ * noodle with the GPIO hardware on the Raspberry Pi.
5
+ * Copyright (c) 2012-2015 Gordon Henderson
6
+ ***********************************************************************
7
+ * This file is part of wiringPi:
8
+ * https://projects.drogon.net/raspberry-pi/wiringpi/
9
+ *
10
+ * wiringPi is free software: you can redistribute it and/or modify
11
+ * it under the terms of the GNU Lesser General Public License as published by
12
+ * the Free Software Foundation, either version 3 of the License, or
13
+ * (at your option) any later version.
14
+ *
15
+ * wiringPi is distributed in the hope that it will be useful,
16
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ * GNU Lesser General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU Lesser General Public License
21
+ * along with wiringPi. If not, see <http://www.gnu.org/licenses/>.
22
+ ***********************************************************************
23
+ */
24
+
25
+
26
+ extern int loadWPiExtension (char *progName, char *extensionData, int verbose) ;
@@ -1,2 +1,8 @@
1
1
  require 'mkmf'
2
- create_makefile('wiringpi/wiringpi')
2
+
3
+ $srcs = Dir.glob('WiringPi/wiringPi/*.c')
4
+ $objs = $srcs.map{ |file| file.sub('.c','.o') }
5
+ $srcs << 'wiringpi_wrap.c'
6
+ $objs << 'wiringpi_wrap.o'
7
+
8
+ create_makefile('wiringpi/wiringpi')
@@ -1790,8 +1790,12 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
1790
1790
  /* -------- TYPES TABLE (BEGIN) -------- */
1791
1791
 
1792
1792
  #define SWIGTYPE_p_char swig_types[0]
1793
- static swig_type_info *swig_types[2];
1794
- static swig_module_info swig_module = {swig_types, 1, 0, 0, 0, 0};
1793
+ #define SWIGTYPE_p_f_int_int__int swig_types[1]
1794
+ #define SWIGTYPE_p_f_p_void__p_void swig_types[2]
1795
+ #define SWIGTYPE_p_f_void__void swig_types[3]
1796
+ #define SWIGTYPE_p_unsigned_char swig_types[4]
1797
+ static swig_type_info *swig_types[6];
1798
+ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0};
1795
1799
  #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1796
1800
  #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1797
1801
 
@@ -1814,6 +1818,47 @@ static VALUE mWiringpi;
1814
1818
  #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
1815
1819
 
1816
1820
 
1821
+
1822
+ #include "WiringPi/devLib/ds1302.h"
1823
+ #include "WiringPi/devLib/font.h"
1824
+ #include "WiringPi/devLib/gertboard.h"
1825
+ #include "WiringPi/devLib/lcd128x64.h"
1826
+ #include "WiringPi/devLib/lcd.h"
1827
+ #include "WiringPi/devLib/maxdetect.h"
1828
+ #include "WiringPi/devLib/piFace.h"
1829
+ #include "WiringPi/devLib/piGlow.h"
1830
+ #include "WiringPi/devLib/piNes.h"
1831
+ #include "WiringPi/wiringPi/drcSerial.h"
1832
+ #include "WiringPi/wiringPi/max31855.h"
1833
+ #include "WiringPi/wiringPi/max5322.h"
1834
+ #include "WiringPi/wiringPi/mcp23008.h"
1835
+ #include "WiringPi/wiringPi/mcp23016.h"
1836
+ #include "WiringPi/wiringPi/mcp23016reg.h"
1837
+ #include "WiringPi/wiringPi/mcp23017.h"
1838
+ #include "WiringPi/wiringPi/mcp23s08.h"
1839
+ #include "WiringPi/wiringPi/mcp23s17.h"
1840
+ #include "WiringPi/wiringPi/mcp23x0817.h"
1841
+ #include "WiringPi/wiringPi/mcp23x08.h"
1842
+ #include "WiringPi/wiringPi/mcp3002.h"
1843
+ #include "WiringPi/wiringPi/mcp3004.h"
1844
+ #include "WiringPi/wiringPi/mcp3422.h"
1845
+ #include "WiringPi/wiringPi/mcp4802.h"
1846
+ #include "WiringPi/wiringPi/pcf8574.h"
1847
+ #include "WiringPi/wiringPi/pcf8591.h"
1848
+ #include "WiringPi/wiringPi/sn3218.h"
1849
+ #include "WiringPi/wiringPi/softPwm.h"
1850
+ #include "WiringPi/wiringPi/softServo.h"
1851
+ #include "WiringPi/wiringPi/softTone.h"
1852
+ #include "WiringPi/wiringPi/sr595.h"
1853
+ #include "WiringPi/wiringPi/wiringPi.h"
1854
+ #include "WiringPi/wiringPi/wiringPiI2C.h"
1855
+ #include "WiringPi/wiringPi/wiringPiSPI.h"
1856
+ #include "WiringPi/wiringPi/wiringSerial.h"
1857
+ #include "WiringPi/wiringPi/wiringShift.h"
1858
+ #include "WiringPi/wiringPi/wpiExtensions.h"
1859
+
1860
+
1861
+
1817
1862
  #include <limits.h>
1818
1863
  #if !defined(SWIG_NO_LLONG_MAX)
1819
1864
  # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
@@ -1841,7 +1886,7 @@ SWIG_ruby_failed(void)
1841
1886
  }
1842
1887
 
1843
1888
 
1844
- /*@SWIG:/usr/local/share/swig/2.0.7/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1889
+ /*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1845
1890
  SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
1846
1891
  {
1847
1892
  VALUE obj = args[0];
@@ -1886,7 +1931,7 @@ SWIG_AsVal_int (VALUE obj, int *val)
1886
1931
  }
1887
1932
 
1888
1933
 
1889
- /*@SWIG:/usr/local/share/swig/2.0.7/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1934
+ /*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1890
1935
  SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
1891
1936
  {
1892
1937
  VALUE obj = args[0];
@@ -1916,15 +1961,15 @@ SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
1916
1961
 
1917
1962
 
1918
1963
  SWIGINTERN int
1919
- SWIG_AsVal_unsigned_SS_char (VALUE obj, unsigned char *val)
1964
+ SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val)
1920
1965
  {
1921
1966
  unsigned long v;
1922
1967
  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
1923
1968
  if (SWIG_IsOK(res)) {
1924
- if ((v > UCHAR_MAX)) {
1969
+ if ((v > UINT_MAX)) {
1925
1970
  return SWIG_OverflowError;
1926
1971
  } else {
1927
- if (val) *val = (unsigned char)(v);
1972
+ if (val) *val = (unsigned int)(v);
1928
1973
  }
1929
1974
  }
1930
1975
  return res;
@@ -1938,29 +1983,6 @@ SWIG_From_unsigned_SS_long (unsigned long value)
1938
1983
  }
1939
1984
 
1940
1985
 
1941
- SWIGINTERNINLINE VALUE
1942
- SWIG_From_unsigned_SS_char (unsigned char value)
1943
- {
1944
- return SWIG_From_unsigned_SS_long (value);
1945
- }
1946
-
1947
-
1948
- SWIGINTERN int
1949
- SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val)
1950
- {
1951
- unsigned long v;
1952
- int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
1953
- if (SWIG_IsOK(res)) {
1954
- if ((v > UINT_MAX)) {
1955
- return SWIG_OverflowError;
1956
- } else {
1957
- if (val) *val = (unsigned int)(v);
1958
- }
1959
- }
1960
- return res;
1961
- }
1962
-
1963
-
1964
1986
  SWIGINTERNINLINE VALUE
1965
1987
  SWIG_From_unsigned_SS_int (unsigned int value)
1966
1988
  {
@@ -2022,9 +2044,27 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
2022
2044
 
2023
2045
 
2024
2046
 
2025
- #include "wiringPi.h"
2026
- #include "wiringShift.h"
2027
- #include "serial.h"
2047
+ SWIGINTERN int
2048
+ SWIG_AsVal_unsigned_SS_char (VALUE obj, unsigned char *val)
2049
+ {
2050
+ unsigned long v;
2051
+ int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
2052
+ if (SWIG_IsOK(res)) {
2053
+ if ((v > UCHAR_MAX)) {
2054
+ return SWIG_OverflowError;
2055
+ } else {
2056
+ if (val) *val = (unsigned char)(v);
2057
+ }
2058
+ }
2059
+ return res;
2060
+ }
2061
+
2062
+
2063
+ SWIGINTERNINLINE VALUE
2064
+ SWIG_From_unsigned_SS_char (unsigned char value)
2065
+ {
2066
+ return SWIG_From_unsigned_SS_long (value);
2067
+ }
2028
2068
 
2029
2069
  SWIGINTERN VALUE
2030
2070
  _wrap_wiringPiSetup(int argc, VALUE *argv, VALUE self) {
@@ -2075,28 +2115,47 @@ fail:
2075
2115
 
2076
2116
 
2077
2117
  SWIGINTERN VALUE
2078
- _wrap_wiringPiGpioMode(int argc, VALUE *argv, VALUE self) {
2118
+ _wrap_wiringPiSetupPhys(int argc, VALUE *argv, VALUE self) {
2119
+ int result;
2120
+ VALUE vresult = Qnil;
2121
+
2122
+ if ((argc < 0) || (argc > 0)) {
2123
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2124
+ }
2125
+ result = (int)wiringPiSetupPhys();
2126
+ vresult = SWIG_From_int((int)(result));
2127
+ return vresult;
2128
+ fail:
2129
+ return Qnil;
2130
+ }
2131
+
2132
+
2133
+ SWIGINTERN VALUE
2134
+ _wrap_piFaceSetup(int argc, VALUE *argv, VALUE self) {
2079
2135
  int arg1 ;
2080
2136
  int val1 ;
2081
2137
  int ecode1 = 0 ;
2138
+ int result;
2139
+ VALUE vresult = Qnil;
2082
2140
 
2083
2141
  if ((argc < 1) || (argc > 1)) {
2084
2142
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2085
2143
  }
2086
2144
  ecode1 = SWIG_AsVal_int(argv[0], &val1);
2087
2145
  if (!SWIG_IsOK(ecode1)) {
2088
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","wiringPiGpioMode", 1, argv[0] ));
2146
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","piFaceSetup", 1, argv[0] ));
2089
2147
  }
2090
2148
  arg1 = (int)(val1);
2091
- wiringPiGpioMode(arg1);
2092
- return Qnil;
2149
+ result = (int)piFaceSetup(arg1);
2150
+ vresult = SWIG_From_int((int)(result));
2151
+ return vresult;
2093
2152
  fail:
2094
2153
  return Qnil;
2095
2154
  }
2096
2155
 
2097
2156
 
2098
2157
  SWIGINTERN VALUE
2099
- _wrap_pullUpDnControl(int argc, VALUE *argv, VALUE self) {
2158
+ _wrap_pinMode(int argc, VALUE *argv, VALUE self) {
2100
2159
  int arg1 ;
2101
2160
  int arg2 ;
2102
2161
  int val1 ;
@@ -2109,15 +2168,15 @@ _wrap_pullUpDnControl(int argc, VALUE *argv, VALUE self) {
2109
2168
  }
2110
2169
  ecode1 = SWIG_AsVal_int(argv[0], &val1);
2111
2170
  if (!SWIG_IsOK(ecode1)) {
2112
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","pullUpDnControl", 1, argv[0] ));
2171
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","pinMode", 1, argv[0] ));
2113
2172
  }
2114
2173
  arg1 = (int)(val1);
2115
2174
  ecode2 = SWIG_AsVal_int(argv[1], &val2);
2116
2175
  if (!SWIG_IsOK(ecode2)) {
2117
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","pullUpDnControl", 2, argv[1] ));
2176
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","pinMode", 2, argv[1] ));
2118
2177
  }
2119
2178
  arg2 = (int)(val2);
2120
- pullUpDnControl(arg1,arg2);
2179
+ pinMode(arg1,arg2);
2121
2180
  return Qnil;
2122
2181
  fail:
2123
2182
  return Qnil;
@@ -2125,7 +2184,7 @@ fail:
2125
2184
 
2126
2185
 
2127
2186
  SWIGINTERN VALUE
2128
- _wrap_pinMode(int argc, VALUE *argv, VALUE self) {
2187
+ _wrap_pullUpDnControl(int argc, VALUE *argv, VALUE self) {
2129
2188
  int arg1 ;
2130
2189
  int arg2 ;
2131
2190
  int val1 ;
@@ -2138,16 +2197,40 @@ _wrap_pinMode(int argc, VALUE *argv, VALUE self) {
2138
2197
  }
2139
2198
  ecode1 = SWIG_AsVal_int(argv[0], &val1);
2140
2199
  if (!SWIG_IsOK(ecode1)) {
2141
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","pinMode", 1, argv[0] ));
2200
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","pullUpDnControl", 1, argv[0] ));
2142
2201
  }
2143
2202
  arg1 = (int)(val1);
2144
2203
  ecode2 = SWIG_AsVal_int(argv[1], &val2);
2145
2204
  if (!SWIG_IsOK(ecode2)) {
2146
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","pinMode", 2, argv[1] ));
2205
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","pullUpDnControl", 2, argv[1] ));
2147
2206
  }
2148
2207
  arg2 = (int)(val2);
2149
- pinMode(arg1,arg2);
2208
+ pullUpDnControl(arg1,arg2);
2209
+ return Qnil;
2210
+ fail:
2150
2211
  return Qnil;
2212
+ }
2213
+
2214
+
2215
+ SWIGINTERN VALUE
2216
+ _wrap_digitalRead(int argc, VALUE *argv, VALUE self) {
2217
+ int arg1 ;
2218
+ int val1 ;
2219
+ int ecode1 = 0 ;
2220
+ int result;
2221
+ VALUE vresult = Qnil;
2222
+
2223
+ if ((argc < 1) || (argc > 1)) {
2224
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2225
+ }
2226
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2227
+ if (!SWIG_IsOK(ecode1)) {
2228
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","digitalRead", 1, argv[0] ));
2229
+ }
2230
+ arg1 = (int)(val1);
2231
+ result = (int)digitalRead(arg1);
2232
+ vresult = SWIG_From_int((int)(result));
2233
+ return vresult;
2151
2234
  fail:
2152
2235
  return Qnil;
2153
2236
  }
@@ -2212,7 +2295,7 @@ fail:
2212
2295
 
2213
2296
 
2214
2297
  SWIGINTERN VALUE
2215
- _wrap_digitalRead(int argc, VALUE *argv, VALUE self) {
2298
+ _wrap_analogRead(int argc, VALUE *argv, VALUE self) {
2216
2299
  int arg1 ;
2217
2300
  int val1 ;
2218
2301
  int ecode1 = 0 ;
@@ -2224,10 +2307,10 @@ _wrap_digitalRead(int argc, VALUE *argv, VALUE self) {
2224
2307
  }
2225
2308
  ecode1 = SWIG_AsVal_int(argv[0], &val1);
2226
2309
  if (!SWIG_IsOK(ecode1)) {
2227
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","digitalRead", 1, argv[0] ));
2310
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","analogRead", 1, argv[0] ));
2228
2311
  }
2229
2312
  arg1 = (int)(val1);
2230
- result = (int)digitalRead(arg1);
2313
+ result = (int)analogRead(arg1);
2231
2314
  vresult = SWIG_From_int((int)(result));
2232
2315
  return vresult;
2233
2316
  fail:
@@ -2236,84 +2319,1397 @@ fail:
2236
2319
 
2237
2320
 
2238
2321
  SWIGINTERN VALUE
2239
- _wrap_shiftOut(int argc, VALUE *argv, VALUE self) {
2240
- uint8_t arg1 ;
2241
- uint8_t arg2 ;
2242
- uint8_t arg3 ;
2243
- uint8_t arg4 ;
2244
- unsigned char val1 ;
2322
+ _wrap_analogWrite(int argc, VALUE *argv, VALUE self) {
2323
+ int arg1 ;
2324
+ int arg2 ;
2325
+ int val1 ;
2245
2326
  int ecode1 = 0 ;
2246
- unsigned char val2 ;
2327
+ int val2 ;
2247
2328
  int ecode2 = 0 ;
2248
- unsigned char val3 ;
2249
- int ecode3 = 0 ;
2250
- unsigned char val4 ;
2251
- int ecode4 = 0 ;
2252
2329
 
2253
- if ((argc < 4) || (argc > 4)) {
2254
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
2330
+ if ((argc < 2) || (argc > 2)) {
2331
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2332
+ }
2333
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2334
+ if (!SWIG_IsOK(ecode1)) {
2335
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","analogWrite", 1, argv[0] ));
2336
+ }
2337
+ arg1 = (int)(val1);
2338
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
2339
+ if (!SWIG_IsOK(ecode2)) {
2340
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","analogWrite", 2, argv[1] ));
2341
+ }
2342
+ arg2 = (int)(val2);
2343
+ analogWrite(arg1,arg2);
2344
+ return Qnil;
2345
+ fail:
2346
+ return Qnil;
2347
+ }
2348
+
2349
+
2350
+ SWIGINTERN VALUE
2351
+ _wrap_piBoardRev(int argc, VALUE *argv, VALUE self) {
2352
+ int result;
2353
+ VALUE vresult = Qnil;
2354
+
2355
+ if ((argc < 0) || (argc > 0)) {
2356
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2357
+ }
2358
+ result = (int)piBoardRev();
2359
+ vresult = SWIG_From_int((int)(result));
2360
+ return vresult;
2361
+ fail:
2362
+ return Qnil;
2363
+ }
2364
+
2365
+
2366
+ SWIGINTERN VALUE
2367
+ _wrap_wpiPinToGpio(int argc, VALUE *argv, VALUE self) {
2368
+ int arg1 ;
2369
+ int val1 ;
2370
+ int ecode1 = 0 ;
2371
+ int result;
2372
+ VALUE vresult = Qnil;
2373
+
2374
+ if ((argc < 1) || (argc > 1)) {
2375
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2376
+ }
2377
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2378
+ if (!SWIG_IsOK(ecode1)) {
2379
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","wpiPinToGpio", 1, argv[0] ));
2380
+ }
2381
+ arg1 = (int)(val1);
2382
+ result = (int)wpiPinToGpio(arg1);
2383
+ vresult = SWIG_From_int((int)(result));
2384
+ return vresult;
2385
+ fail:
2386
+ return Qnil;
2387
+ }
2388
+
2389
+
2390
+ SWIGINTERN VALUE
2391
+ _wrap_physPinToGpio(int argc, VALUE *argv, VALUE self) {
2392
+ int arg1 ;
2393
+ int val1 ;
2394
+ int ecode1 = 0 ;
2395
+ int result;
2396
+ VALUE vresult = Qnil;
2397
+
2398
+ if ((argc < 1) || (argc > 1)) {
2399
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2400
+ }
2401
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2402
+ if (!SWIG_IsOK(ecode1)) {
2403
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","physPinToGpio", 1, argv[0] ));
2404
+ }
2405
+ arg1 = (int)(val1);
2406
+ result = (int)physPinToGpio(arg1);
2407
+ vresult = SWIG_From_int((int)(result));
2408
+ return vresult;
2409
+ fail:
2410
+ return Qnil;
2411
+ }
2412
+
2413
+
2414
+ SWIGINTERN VALUE
2415
+ _wrap_waitForInterrupt_get(VALUE self) {
2416
+ VALUE _val;
2417
+
2418
+ _val = SWIG_NewFunctionPtrObj((void *)(waitForInterrupt), SWIGTYPE_p_f_int_int__int);
2419
+ return _val;
2420
+ }
2421
+
2422
+
2423
+ SWIGINTERN VALUE
2424
+ _wrap_waitForInterrupt_set(VALUE self, VALUE _val) {
2425
+ {
2426
+ int res = SWIG_ConvertFunctionPtr(_val, (void**)(&waitForInterrupt), SWIGTYPE_p_f_int_int__int);
2427
+ if (!SWIG_IsOK(res)) {
2428
+ SWIG_exception_fail(SWIG_ArgError(res), "in variable '""waitForInterrupt""' of type '""int (*)(int,int)""'");
2429
+ }
2430
+ }
2431
+ return _val;
2432
+ fail:
2433
+ return Qnil;
2434
+ }
2435
+
2436
+
2437
+ SWIGINTERN VALUE
2438
+ _wrap_wiringPiISR(int argc, VALUE *argv, VALUE self) {
2439
+ int arg1 ;
2440
+ int arg2 ;
2441
+ void (*arg3)(void) = (void (*)(void)) 0 ;
2442
+ int val1 ;
2443
+ int ecode1 = 0 ;
2444
+ int val2 ;
2445
+ int ecode2 = 0 ;
2446
+ int result;
2447
+ VALUE vresult = Qnil;
2448
+
2449
+ if ((argc < 3) || (argc > 3)) {
2450
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2451
+ }
2452
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2453
+ if (!SWIG_IsOK(ecode1)) {
2454
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","wiringPiISR", 1, argv[0] ));
2455
+ }
2456
+ arg1 = (int)(val1);
2457
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
2458
+ if (!SWIG_IsOK(ecode2)) {
2459
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","wiringPiISR", 2, argv[1] ));
2460
+ }
2461
+ arg2 = (int)(val2);
2462
+ {
2463
+ int res = SWIG_ConvertFunctionPtr(argv[2], (void**)(&arg3), SWIGTYPE_p_f_void__void);
2464
+ if (!SWIG_IsOK(res)) {
2465
+ SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "void (*)(void)","wiringPiISR", 3, argv[2] ));
2466
+ }
2467
+ }
2468
+ result = (int)wiringPiISR(arg1,arg2,arg3);
2469
+ vresult = SWIG_From_int((int)(result));
2470
+ return vresult;
2471
+ fail:
2472
+ return Qnil;
2473
+ }
2474
+
2475
+
2476
+ SWIGINTERN VALUE
2477
+ _wrap_piThreadCreate(int argc, VALUE *argv, VALUE self) {
2478
+ void *(*arg1)(void *) = (void *(*)(void *)) 0 ;
2479
+ int result;
2480
+ VALUE vresult = Qnil;
2481
+
2482
+ if ((argc < 1) || (argc > 1)) {
2483
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2484
+ }
2485
+ {
2486
+ int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg1), SWIGTYPE_p_f_p_void__p_void);
2487
+ if (!SWIG_IsOK(res)) {
2488
+ SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "void *(*)(void *)","piThreadCreate", 1, argv[0] ));
2489
+ }
2490
+ }
2491
+ result = (int)piThreadCreate(arg1);
2492
+ vresult = SWIG_From_int((int)(result));
2493
+ return vresult;
2494
+ fail:
2495
+ return Qnil;
2496
+ }
2497
+
2498
+
2499
+ SWIGINTERN VALUE
2500
+ _wrap_piLock(int argc, VALUE *argv, VALUE self) {
2501
+ int arg1 ;
2502
+ int val1 ;
2503
+ int ecode1 = 0 ;
2504
+
2505
+ if ((argc < 1) || (argc > 1)) {
2506
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2507
+ }
2508
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2509
+ if (!SWIG_IsOK(ecode1)) {
2510
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","piLock", 1, argv[0] ));
2511
+ }
2512
+ arg1 = (int)(val1);
2513
+ piLock(arg1);
2514
+ return Qnil;
2515
+ fail:
2516
+ return Qnil;
2517
+ }
2518
+
2519
+
2520
+ SWIGINTERN VALUE
2521
+ _wrap_piUnlock(int argc, VALUE *argv, VALUE self) {
2522
+ int arg1 ;
2523
+ int val1 ;
2524
+ int ecode1 = 0 ;
2525
+
2526
+ if ((argc < 1) || (argc > 1)) {
2527
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2528
+ }
2529
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2530
+ if (!SWIG_IsOK(ecode1)) {
2531
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","piUnlock", 1, argv[0] ));
2532
+ }
2533
+ arg1 = (int)(val1);
2534
+ piUnlock(arg1);
2535
+ return Qnil;
2536
+ fail:
2537
+ return Qnil;
2538
+ }
2539
+
2540
+
2541
+ SWIGINTERN VALUE
2542
+ _wrap_piHiPri(int argc, VALUE *argv, VALUE self) {
2543
+ int arg1 ;
2544
+ int val1 ;
2545
+ int ecode1 = 0 ;
2546
+ int result;
2547
+ VALUE vresult = Qnil;
2548
+
2549
+ if ((argc < 1) || (argc > 1)) {
2550
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2551
+ }
2552
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2553
+ if (!SWIG_IsOK(ecode1)) {
2554
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","piHiPri", 1, argv[0] ));
2555
+ }
2556
+ arg1 = (int)(val1);
2557
+ result = (int)piHiPri(arg1);
2558
+ vresult = SWIG_From_int((int)(result));
2559
+ return vresult;
2560
+ fail:
2561
+ return Qnil;
2562
+ }
2563
+
2564
+
2565
+ SWIGINTERN VALUE
2566
+ _wrap_delay(int argc, VALUE *argv, VALUE self) {
2567
+ unsigned int arg1 ;
2568
+ unsigned int val1 ;
2569
+ int ecode1 = 0 ;
2570
+
2571
+ if ((argc < 1) || (argc > 1)) {
2572
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2573
+ }
2574
+ ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
2575
+ if (!SWIG_IsOK(ecode1)) {
2576
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","delay", 1, argv[0] ));
2577
+ }
2578
+ arg1 = (unsigned int)(val1);
2579
+ delay(arg1);
2580
+ return Qnil;
2581
+ fail:
2582
+ return Qnil;
2583
+ }
2584
+
2585
+
2586
+ SWIGINTERN VALUE
2587
+ _wrap_delayMicroseconds(int argc, VALUE *argv, VALUE self) {
2588
+ unsigned int arg1 ;
2589
+ unsigned int val1 ;
2590
+ int ecode1 = 0 ;
2591
+
2592
+ if ((argc < 1) || (argc > 1)) {
2593
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2594
+ }
2595
+ ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
2596
+ if (!SWIG_IsOK(ecode1)) {
2597
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","delayMicroseconds", 1, argv[0] ));
2598
+ }
2599
+ arg1 = (unsigned int)(val1);
2600
+ delayMicroseconds(arg1);
2601
+ return Qnil;
2602
+ fail:
2603
+ return Qnil;
2604
+ }
2605
+
2606
+
2607
+ SWIGINTERN VALUE
2608
+ _wrap_millis(int argc, VALUE *argv, VALUE self) {
2609
+ unsigned int result;
2610
+ VALUE vresult = Qnil;
2611
+
2612
+ if ((argc < 0) || (argc > 0)) {
2613
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2614
+ }
2615
+ result = (unsigned int)millis();
2616
+ vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
2617
+ return vresult;
2618
+ fail:
2619
+ return Qnil;
2620
+ }
2621
+
2622
+
2623
+ SWIGINTERN VALUE
2624
+ _wrap_micros(int argc, VALUE *argv, VALUE self) {
2625
+ unsigned int result;
2626
+ VALUE vresult = Qnil;
2627
+
2628
+ if ((argc < 0) || (argc > 0)) {
2629
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2630
+ }
2631
+ result = (unsigned int)micros();
2632
+ vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
2633
+ return vresult;
2634
+ fail:
2635
+ return Qnil;
2636
+ }
2637
+
2638
+
2639
+ SWIGINTERN VALUE
2640
+ _wrap_serialOpen(int argc, VALUE *argv, VALUE self) {
2641
+ char *arg1 = (char *) 0 ;
2642
+ int arg2 ;
2643
+ int res1 ;
2644
+ char *buf1 = 0 ;
2645
+ int alloc1 = 0 ;
2646
+ int val2 ;
2647
+ int ecode2 = 0 ;
2648
+ int result;
2649
+ VALUE vresult = Qnil;
2650
+
2651
+ if ((argc < 2) || (argc > 2)) {
2652
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2653
+ }
2654
+ res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
2655
+ if (!SWIG_IsOK(res1)) {
2656
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char *","serialOpen", 1, argv[0] ));
2657
+ }
2658
+ arg1 = (char *)(buf1);
2659
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
2660
+ if (!SWIG_IsOK(ecode2)) {
2661
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","serialOpen", 2, argv[1] ));
2662
+ }
2663
+ arg2 = (int)(val2);
2664
+ result = (int)serialOpen(arg1,arg2);
2665
+ vresult = SWIG_From_int((int)(result));
2666
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2667
+ return vresult;
2668
+ fail:
2669
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2670
+ return Qnil;
2671
+ }
2672
+
2673
+
2674
+ SWIGINTERN VALUE
2675
+ _wrap_serialClose(int argc, VALUE *argv, VALUE self) {
2676
+ int arg1 ;
2677
+ int val1 ;
2678
+ int ecode1 = 0 ;
2679
+
2680
+ if ((argc < 1) || (argc > 1)) {
2681
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2682
+ }
2683
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2684
+ if (!SWIG_IsOK(ecode1)) {
2685
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","serialClose", 1, argv[0] ));
2686
+ }
2687
+ arg1 = (int)(val1);
2688
+ serialClose(arg1);
2689
+ return Qnil;
2690
+ fail:
2691
+ return Qnil;
2692
+ }
2693
+
2694
+
2695
+ SWIGINTERN VALUE
2696
+ _wrap_serialFlush(int argc, VALUE *argv, VALUE self) {
2697
+ int arg1 ;
2698
+ int val1 ;
2699
+ int ecode1 = 0 ;
2700
+
2701
+ if ((argc < 1) || (argc > 1)) {
2702
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2703
+ }
2704
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2705
+ if (!SWIG_IsOK(ecode1)) {
2706
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","serialFlush", 1, argv[0] ));
2707
+ }
2708
+ arg1 = (int)(val1);
2709
+ serialFlush(arg1);
2710
+ return Qnil;
2711
+ fail:
2712
+ return Qnil;
2713
+ }
2714
+
2715
+
2716
+ SWIGINTERN VALUE
2717
+ _wrap_serialPutchar(int argc, VALUE *argv, VALUE self) {
2718
+ int arg1 ;
2719
+ unsigned char arg2 ;
2720
+ int val1 ;
2721
+ int ecode1 = 0 ;
2722
+ unsigned char val2 ;
2723
+ int ecode2 = 0 ;
2724
+
2725
+ if ((argc < 2) || (argc > 2)) {
2726
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2727
+ }
2728
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2729
+ if (!SWIG_IsOK(ecode1)) {
2730
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","serialPutchar", 1, argv[0] ));
2731
+ }
2732
+ arg1 = (int)(val1);
2733
+ ecode2 = SWIG_AsVal_unsigned_SS_char(argv[1], &val2);
2734
+ if (!SWIG_IsOK(ecode2)) {
2735
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned char","serialPutchar", 2, argv[1] ));
2736
+ }
2737
+ arg2 = (unsigned char)(val2);
2738
+ serialPutchar(arg1,arg2);
2739
+ return Qnil;
2740
+ fail:
2741
+ return Qnil;
2742
+ }
2743
+
2744
+
2745
+ SWIGINTERN VALUE
2746
+ _wrap_serialPuts(int argc, VALUE *argv, VALUE self) {
2747
+ int arg1 ;
2748
+ char *arg2 = (char *) 0 ;
2749
+ int val1 ;
2750
+ int ecode1 = 0 ;
2751
+ int res2 ;
2752
+ char *buf2 = 0 ;
2753
+ int alloc2 = 0 ;
2754
+
2755
+ if ((argc < 2) || (argc > 2)) {
2756
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2757
+ }
2758
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2759
+ if (!SWIG_IsOK(ecode1)) {
2760
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","serialPuts", 1, argv[0] ));
2761
+ }
2762
+ arg1 = (int)(val1);
2763
+ res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2764
+ if (!SWIG_IsOK(res2)) {
2765
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","serialPuts", 2, argv[1] ));
2766
+ }
2767
+ arg2 = (char *)(buf2);
2768
+ serialPuts(arg1,arg2);
2769
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2770
+ return Qnil;
2771
+ fail:
2772
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2773
+ return Qnil;
2774
+ }
2775
+
2776
+
2777
+ SWIGINTERN VALUE
2778
+ _wrap_serialPrintf(int argc, VALUE *argv, VALUE self) {
2779
+ int arg1 ;
2780
+ char *arg2 = (char *) 0 ;
2781
+ void *arg3 = 0 ;
2782
+ int val1 ;
2783
+ int ecode1 = 0 ;
2784
+ int res2 ;
2785
+ char *buf2 = 0 ;
2786
+ int alloc2 = 0 ;
2787
+
2788
+ if (argc < 2) {
2789
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2790
+ }
2791
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2792
+ if (!SWIG_IsOK(ecode1)) {
2793
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","serialPrintf", 1, argv[0] ));
2794
+ }
2795
+ arg1 = (int)(val1);
2796
+ res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2797
+ if (!SWIG_IsOK(res2)) {
2798
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","serialPrintf", 2, argv[1] ));
2799
+ }
2800
+ arg2 = (char *)(buf2);
2801
+ serialPrintf(arg1,arg2,arg3);
2802
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2803
+ return Qnil;
2804
+ fail:
2805
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2806
+ return Qnil;
2807
+ }
2808
+
2809
+
2810
+ SWIGINTERN VALUE
2811
+ _wrap_serialDataAvail(int argc, VALUE *argv, VALUE self) {
2812
+ int arg1 ;
2813
+ int val1 ;
2814
+ int ecode1 = 0 ;
2815
+ int result;
2816
+ VALUE vresult = Qnil;
2817
+
2818
+ if ((argc < 1) || (argc > 1)) {
2819
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2820
+ }
2821
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2822
+ if (!SWIG_IsOK(ecode1)) {
2823
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","serialDataAvail", 1, argv[0] ));
2824
+ }
2825
+ arg1 = (int)(val1);
2826
+ result = (int)serialDataAvail(arg1);
2827
+ vresult = SWIG_From_int((int)(result));
2828
+ return vresult;
2829
+ fail:
2830
+ return Qnil;
2831
+ }
2832
+
2833
+
2834
+ SWIGINTERN VALUE
2835
+ _wrap_serialGetchar(int argc, VALUE *argv, VALUE self) {
2836
+ int arg1 ;
2837
+ int val1 ;
2838
+ int ecode1 = 0 ;
2839
+ int result;
2840
+ VALUE vresult = Qnil;
2841
+
2842
+ if ((argc < 1) || (argc > 1)) {
2843
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2844
+ }
2845
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2846
+ if (!SWIG_IsOK(ecode1)) {
2847
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","serialGetchar", 1, argv[0] ));
2848
+ }
2849
+ arg1 = (int)(val1);
2850
+ result = (int)serialGetchar(arg1);
2851
+ vresult = SWIG_From_int((int)(result));
2852
+ return vresult;
2853
+ fail:
2854
+ return Qnil;
2855
+ }
2856
+
2857
+
2858
+ SWIGINTERN VALUE
2859
+ _wrap_shiftOut(int argc, VALUE *argv, VALUE self) {
2860
+ uint8_t arg1 ;
2861
+ uint8_t arg2 ;
2862
+ uint8_t arg3 ;
2863
+ uint8_t arg4 ;
2864
+ unsigned char val1 ;
2865
+ int ecode1 = 0 ;
2866
+ unsigned char val2 ;
2867
+ int ecode2 = 0 ;
2868
+ unsigned char val3 ;
2869
+ int ecode3 = 0 ;
2870
+ unsigned char val4 ;
2871
+ int ecode4 = 0 ;
2872
+
2873
+ if ((argc < 4) || (argc > 4)) {
2874
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
2875
+ }
2876
+ ecode1 = SWIG_AsVal_unsigned_SS_char(argv[0], &val1);
2877
+ if (!SWIG_IsOK(ecode1)) {
2878
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "uint8_t","shiftOut", 1, argv[0] ));
2879
+ }
2880
+ arg1 = (uint8_t)(val1);
2881
+ ecode2 = SWIG_AsVal_unsigned_SS_char(argv[1], &val2);
2882
+ if (!SWIG_IsOK(ecode2)) {
2883
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint8_t","shiftOut", 2, argv[1] ));
2884
+ }
2885
+ arg2 = (uint8_t)(val2);
2886
+ ecode3 = SWIG_AsVal_unsigned_SS_char(argv[2], &val3);
2887
+ if (!SWIG_IsOK(ecode3)) {
2888
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "uint8_t","shiftOut", 3, argv[2] ));
2889
+ }
2890
+ arg3 = (uint8_t)(val3);
2891
+ ecode4 = SWIG_AsVal_unsigned_SS_char(argv[3], &val4);
2892
+ if (!SWIG_IsOK(ecode4)) {
2893
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "uint8_t","shiftOut", 4, argv[3] ));
2894
+ }
2895
+ arg4 = (uint8_t)(val4);
2896
+ shiftOut(arg1,arg2,arg3,arg4);
2897
+ return Qnil;
2898
+ fail:
2899
+ return Qnil;
2900
+ }
2901
+
2902
+
2903
+ SWIGINTERN VALUE
2904
+ _wrap_shiftIn(int argc, VALUE *argv, VALUE self) {
2905
+ uint8_t arg1 ;
2906
+ uint8_t arg2 ;
2907
+ uint8_t arg3 ;
2908
+ unsigned char val1 ;
2909
+ int ecode1 = 0 ;
2910
+ unsigned char val2 ;
2911
+ int ecode2 = 0 ;
2912
+ unsigned char val3 ;
2913
+ int ecode3 = 0 ;
2914
+ uint8_t result;
2915
+ VALUE vresult = Qnil;
2916
+
2917
+ if ((argc < 3) || (argc > 3)) {
2918
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2919
+ }
2920
+ ecode1 = SWIG_AsVal_unsigned_SS_char(argv[0], &val1);
2921
+ if (!SWIG_IsOK(ecode1)) {
2922
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "uint8_t","shiftIn", 1, argv[0] ));
2923
+ }
2924
+ arg1 = (uint8_t)(val1);
2925
+ ecode2 = SWIG_AsVal_unsigned_SS_char(argv[1], &val2);
2926
+ if (!SWIG_IsOK(ecode2)) {
2927
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint8_t","shiftIn", 2, argv[1] ));
2928
+ }
2929
+ arg2 = (uint8_t)(val2);
2930
+ ecode3 = SWIG_AsVal_unsigned_SS_char(argv[2], &val3);
2931
+ if (!SWIG_IsOK(ecode3)) {
2932
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "uint8_t","shiftIn", 3, argv[2] ));
2933
+ }
2934
+ arg3 = (uint8_t)(val3);
2935
+ result = shiftIn(arg1,arg2,arg3);
2936
+ vresult = SWIG_From_unsigned_SS_char((unsigned char)(result));
2937
+ return vresult;
2938
+ fail:
2939
+ return Qnil;
2940
+ }
2941
+
2942
+
2943
+ SWIGINTERN VALUE
2944
+ _wrap_wiringPiSPIGetFd(int argc, VALUE *argv, VALUE self) {
2945
+ int arg1 ;
2946
+ int val1 ;
2947
+ int ecode1 = 0 ;
2948
+ int result;
2949
+ VALUE vresult = Qnil;
2950
+
2951
+ if ((argc < 1) || (argc > 1)) {
2952
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2953
+ }
2954
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2955
+ if (!SWIG_IsOK(ecode1)) {
2956
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","wiringPiSPIGetFd", 1, argv[0] ));
2957
+ }
2958
+ arg1 = (int)(val1);
2959
+ result = (int)wiringPiSPIGetFd(arg1);
2960
+ vresult = SWIG_From_int((int)(result));
2961
+ return vresult;
2962
+ fail:
2963
+ return Qnil;
2964
+ }
2965
+
2966
+
2967
+ SWIGINTERN VALUE
2968
+ _wrap_wiringPiSPIDataRW(int argc, VALUE *argv, VALUE self) {
2969
+ int arg1 ;
2970
+ unsigned char *arg2 = (unsigned char *) 0 ;
2971
+ int arg3 ;
2972
+ int val1 ;
2973
+ int ecode1 = 0 ;
2974
+ int result;
2975
+ VALUE vresult = Qnil;
2976
+
2977
+ if ((argc < 2) || (argc > 2)) {
2978
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2979
+ }
2980
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2981
+ if (!SWIG_IsOK(ecode1)) {
2982
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","wiringPiSPIDataRW", 1, argv[0] ));
2983
+ }
2984
+ arg1 = (int)(val1);
2985
+ {
2986
+ arg2 = StringValuePtr(argv[1]);
2987
+ arg3 = strlen(arg2);
2988
+ }
2989
+ result = (int)wiringPiSPIDataRW(arg1,arg2,arg3);
2990
+ vresult = SWIG_From_int((int)(result));
2991
+ return vresult;
2992
+ fail:
2993
+ return Qnil;
2994
+ }
2995
+
2996
+
2997
+ SWIGINTERN VALUE
2998
+ _wrap_wiringPiSPISetup(int argc, VALUE *argv, VALUE self) {
2999
+ int arg1 ;
3000
+ int arg2 ;
3001
+ int val1 ;
3002
+ int ecode1 = 0 ;
3003
+ int val2 ;
3004
+ int ecode2 = 0 ;
3005
+ int result;
3006
+ VALUE vresult = Qnil;
3007
+
3008
+ if ((argc < 2) || (argc > 2)) {
3009
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3010
+ }
3011
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3012
+ if (!SWIG_IsOK(ecode1)) {
3013
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","wiringPiSPISetup", 1, argv[0] ));
3014
+ }
3015
+ arg1 = (int)(val1);
3016
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3017
+ if (!SWIG_IsOK(ecode2)) {
3018
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","wiringPiSPISetup", 2, argv[1] ));
3019
+ }
3020
+ arg2 = (int)(val2);
3021
+ result = (int)wiringPiSPISetup(arg1,arg2);
3022
+ vresult = SWIG_From_int((int)(result));
3023
+ return vresult;
3024
+ fail:
3025
+ return Qnil;
3026
+ }
3027
+
3028
+
3029
+ SWIGINTERN VALUE
3030
+ _wrap_wiringPiI2CSetupInterface(int argc, VALUE *argv, VALUE self) {
3031
+ char *arg1 = (char *) 0 ;
3032
+ int arg2 ;
3033
+ int res1 ;
3034
+ char *buf1 = 0 ;
3035
+ int alloc1 = 0 ;
3036
+ int val2 ;
3037
+ int ecode2 = 0 ;
3038
+ int result;
3039
+ VALUE vresult = Qnil;
3040
+
3041
+ if ((argc < 2) || (argc > 2)) {
3042
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3043
+ }
3044
+ res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
3045
+ if (!SWIG_IsOK(res1)) {
3046
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char *","wiringPiI2CSetupInterface", 1, argv[0] ));
3047
+ }
3048
+ arg1 = (char *)(buf1);
3049
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3050
+ if (!SWIG_IsOK(ecode2)) {
3051
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","wiringPiI2CSetupInterface", 2, argv[1] ));
3052
+ }
3053
+ arg2 = (int)(val2);
3054
+ result = (int)wiringPiI2CSetupInterface(arg1,arg2);
3055
+ vresult = SWIG_From_int((int)(result));
3056
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
3057
+ return vresult;
3058
+ fail:
3059
+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
3060
+ return Qnil;
3061
+ }
3062
+
3063
+
3064
+ SWIGINTERN VALUE
3065
+ _wrap_wiringPiI2CSetup(int argc, VALUE *argv, VALUE self) {
3066
+ int arg1 ;
3067
+ int val1 ;
3068
+ int ecode1 = 0 ;
3069
+ int result;
3070
+ VALUE vresult = Qnil;
3071
+
3072
+ if ((argc < 1) || (argc > 1)) {
3073
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3074
+ }
3075
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3076
+ if (!SWIG_IsOK(ecode1)) {
3077
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","wiringPiI2CSetup", 1, argv[0] ));
3078
+ }
3079
+ arg1 = (int)(val1);
3080
+ result = (int)wiringPiI2CSetup(arg1);
3081
+ vresult = SWIG_From_int((int)(result));
3082
+ return vresult;
3083
+ fail:
3084
+ return Qnil;
3085
+ }
3086
+
3087
+
3088
+ SWIGINTERN VALUE
3089
+ _wrap_wiringPiI2CRead(int argc, VALUE *argv, VALUE self) {
3090
+ int arg1 ;
3091
+ int val1 ;
3092
+ int ecode1 = 0 ;
3093
+ int result;
3094
+ VALUE vresult = Qnil;
3095
+
3096
+ if ((argc < 1) || (argc > 1)) {
3097
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3098
+ }
3099
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3100
+ if (!SWIG_IsOK(ecode1)) {
3101
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","wiringPiI2CRead", 1, argv[0] ));
3102
+ }
3103
+ arg1 = (int)(val1);
3104
+ result = (int)wiringPiI2CRead(arg1);
3105
+ vresult = SWIG_From_int((int)(result));
3106
+ return vresult;
3107
+ fail:
3108
+ return Qnil;
3109
+ }
3110
+
3111
+
3112
+ SWIGINTERN VALUE
3113
+ _wrap_wiringPiI2CReadReg8(int argc, VALUE *argv, VALUE self) {
3114
+ int arg1 ;
3115
+ int arg2 ;
3116
+ int val1 ;
3117
+ int ecode1 = 0 ;
3118
+ int val2 ;
3119
+ int ecode2 = 0 ;
3120
+ int result;
3121
+ VALUE vresult = Qnil;
3122
+
3123
+ if ((argc < 2) || (argc > 2)) {
3124
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3125
+ }
3126
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3127
+ if (!SWIG_IsOK(ecode1)) {
3128
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","wiringPiI2CReadReg8", 1, argv[0] ));
3129
+ }
3130
+ arg1 = (int)(val1);
3131
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3132
+ if (!SWIG_IsOK(ecode2)) {
3133
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","wiringPiI2CReadReg8", 2, argv[1] ));
3134
+ }
3135
+ arg2 = (int)(val2);
3136
+ result = (int)wiringPiI2CReadReg8(arg1,arg2);
3137
+ vresult = SWIG_From_int((int)(result));
3138
+ return vresult;
3139
+ fail:
3140
+ return Qnil;
3141
+ }
3142
+
3143
+
3144
+ SWIGINTERN VALUE
3145
+ _wrap_wiringPiI2CReadReg16(int argc, VALUE *argv, VALUE self) {
3146
+ int arg1 ;
3147
+ int arg2 ;
3148
+ int val1 ;
3149
+ int ecode1 = 0 ;
3150
+ int val2 ;
3151
+ int ecode2 = 0 ;
3152
+ int result;
3153
+ VALUE vresult = Qnil;
3154
+
3155
+ if ((argc < 2) || (argc > 2)) {
3156
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3157
+ }
3158
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3159
+ if (!SWIG_IsOK(ecode1)) {
3160
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","wiringPiI2CReadReg16", 1, argv[0] ));
3161
+ }
3162
+ arg1 = (int)(val1);
3163
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3164
+ if (!SWIG_IsOK(ecode2)) {
3165
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","wiringPiI2CReadReg16", 2, argv[1] ));
3166
+ }
3167
+ arg2 = (int)(val2);
3168
+ result = (int)wiringPiI2CReadReg16(arg1,arg2);
3169
+ vresult = SWIG_From_int((int)(result));
3170
+ return vresult;
3171
+ fail:
3172
+ return Qnil;
3173
+ }
3174
+
3175
+
3176
+ SWIGINTERN VALUE
3177
+ _wrap_wiringPiI2CWrite(int argc, VALUE *argv, VALUE self) {
3178
+ int arg1 ;
3179
+ int arg2 ;
3180
+ int val1 ;
3181
+ int ecode1 = 0 ;
3182
+ int val2 ;
3183
+ int ecode2 = 0 ;
3184
+ int result;
3185
+ VALUE vresult = Qnil;
3186
+
3187
+ if ((argc < 2) || (argc > 2)) {
3188
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3189
+ }
3190
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3191
+ if (!SWIG_IsOK(ecode1)) {
3192
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","wiringPiI2CWrite", 1, argv[0] ));
3193
+ }
3194
+ arg1 = (int)(val1);
3195
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3196
+ if (!SWIG_IsOK(ecode2)) {
3197
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","wiringPiI2CWrite", 2, argv[1] ));
3198
+ }
3199
+ arg2 = (int)(val2);
3200
+ result = (int)wiringPiI2CWrite(arg1,arg2);
3201
+ vresult = SWIG_From_int((int)(result));
3202
+ return vresult;
3203
+ fail:
3204
+ return Qnil;
3205
+ }
3206
+
3207
+
3208
+ SWIGINTERN VALUE
3209
+ _wrap_wiringPiI2CWriteReg8(int argc, VALUE *argv, VALUE self) {
3210
+ int arg1 ;
3211
+ int arg2 ;
3212
+ int arg3 ;
3213
+ int val1 ;
3214
+ int ecode1 = 0 ;
3215
+ int val2 ;
3216
+ int ecode2 = 0 ;
3217
+ int val3 ;
3218
+ int ecode3 = 0 ;
3219
+ int result;
3220
+ VALUE vresult = Qnil;
3221
+
3222
+ if ((argc < 3) || (argc > 3)) {
3223
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3224
+ }
3225
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3226
+ if (!SWIG_IsOK(ecode1)) {
3227
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","wiringPiI2CWriteReg8", 1, argv[0] ));
3228
+ }
3229
+ arg1 = (int)(val1);
3230
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3231
+ if (!SWIG_IsOK(ecode2)) {
3232
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","wiringPiI2CWriteReg8", 2, argv[1] ));
3233
+ }
3234
+ arg2 = (int)(val2);
3235
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
3236
+ if (!SWIG_IsOK(ecode3)) {
3237
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","wiringPiI2CWriteReg8", 3, argv[2] ));
3238
+ }
3239
+ arg3 = (int)(val3);
3240
+ result = (int)wiringPiI2CWriteReg8(arg1,arg2,arg3);
3241
+ vresult = SWIG_From_int((int)(result));
3242
+ return vresult;
3243
+ fail:
3244
+ return Qnil;
3245
+ }
3246
+
3247
+
3248
+ SWIGINTERN VALUE
3249
+ _wrap_wiringPiI2CWriteReg16(int argc, VALUE *argv, VALUE self) {
3250
+ int arg1 ;
3251
+ int arg2 ;
3252
+ int arg3 ;
3253
+ int val1 ;
3254
+ int ecode1 = 0 ;
3255
+ int val2 ;
3256
+ int ecode2 = 0 ;
3257
+ int val3 ;
3258
+ int ecode3 = 0 ;
3259
+ int result;
3260
+ VALUE vresult = Qnil;
3261
+
3262
+ if ((argc < 3) || (argc > 3)) {
3263
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3264
+ }
3265
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3266
+ if (!SWIG_IsOK(ecode1)) {
3267
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","wiringPiI2CWriteReg16", 1, argv[0] ));
3268
+ }
3269
+ arg1 = (int)(val1);
3270
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3271
+ if (!SWIG_IsOK(ecode2)) {
3272
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","wiringPiI2CWriteReg16", 2, argv[1] ));
3273
+ }
3274
+ arg2 = (int)(val2);
3275
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
3276
+ if (!SWIG_IsOK(ecode3)) {
3277
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","wiringPiI2CWriteReg16", 3, argv[2] ));
3278
+ }
3279
+ arg3 = (int)(val3);
3280
+ result = (int)wiringPiI2CWriteReg16(arg1,arg2,arg3);
3281
+ vresult = SWIG_From_int((int)(result));
3282
+ return vresult;
3283
+ fail:
3284
+ return Qnil;
3285
+ }
3286
+
3287
+
3288
+ SWIGINTERN VALUE
3289
+ _wrap_softToneCreate(int argc, VALUE *argv, VALUE self) {
3290
+ int arg1 ;
3291
+ int val1 ;
3292
+ int ecode1 = 0 ;
3293
+ int result;
3294
+ VALUE vresult = Qnil;
3295
+
3296
+ if ((argc < 1) || (argc > 1)) {
3297
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3298
+ }
3299
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3300
+ if (!SWIG_IsOK(ecode1)) {
3301
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","softToneCreate", 1, argv[0] ));
3302
+ }
3303
+ arg1 = (int)(val1);
3304
+ result = (int)softToneCreate(arg1);
3305
+ vresult = SWIG_From_int((int)(result));
3306
+ return vresult;
3307
+ fail:
3308
+ return Qnil;
3309
+ }
3310
+
3311
+
3312
+ SWIGINTERN VALUE
3313
+ _wrap_softToneWrite(int argc, VALUE *argv, VALUE self) {
3314
+ int arg1 ;
3315
+ int arg2 ;
3316
+ int val1 ;
3317
+ int ecode1 = 0 ;
3318
+ int val2 ;
3319
+ int ecode2 = 0 ;
3320
+
3321
+ if ((argc < 2) || (argc > 2)) {
3322
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3323
+ }
3324
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3325
+ if (!SWIG_IsOK(ecode1)) {
3326
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","softToneWrite", 1, argv[0] ));
3327
+ }
3328
+ arg1 = (int)(val1);
3329
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3330
+ if (!SWIG_IsOK(ecode2)) {
3331
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","softToneWrite", 2, argv[1] ));
3332
+ }
3333
+ arg2 = (int)(val2);
3334
+ softToneWrite(arg1,arg2);
3335
+ return Qnil;
3336
+ fail:
3337
+ return Qnil;
3338
+ }
3339
+
3340
+
3341
+ SWIGINTERN VALUE
3342
+ _wrap_softServoWrite(int argc, VALUE *argv, VALUE self) {
3343
+ int arg1 ;
3344
+ int arg2 ;
3345
+ int val1 ;
3346
+ int ecode1 = 0 ;
3347
+ int val2 ;
3348
+ int ecode2 = 0 ;
3349
+
3350
+ if ((argc < 2) || (argc > 2)) {
3351
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3352
+ }
3353
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3354
+ if (!SWIG_IsOK(ecode1)) {
3355
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","softServoWrite", 1, argv[0] ));
3356
+ }
3357
+ arg1 = (int)(val1);
3358
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3359
+ if (!SWIG_IsOK(ecode2)) {
3360
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","softServoWrite", 2, argv[1] ));
3361
+ }
3362
+ arg2 = (int)(val2);
3363
+ softServoWrite(arg1,arg2);
3364
+ return Qnil;
3365
+ fail:
3366
+ return Qnil;
3367
+ }
3368
+
3369
+
3370
+ SWIGINTERN VALUE
3371
+ _wrap_softServoSetup(int argc, VALUE *argv, VALUE self) {
3372
+ int arg1 ;
3373
+ int arg2 ;
3374
+ int arg3 ;
3375
+ int arg4 ;
3376
+ int arg5 ;
3377
+ int arg6 ;
3378
+ int arg7 ;
3379
+ int arg8 ;
3380
+ int val1 ;
3381
+ int ecode1 = 0 ;
3382
+ int val2 ;
3383
+ int ecode2 = 0 ;
3384
+ int val3 ;
3385
+ int ecode3 = 0 ;
3386
+ int val4 ;
3387
+ int ecode4 = 0 ;
3388
+ int val5 ;
3389
+ int ecode5 = 0 ;
3390
+ int val6 ;
3391
+ int ecode6 = 0 ;
3392
+ int val7 ;
3393
+ int ecode7 = 0 ;
3394
+ int val8 ;
3395
+ int ecode8 = 0 ;
3396
+ int result;
3397
+ VALUE vresult = Qnil;
3398
+
3399
+ if ((argc < 8) || (argc > 8)) {
3400
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 8)",argc); SWIG_fail;
3401
+ }
3402
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3403
+ if (!SWIG_IsOK(ecode1)) {
3404
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","softServoSetup", 1, argv[0] ));
3405
+ }
3406
+ arg1 = (int)(val1);
3407
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3408
+ if (!SWIG_IsOK(ecode2)) {
3409
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","softServoSetup", 2, argv[1] ));
3410
+ }
3411
+ arg2 = (int)(val2);
3412
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
3413
+ if (!SWIG_IsOK(ecode3)) {
3414
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","softServoSetup", 3, argv[2] ));
3415
+ }
3416
+ arg3 = (int)(val3);
3417
+ ecode4 = SWIG_AsVal_int(argv[3], &val4);
3418
+ if (!SWIG_IsOK(ecode4)) {
3419
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","softServoSetup", 4, argv[3] ));
3420
+ }
3421
+ arg4 = (int)(val4);
3422
+ ecode5 = SWIG_AsVal_int(argv[4], &val5);
3423
+ if (!SWIG_IsOK(ecode5)) {
3424
+ SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","softServoSetup", 5, argv[4] ));
3425
+ }
3426
+ arg5 = (int)(val5);
3427
+ ecode6 = SWIG_AsVal_int(argv[5], &val6);
3428
+ if (!SWIG_IsOK(ecode6)) {
3429
+ SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "int","softServoSetup", 6, argv[5] ));
3430
+ }
3431
+ arg6 = (int)(val6);
3432
+ ecode7 = SWIG_AsVal_int(argv[6], &val7);
3433
+ if (!SWIG_IsOK(ecode7)) {
3434
+ SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "int","softServoSetup", 7, argv[6] ));
3435
+ }
3436
+ arg7 = (int)(val7);
3437
+ ecode8 = SWIG_AsVal_int(argv[7], &val8);
3438
+ if (!SWIG_IsOK(ecode8)) {
3439
+ SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "int","softServoSetup", 8, argv[7] ));
3440
+ }
3441
+ arg8 = (int)(val8);
3442
+ result = (int)softServoSetup(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
3443
+ vresult = SWIG_From_int((int)(result));
3444
+ return vresult;
3445
+ fail:
3446
+ return Qnil;
3447
+ }
3448
+
3449
+
3450
+ SWIGINTERN VALUE
3451
+ _wrap_softPwmCreate(int argc, VALUE *argv, VALUE self) {
3452
+ int arg1 ;
3453
+ int arg2 ;
3454
+ int arg3 ;
3455
+ int val1 ;
3456
+ int ecode1 = 0 ;
3457
+ int val2 ;
3458
+ int ecode2 = 0 ;
3459
+ int val3 ;
3460
+ int ecode3 = 0 ;
3461
+ int result;
3462
+ VALUE vresult = Qnil;
3463
+
3464
+ if ((argc < 3) || (argc > 3)) {
3465
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3466
+ }
3467
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3468
+ if (!SWIG_IsOK(ecode1)) {
3469
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","softPwmCreate", 1, argv[0] ));
3470
+ }
3471
+ arg1 = (int)(val1);
3472
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3473
+ if (!SWIG_IsOK(ecode2)) {
3474
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","softPwmCreate", 2, argv[1] ));
3475
+ }
3476
+ arg2 = (int)(val2);
3477
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
3478
+ if (!SWIG_IsOK(ecode3)) {
3479
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","softPwmCreate", 3, argv[2] ));
3480
+ }
3481
+ arg3 = (int)(val3);
3482
+ result = (int)softPwmCreate(arg1,arg2,arg3);
3483
+ vresult = SWIG_From_int((int)(result));
3484
+ return vresult;
3485
+ fail:
3486
+ return Qnil;
3487
+ }
3488
+
3489
+
3490
+ SWIGINTERN VALUE
3491
+ _wrap_softPwmWrite(int argc, VALUE *argv, VALUE self) {
3492
+ int arg1 ;
3493
+ int arg2 ;
3494
+ int val1 ;
3495
+ int ecode1 = 0 ;
3496
+ int val2 ;
3497
+ int ecode2 = 0 ;
3498
+
3499
+ if ((argc < 2) || (argc > 2)) {
3500
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3501
+ }
3502
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3503
+ if (!SWIG_IsOK(ecode1)) {
3504
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","softPwmWrite", 1, argv[0] ));
3505
+ }
3506
+ arg1 = (int)(val1);
3507
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3508
+ if (!SWIG_IsOK(ecode2)) {
3509
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","softPwmWrite", 2, argv[1] ));
3510
+ }
3511
+ arg2 = (int)(val2);
3512
+ softPwmWrite(arg1,arg2);
3513
+ return Qnil;
3514
+ fail:
3515
+ return Qnil;
3516
+ }
3517
+
3518
+
3519
+ SWIGINTERN VALUE
3520
+ _wrap_mcp23s17Setup(int argc, VALUE *argv, VALUE self) {
3521
+ int arg1 ;
3522
+ int arg2 ;
3523
+ int arg3 ;
3524
+ int val1 ;
3525
+ int ecode1 = 0 ;
3526
+ int val2 ;
3527
+ int ecode2 = 0 ;
3528
+ int val3 ;
3529
+ int ecode3 = 0 ;
3530
+ int result;
3531
+ VALUE vresult = Qnil;
3532
+
3533
+ if ((argc < 3) || (argc > 3)) {
3534
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3535
+ }
3536
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3537
+ if (!SWIG_IsOK(ecode1)) {
3538
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","mcp23s17Setup", 1, argv[0] ));
3539
+ }
3540
+ arg1 = (int)(val1);
3541
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3542
+ if (!SWIG_IsOK(ecode2)) {
3543
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","mcp23s17Setup", 2, argv[1] ));
3544
+ }
3545
+ arg2 = (int)(val2);
3546
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
3547
+ if (!SWIG_IsOK(ecode3)) {
3548
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","mcp23s17Setup", 3, argv[2] ));
3549
+ }
3550
+ arg3 = (int)(val3);
3551
+ result = (int)mcp23s17Setup(arg1,arg2,arg3);
3552
+ vresult = SWIG_From_int((int)(result));
3553
+ return vresult;
3554
+ fail:
3555
+ return Qnil;
3556
+ }
3557
+
3558
+
3559
+ SWIGINTERN VALUE
3560
+ _wrap_mcp23017Setup(int argc, VALUE *argv, VALUE self) {
3561
+ int arg1 ;
3562
+ int arg2 ;
3563
+ int val1 ;
3564
+ int ecode1 = 0 ;
3565
+ int val2 ;
3566
+ int ecode2 = 0 ;
3567
+ int result;
3568
+ VALUE vresult = Qnil;
3569
+
3570
+ if ((argc < 2) || (argc > 2)) {
3571
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
3572
+ }
3573
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3574
+ if (!SWIG_IsOK(ecode1)) {
3575
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","mcp23017Setup", 1, argv[0] ));
3576
+ }
3577
+ arg1 = (int)(val1);
3578
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3579
+ if (!SWIG_IsOK(ecode2)) {
3580
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","mcp23017Setup", 2, argv[1] ));
3581
+ }
3582
+ arg2 = (int)(val2);
3583
+ result = (int)mcp23017Setup(arg1,arg2);
3584
+ vresult = SWIG_From_int((int)(result));
3585
+ return vresult;
3586
+ fail:
3587
+ return Qnil;
3588
+ }
3589
+
3590
+
3591
+ SWIGINTERN VALUE
3592
+ _wrap_mcp23s08Setup(int argc, VALUE *argv, VALUE self) {
3593
+ int arg1 ;
3594
+ int arg2 ;
3595
+ int arg3 ;
3596
+ int val1 ;
3597
+ int ecode1 = 0 ;
3598
+ int val2 ;
3599
+ int ecode2 = 0 ;
3600
+ int val3 ;
3601
+ int ecode3 = 0 ;
3602
+ int result;
3603
+ VALUE vresult = Qnil;
3604
+
3605
+ if ((argc < 3) || (argc > 3)) {
3606
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3607
+ }
3608
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3609
+ if (!SWIG_IsOK(ecode1)) {
3610
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","mcp23s08Setup", 1, argv[0] ));
3611
+ }
3612
+ arg1 = (int)(val1);
3613
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3614
+ if (!SWIG_IsOK(ecode2)) {
3615
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","mcp23s08Setup", 2, argv[1] ));
3616
+ }
3617
+ arg2 = (int)(val2);
3618
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
3619
+ if (!SWIG_IsOK(ecode3)) {
3620
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","mcp23s08Setup", 3, argv[2] ));
3621
+ }
3622
+ arg3 = (int)(val3);
3623
+ result = (int)mcp23s08Setup(arg1,arg2,arg3);
3624
+ vresult = SWIG_From_int((int)(result));
3625
+ return vresult;
3626
+ fail:
3627
+ return Qnil;
3628
+ }
3629
+
3630
+
3631
+ SWIGINTERN VALUE
3632
+ _wrap_mcp23008Setup(int argc, VALUE *argv, VALUE self) {
3633
+ int arg1 ;
3634
+ int arg2 ;
3635
+ int val1 ;
3636
+ int ecode1 = 0 ;
3637
+ int val2 ;
3638
+ int ecode2 = 0 ;
3639
+ int result;
3640
+ VALUE vresult = Qnil;
3641
+
3642
+ if ((argc < 2) || (argc > 2)) {
3643
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2255
3644
  }
2256
- ecode1 = SWIG_AsVal_unsigned_SS_char(argv[0], &val1);
3645
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2257
3646
  if (!SWIG_IsOK(ecode1)) {
2258
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "uint8_t","shiftOut", 1, argv[0] ));
3647
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","mcp23008Setup", 1, argv[0] ));
2259
3648
  }
2260
- arg1 = (uint8_t)(val1);
2261
- ecode2 = SWIG_AsVal_unsigned_SS_char(argv[1], &val2);
3649
+ arg1 = (int)(val1);
3650
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
2262
3651
  if (!SWIG_IsOK(ecode2)) {
2263
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint8_t","shiftOut", 2, argv[1] ));
3652
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","mcp23008Setup", 2, argv[1] ));
2264
3653
  }
2265
- arg2 = (uint8_t)(val2);
2266
- ecode3 = SWIG_AsVal_unsigned_SS_char(argv[2], &val3);
2267
- if (!SWIG_IsOK(ecode3)) {
2268
- SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "uint8_t","shiftOut", 3, argv[2] ));
2269
- }
2270
- arg3 = (uint8_t)(val3);
2271
- ecode4 = SWIG_AsVal_unsigned_SS_char(argv[3], &val4);
2272
- if (!SWIG_IsOK(ecode4)) {
2273
- SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "uint8_t","shiftOut", 4, argv[3] ));
2274
- }
2275
- arg4 = (uint8_t)(val4);
2276
- shiftOut(arg1,arg2,arg3,arg4);
2277
- return Qnil;
3654
+ arg2 = (int)(val2);
3655
+ result = (int)mcp23008Setup(arg1,arg2);
3656
+ vresult = SWIG_From_int((int)(result));
3657
+ return vresult;
2278
3658
  fail:
2279
3659
  return Qnil;
2280
3660
  }
2281
3661
 
2282
3662
 
2283
3663
  SWIGINTERN VALUE
2284
- _wrap_shiftIn(int argc, VALUE *argv, VALUE self) {
2285
- uint8_t arg1 ;
2286
- uint8_t arg2 ;
2287
- uint8_t arg3 ;
2288
- unsigned char val1 ;
3664
+ _wrap_sr595Setup(int argc, VALUE *argv, VALUE self) {
3665
+ int arg1 ;
3666
+ int arg2 ;
3667
+ int arg3 ;
3668
+ int arg4 ;
3669
+ int arg5 ;
3670
+ int val1 ;
2289
3671
  int ecode1 = 0 ;
2290
- unsigned char val2 ;
3672
+ int val2 ;
2291
3673
  int ecode2 = 0 ;
2292
- unsigned char val3 ;
3674
+ int val3 ;
2293
3675
  int ecode3 = 0 ;
2294
- uint8_t result;
3676
+ int val4 ;
3677
+ int ecode4 = 0 ;
3678
+ int val5 ;
3679
+ int ecode5 = 0 ;
3680
+ int result;
2295
3681
  VALUE vresult = Qnil;
2296
3682
 
2297
- if ((argc < 3) || (argc > 3)) {
2298
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
3683
+ if ((argc < 5) || (argc > 5)) {
3684
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
2299
3685
  }
2300
- ecode1 = SWIG_AsVal_unsigned_SS_char(argv[0], &val1);
3686
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2301
3687
  if (!SWIG_IsOK(ecode1)) {
2302
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "uint8_t","shiftIn", 1, argv[0] ));
3688
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","sr595Setup", 1, argv[0] ));
2303
3689
  }
2304
- arg1 = (uint8_t)(val1);
2305
- ecode2 = SWIG_AsVal_unsigned_SS_char(argv[1], &val2);
3690
+ arg1 = (int)(val1);
3691
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
2306
3692
  if (!SWIG_IsOK(ecode2)) {
2307
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint8_t","shiftIn", 2, argv[1] ));
3693
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","sr595Setup", 2, argv[1] ));
2308
3694
  }
2309
- arg2 = (uint8_t)(val2);
2310
- ecode3 = SWIG_AsVal_unsigned_SS_char(argv[2], &val3);
3695
+ arg2 = (int)(val2);
3696
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
2311
3697
  if (!SWIG_IsOK(ecode3)) {
2312
- SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "uint8_t","shiftIn", 3, argv[2] ));
3698
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","sr595Setup", 3, argv[2] ));
2313
3699
  }
2314
- arg3 = (uint8_t)(val3);
2315
- result = shiftIn(arg1,arg2,arg3);
2316
- vresult = SWIG_From_unsigned_SS_char((unsigned char)(result));
3700
+ arg3 = (int)(val3);
3701
+ ecode4 = SWIG_AsVal_int(argv[3], &val4);
3702
+ if (!SWIG_IsOK(ecode4)) {
3703
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","sr595Setup", 4, argv[3] ));
3704
+ }
3705
+ arg4 = (int)(val4);
3706
+ ecode5 = SWIG_AsVal_int(argv[4], &val5);
3707
+ if (!SWIG_IsOK(ecode5)) {
3708
+ SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","sr595Setup", 5, argv[4] ));
3709
+ }
3710
+ arg5 = (int)(val5);
3711
+ result = (int)sr595Setup(arg1,arg2,arg3,arg4,arg5);
3712
+ vresult = SWIG_From_int((int)(result));
2317
3713
  return vresult;
2318
3714
  fail:
2319
3715
  return Qnil;
@@ -2321,20 +3717,20 @@ fail:
2321
3717
 
2322
3718
 
2323
3719
  SWIGINTERN VALUE
2324
- _wrap_delay(int argc, VALUE *argv, VALUE self) {
2325
- unsigned int arg1 ;
2326
- unsigned int val1 ;
3720
+ _wrap_lcdHome(int argc, VALUE *argv, VALUE self) {
3721
+ int arg1 ;
3722
+ int val1 ;
2327
3723
  int ecode1 = 0 ;
2328
3724
 
2329
3725
  if ((argc < 1) || (argc > 1)) {
2330
3726
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2331
3727
  }
2332
- ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
3728
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2333
3729
  if (!SWIG_IsOK(ecode1)) {
2334
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","delay", 1, argv[0] ));
3730
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","lcdHome", 1, argv[0] ));
2335
3731
  }
2336
- arg1 = (unsigned int)(val1);
2337
- delay(arg1);
3732
+ arg1 = (int)(val1);
3733
+ lcdHome(arg1);
2338
3734
  return Qnil;
2339
3735
  fail:
2340
3736
  return Qnil;
@@ -2342,92 +3738,86 @@ fail:
2342
3738
 
2343
3739
 
2344
3740
  SWIGINTERN VALUE
2345
- _wrap_delayMicroseconds(int argc, VALUE *argv, VALUE self) {
2346
- unsigned int arg1 ;
2347
- unsigned int val1 ;
3741
+ _wrap_lcdClear(int argc, VALUE *argv, VALUE self) {
3742
+ int arg1 ;
3743
+ int val1 ;
2348
3744
  int ecode1 = 0 ;
2349
3745
 
2350
3746
  if ((argc < 1) || (argc > 1)) {
2351
3747
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
2352
3748
  }
2353
- ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1);
3749
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
2354
3750
  if (!SWIG_IsOK(ecode1)) {
2355
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "unsigned int","delayMicroseconds", 1, argv[0] ));
3751
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","lcdClear", 1, argv[0] ));
2356
3752
  }
2357
- arg1 = (unsigned int)(val1);
2358
- delayMicroseconds(arg1);
2359
- return Qnil;
2360
- fail:
3753
+ arg1 = (int)(val1);
3754
+ lcdClear(arg1);
2361
3755
  return Qnil;
2362
- }
2363
-
2364
-
2365
- SWIGINTERN VALUE
2366
- _wrap_millis(int argc, VALUE *argv, VALUE self) {
2367
- unsigned int result;
2368
- VALUE vresult = Qnil;
2369
-
2370
- if ((argc < 0) || (argc > 0)) {
2371
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2372
- }
2373
- result = (unsigned int)millis();
2374
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
2375
- return vresult;
2376
3756
  fail:
2377
3757
  return Qnil;
2378
3758
  }
2379
3759
 
2380
3760
 
2381
3761
  SWIGINTERN VALUE
2382
- _wrap_serialOpen(int argc, VALUE *argv, VALUE self) {
2383
- char *arg1 = (char *) 0 ;
2384
- int arg2 ;
2385
- int res1 ;
2386
- char *buf1 = 0 ;
2387
- int alloc1 = 0 ;
2388
- int val2 ;
3762
+ _wrap_lcdSendCommand(int argc, VALUE *argv, VALUE self) {
3763
+ int arg1 ;
3764
+ uint8_t arg2 ;
3765
+ int val1 ;
3766
+ int ecode1 = 0 ;
3767
+ unsigned char val2 ;
2389
3768
  int ecode2 = 0 ;
2390
- int result;
2391
- VALUE vresult = Qnil;
2392
3769
 
2393
3770
  if ((argc < 2) || (argc > 2)) {
2394
3771
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2395
3772
  }
2396
- res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
2397
- if (!SWIG_IsOK(res1)) {
2398
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char *","serialOpen", 1, argv[0] ));
2399
- }
2400
- arg1 = (char *)(buf1);
2401
- ecode2 = SWIG_AsVal_int(argv[1], &val2);
3773
+ ecode1 = SWIG_AsVal_int(argv[0], &val1);
3774
+ if (!SWIG_IsOK(ecode1)) {
3775
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","lcdSendCommand", 1, argv[0] ));
3776
+ }
3777
+ arg1 = (int)(val1);
3778
+ ecode2 = SWIG_AsVal_unsigned_SS_char(argv[1], &val2);
2402
3779
  if (!SWIG_IsOK(ecode2)) {
2403
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","serialOpen", 2, argv[1] ));
3780
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint8_t","lcdSendCommand", 2, argv[1] ));
2404
3781
  }
2405
- arg2 = (int)(val2);
2406
- result = (int)serialOpen(arg1,arg2);
2407
- vresult = SWIG_From_int((int)(result));
2408
- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2409
- return vresult;
3782
+ arg2 = (uint8_t)(val2);
3783
+ lcdSendCommand(arg1,arg2);
3784
+ return Qnil;
2410
3785
  fail:
2411
- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2412
3786
  return Qnil;
2413
3787
  }
2414
3788
 
2415
3789
 
2416
3790
  SWIGINTERN VALUE
2417
- _wrap_serialClose(int argc, VALUE *argv, VALUE self) {
3791
+ _wrap_lcdPosition(int argc, VALUE *argv, VALUE self) {
2418
3792
  int arg1 ;
3793
+ int arg2 ;
3794
+ int arg3 ;
2419
3795
  int val1 ;
2420
3796
  int ecode1 = 0 ;
3797
+ int val2 ;
3798
+ int ecode2 = 0 ;
3799
+ int val3 ;
3800
+ int ecode3 = 0 ;
2421
3801
 
2422
- if ((argc < 1) || (argc > 1)) {
2423
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3802
+ if ((argc < 3) || (argc > 3)) {
3803
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
2424
3804
  }
2425
3805
  ecode1 = SWIG_AsVal_int(argv[0], &val1);
2426
3806
  if (!SWIG_IsOK(ecode1)) {
2427
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","serialClose", 1, argv[0] ));
3807
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","lcdPosition", 1, argv[0] ));
2428
3808
  }
2429
3809
  arg1 = (int)(val1);
2430
- serialClose(arg1);
3810
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3811
+ if (!SWIG_IsOK(ecode2)) {
3812
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","lcdPosition", 2, argv[1] ));
3813
+ }
3814
+ arg2 = (int)(val2);
3815
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
3816
+ if (!SWIG_IsOK(ecode3)) {
3817
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","lcdPosition", 3, argv[2] ));
3818
+ }
3819
+ arg3 = (int)(val3);
3820
+ lcdPosition(arg1,arg2,arg3);
2431
3821
  return Qnil;
2432
3822
  fail:
2433
3823
  return Qnil;
@@ -2435,7 +3825,7 @@ fail:
2435
3825
 
2436
3826
 
2437
3827
  SWIGINTERN VALUE
2438
- _wrap_serialPutchar(int argc, VALUE *argv, VALUE self) {
3828
+ _wrap_lcdPutchar(int argc, VALUE *argv, VALUE self) {
2439
3829
  int arg1 ;
2440
3830
  uint8_t arg2 ;
2441
3831
  int val1 ;
@@ -2448,15 +3838,15 @@ _wrap_serialPutchar(int argc, VALUE *argv, VALUE self) {
2448
3838
  }
2449
3839
  ecode1 = SWIG_AsVal_int(argv[0], &val1);
2450
3840
  if (!SWIG_IsOK(ecode1)) {
2451
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","serialPutchar", 1, argv[0] ));
3841
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","lcdPutchar", 1, argv[0] ));
2452
3842
  }
2453
3843
  arg1 = (int)(val1);
2454
3844
  ecode2 = SWIG_AsVal_unsigned_SS_char(argv[1], &val2);
2455
3845
  if (!SWIG_IsOK(ecode2)) {
2456
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint8_t","serialPutchar", 2, argv[1] ));
3846
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uint8_t","lcdPutchar", 2, argv[1] ));
2457
3847
  }
2458
3848
  arg2 = (uint8_t)(val2);
2459
- serialPutchar(arg1,arg2);
3849
+ lcdPutchar(arg1,arg2);
2460
3850
  return Qnil;
2461
3851
  fail:
2462
3852
  return Qnil;
@@ -2464,7 +3854,7 @@ fail:
2464
3854
 
2465
3855
 
2466
3856
  SWIGINTERN VALUE
2467
- _wrap_serialPuts(int argc, VALUE *argv, VALUE self) {
3857
+ _wrap_lcdPuts(int argc, VALUE *argv, VALUE self) {
2468
3858
  int arg1 ;
2469
3859
  char *arg2 = (char *) 0 ;
2470
3860
  int val1 ;
@@ -2478,15 +3868,15 @@ _wrap_serialPuts(int argc, VALUE *argv, VALUE self) {
2478
3868
  }
2479
3869
  ecode1 = SWIG_AsVal_int(argv[0], &val1);
2480
3870
  if (!SWIG_IsOK(ecode1)) {
2481
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","serialPuts", 1, argv[0] ));
3871
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","lcdPuts", 1, argv[0] ));
2482
3872
  }
2483
3873
  arg1 = (int)(val1);
2484
3874
  res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2485
3875
  if (!SWIG_IsOK(res2)) {
2486
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","serialPuts", 2, argv[1] ));
3876
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","lcdPuts", 2, argv[1] ));
2487
3877
  }
2488
3878
  arg2 = (char *)(buf2);
2489
- serialPuts(arg1,arg2);
3879
+ lcdPuts(arg1,arg2);
2490
3880
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2491
3881
  return Qnil;
2492
3882
  fail:
@@ -2496,46 +3886,151 @@ fail:
2496
3886
 
2497
3887
 
2498
3888
  SWIGINTERN VALUE
2499
- _wrap_serialDataAvail(int argc, VALUE *argv, VALUE self) {
3889
+ _wrap_lcdPrintf(int argc, VALUE *argv, VALUE self) {
2500
3890
  int arg1 ;
3891
+ char *arg2 = (char *) 0 ;
3892
+ void *arg3 = 0 ;
2501
3893
  int val1 ;
2502
3894
  int ecode1 = 0 ;
2503
- int result;
2504
- VALUE vresult = Qnil;
3895
+ int res2 ;
3896
+ char *buf2 = 0 ;
3897
+ int alloc2 = 0 ;
2505
3898
 
2506
- if ((argc < 1) || (argc > 1)) {
2507
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3899
+ if (argc < 2) {
3900
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2508
3901
  }
2509
3902
  ecode1 = SWIG_AsVal_int(argv[0], &val1);
2510
3903
  if (!SWIG_IsOK(ecode1)) {
2511
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","serialDataAvail", 1, argv[0] ));
3904
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","lcdPrintf", 1, argv[0] ));
2512
3905
  }
2513
3906
  arg1 = (int)(val1);
2514
- result = (int)serialDataAvail(arg1);
2515
- vresult = SWIG_From_int((int)(result));
2516
- return vresult;
3907
+ res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
3908
+ if (!SWIG_IsOK(res2)) {
3909
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","lcdPrintf", 2, argv[1] ));
3910
+ }
3911
+ arg2 = (char *)(buf2);
3912
+ lcdPrintf(arg1,arg2,arg3);
3913
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3914
+ return Qnil;
2517
3915
  fail:
3916
+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2518
3917
  return Qnil;
2519
3918
  }
2520
3919
 
2521
3920
 
2522
3921
  SWIGINTERN VALUE
2523
- _wrap_serialGetchar(int argc, VALUE *argv, VALUE self) {
3922
+ _wrap_lcdInit(int argc, VALUE *argv, VALUE self) {
2524
3923
  int arg1 ;
3924
+ int arg2 ;
3925
+ int arg3 ;
3926
+ int arg4 ;
3927
+ int arg5 ;
3928
+ int arg6 ;
3929
+ int arg7 ;
3930
+ int arg8 ;
3931
+ int arg9 ;
3932
+ int arg10 ;
3933
+ int arg11 ;
3934
+ int arg12 ;
3935
+ int arg13 ;
2525
3936
  int val1 ;
2526
3937
  int ecode1 = 0 ;
3938
+ int val2 ;
3939
+ int ecode2 = 0 ;
3940
+ int val3 ;
3941
+ int ecode3 = 0 ;
3942
+ int val4 ;
3943
+ int ecode4 = 0 ;
3944
+ int val5 ;
3945
+ int ecode5 = 0 ;
3946
+ int val6 ;
3947
+ int ecode6 = 0 ;
3948
+ int val7 ;
3949
+ int ecode7 = 0 ;
3950
+ int val8 ;
3951
+ int ecode8 = 0 ;
3952
+ int val9 ;
3953
+ int ecode9 = 0 ;
3954
+ int val10 ;
3955
+ int ecode10 = 0 ;
3956
+ int val11 ;
3957
+ int ecode11 = 0 ;
3958
+ int val12 ;
3959
+ int ecode12 = 0 ;
3960
+ int val13 ;
3961
+ int ecode13 = 0 ;
2527
3962
  int result;
2528
3963
  VALUE vresult = Qnil;
2529
3964
 
2530
- if ((argc < 1) || (argc > 1)) {
2531
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3965
+ if ((argc < 13) || (argc > 13)) {
3966
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 13)",argc); SWIG_fail;
2532
3967
  }
2533
3968
  ecode1 = SWIG_AsVal_int(argv[0], &val1);
2534
3969
  if (!SWIG_IsOK(ecode1)) {
2535
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","serialGetchar", 1, argv[0] ));
3970
+ SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","lcdInit", 1, argv[0] ));
2536
3971
  }
2537
3972
  arg1 = (int)(val1);
2538
- result = (int)serialGetchar(arg1);
3973
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
3974
+ if (!SWIG_IsOK(ecode2)) {
3975
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","lcdInit", 2, argv[1] ));
3976
+ }
3977
+ arg2 = (int)(val2);
3978
+ ecode3 = SWIG_AsVal_int(argv[2], &val3);
3979
+ if (!SWIG_IsOK(ecode3)) {
3980
+ SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","lcdInit", 3, argv[2] ));
3981
+ }
3982
+ arg3 = (int)(val3);
3983
+ ecode4 = SWIG_AsVal_int(argv[3], &val4);
3984
+ if (!SWIG_IsOK(ecode4)) {
3985
+ SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","lcdInit", 4, argv[3] ));
3986
+ }
3987
+ arg4 = (int)(val4);
3988
+ ecode5 = SWIG_AsVal_int(argv[4], &val5);
3989
+ if (!SWIG_IsOK(ecode5)) {
3990
+ SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","lcdInit", 5, argv[4] ));
3991
+ }
3992
+ arg5 = (int)(val5);
3993
+ ecode6 = SWIG_AsVal_int(argv[5], &val6);
3994
+ if (!SWIG_IsOK(ecode6)) {
3995
+ SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "int","lcdInit", 6, argv[5] ));
3996
+ }
3997
+ arg6 = (int)(val6);
3998
+ ecode7 = SWIG_AsVal_int(argv[6], &val7);
3999
+ if (!SWIG_IsOK(ecode7)) {
4000
+ SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "int","lcdInit", 7, argv[6] ));
4001
+ }
4002
+ arg7 = (int)(val7);
4003
+ ecode8 = SWIG_AsVal_int(argv[7], &val8);
4004
+ if (!SWIG_IsOK(ecode8)) {
4005
+ SWIG_exception_fail(SWIG_ArgError(ecode8), Ruby_Format_TypeError( "", "int","lcdInit", 8, argv[7] ));
4006
+ }
4007
+ arg8 = (int)(val8);
4008
+ ecode9 = SWIG_AsVal_int(argv[8], &val9);
4009
+ if (!SWIG_IsOK(ecode9)) {
4010
+ SWIG_exception_fail(SWIG_ArgError(ecode9), Ruby_Format_TypeError( "", "int","lcdInit", 9, argv[8] ));
4011
+ }
4012
+ arg9 = (int)(val9);
4013
+ ecode10 = SWIG_AsVal_int(argv[9], &val10);
4014
+ if (!SWIG_IsOK(ecode10)) {
4015
+ SWIG_exception_fail(SWIG_ArgError(ecode10), Ruby_Format_TypeError( "", "int","lcdInit", 10, argv[9] ));
4016
+ }
4017
+ arg10 = (int)(val10);
4018
+ ecode11 = SWIG_AsVal_int(argv[10], &val11);
4019
+ if (!SWIG_IsOK(ecode11)) {
4020
+ SWIG_exception_fail(SWIG_ArgError(ecode11), Ruby_Format_TypeError( "", "int","lcdInit", 11, argv[10] ));
4021
+ }
4022
+ arg11 = (int)(val11);
4023
+ ecode12 = SWIG_AsVal_int(argv[11], &val12);
4024
+ if (!SWIG_IsOK(ecode12)) {
4025
+ SWIG_exception_fail(SWIG_ArgError(ecode12), Ruby_Format_TypeError( "", "int","lcdInit", 12, argv[11] ));
4026
+ }
4027
+ arg12 = (int)(val12);
4028
+ ecode13 = SWIG_AsVal_int(argv[12], &val13);
4029
+ if (!SWIG_IsOK(ecode13)) {
4030
+ SWIG_exception_fail(SWIG_ArgError(ecode13), Ruby_Format_TypeError( "", "int","lcdInit", 13, argv[12] ));
4031
+ }
4032
+ arg13 = (int)(val13);
4033
+ result = (int)lcdInit(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
2539
4034
  vresult = SWIG_From_int((int)(result));
2540
4035
  return vresult;
2541
4036
  fail:
@@ -2543,52 +4038,35 @@ fail:
2543
4038
  }
2544
4039
 
2545
4040
 
2546
- SWIGINTERN VALUE
2547
- _wrap_serialPrintf(int argc, VALUE *argv, VALUE self) {
2548
- int arg1 ;
2549
- char *arg2 = (char *) 0 ;
2550
- void *arg3 = 0 ;
2551
- int val1 ;
2552
- int ecode1 = 0 ;
2553
- int res2 ;
2554
- char *buf2 = 0 ;
2555
- int alloc2 = 0 ;
2556
-
2557
- if (argc < 2) {
2558
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2559
- }
2560
- ecode1 = SWIG_AsVal_int(argv[0], &val1);
2561
- if (!SWIG_IsOK(ecode1)) {
2562
- SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","serialPrintf", 1, argv[0] ));
2563
- }
2564
- arg1 = (int)(val1);
2565
- res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2566
- if (!SWIG_IsOK(res2)) {
2567
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","serialPrintf", 2, argv[1] ));
2568
- }
2569
- arg2 = (char *)(buf2);
2570
- serialPrintf(arg1,arg2,arg3);
2571
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2572
- return Qnil;
2573
- fail:
2574
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2575
- return Qnil;
2576
- }
2577
-
2578
-
2579
4041
 
2580
4042
  /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
2581
4043
 
2582
4044
  static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
4045
+ static swig_type_info _swigt__p_f_int_int__int = {"_p_f_int_int__int", "int (*)(int,int)", 0, 0, (void*)0, 0};
4046
+ static swig_type_info _swigt__p_f_p_void__p_void = {"_p_f_p_void__p_void", "void *(*)(void *)", 0, 0, (void*)0, 0};
4047
+ static swig_type_info _swigt__p_f_void__void = {"_p_f_void__void", "void (*)(void)", 0, 0, (void*)0, 0};
4048
+ static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *", 0, 0, (void*)0, 0};
2583
4049
 
2584
4050
  static swig_type_info *swig_type_initial[] = {
2585
4051
  &_swigt__p_char,
4052
+ &_swigt__p_f_int_int__int,
4053
+ &_swigt__p_f_p_void__p_void,
4054
+ &_swigt__p_f_void__void,
4055
+ &_swigt__p_unsigned_char,
2586
4056
  };
2587
4057
 
2588
4058
  static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
4059
+ static swig_cast_info _swigc__p_f_int_int__int[] = { {&_swigt__p_f_int_int__int, 0, 0, 0},{0, 0, 0, 0}};
4060
+ static swig_cast_info _swigc__p_f_p_void__p_void[] = { {&_swigt__p_f_p_void__p_void, 0, 0, 0},{0, 0, 0, 0}};
4061
+ static swig_cast_info _swigc__p_f_void__void[] = { {&_swigt__p_f_void__void, 0, 0, 0},{0, 0, 0, 0}};
4062
+ static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
2589
4063
 
2590
4064
  static swig_cast_info *swig_cast_initial[] = {
2591
4065
  _swigc__p_char,
4066
+ _swigc__p_f_int_int__int,
4067
+ _swigc__p_f_p_void__p_void,
4068
+ _swigc__p_f_void__void,
4069
+ _swigc__p_unsigned_char,
2592
4070
  };
2593
4071
 
2594
4072
 
@@ -2852,23 +4330,68 @@ SWIGEXPORT void Init_wiringpi(void) {
2852
4330
  rb_define_module_function(mWiringpi, "wiringPiSetup", _wrap_wiringPiSetup, -1);
2853
4331
  rb_define_module_function(mWiringpi, "wiringPiSetupSys", _wrap_wiringPiSetupSys, -1);
2854
4332
  rb_define_module_function(mWiringpi, "wiringPiSetupGpio", _wrap_wiringPiSetupGpio, -1);
2855
- rb_define_module_function(mWiringpi, "wiringPiGpioMode", _wrap_wiringPiGpioMode, -1);
2856
- rb_define_module_function(mWiringpi, "pullUpDnControl", _wrap_pullUpDnControl, -1);
4333
+ rb_define_module_function(mWiringpi, "wiringPiSetupPhys", _wrap_wiringPiSetupPhys, -1);
4334
+ rb_define_module_function(mWiringpi, "piFaceSetup", _wrap_piFaceSetup, -1);
2857
4335
  rb_define_module_function(mWiringpi, "pinMode", _wrap_pinMode, -1);
4336
+ rb_define_module_function(mWiringpi, "pullUpDnControl", _wrap_pullUpDnControl, -1);
4337
+ rb_define_module_function(mWiringpi, "digitalRead", _wrap_digitalRead, -1);
2858
4338
  rb_define_module_function(mWiringpi, "digitalWrite", _wrap_digitalWrite, -1);
2859
4339
  rb_define_module_function(mWiringpi, "pwmWrite", _wrap_pwmWrite, -1);
2860
- rb_define_module_function(mWiringpi, "digitalRead", _wrap_digitalRead, -1);
2861
- rb_define_module_function(mWiringpi, "shiftOut", _wrap_shiftOut, -1);
2862
- rb_define_module_function(mWiringpi, "shiftIn", _wrap_shiftIn, -1);
4340
+ rb_define_module_function(mWiringpi, "analogRead", _wrap_analogRead, -1);
4341
+ rb_define_module_function(mWiringpi, "analogWrite", _wrap_analogWrite, -1);
4342
+ rb_define_module_function(mWiringpi, "piBoardRev", _wrap_piBoardRev, -1);
4343
+ rb_define_module_function(mWiringpi, "wpiPinToGpio", _wrap_wpiPinToGpio, -1);
4344
+ rb_define_module_function(mWiringpi, "physPinToGpio", _wrap_physPinToGpio, -1);
4345
+ rb_define_singleton_method(mWiringpi, "waitForInterrupt", _wrap_waitForInterrupt_get, 0);
4346
+ rb_define_singleton_method(mWiringpi, "waitForInterrupt=", _wrap_waitForInterrupt_set, 1);
4347
+ rb_define_module_function(mWiringpi, "wiringPiISR", _wrap_wiringPiISR, -1);
4348
+ rb_define_module_function(mWiringpi, "piThreadCreate", _wrap_piThreadCreate, -1);
4349
+ rb_define_module_function(mWiringpi, "piLock", _wrap_piLock, -1);
4350
+ rb_define_module_function(mWiringpi, "piUnlock", _wrap_piUnlock, -1);
4351
+ rb_define_module_function(mWiringpi, "piHiPri", _wrap_piHiPri, -1);
2863
4352
  rb_define_module_function(mWiringpi, "delay", _wrap_delay, -1);
2864
4353
  rb_define_module_function(mWiringpi, "delayMicroseconds", _wrap_delayMicroseconds, -1);
2865
4354
  rb_define_module_function(mWiringpi, "millis", _wrap_millis, -1);
4355
+ rb_define_module_function(mWiringpi, "micros", _wrap_micros, -1);
2866
4356
  rb_define_module_function(mWiringpi, "serialOpen", _wrap_serialOpen, -1);
2867
4357
  rb_define_module_function(mWiringpi, "serialClose", _wrap_serialClose, -1);
4358
+ rb_define_module_function(mWiringpi, "serialFlush", _wrap_serialFlush, -1);
2868
4359
  rb_define_module_function(mWiringpi, "serialPutchar", _wrap_serialPutchar, -1);
2869
4360
  rb_define_module_function(mWiringpi, "serialPuts", _wrap_serialPuts, -1);
4361
+ rb_define_module_function(mWiringpi, "serialPrintf", _wrap_serialPrintf, -1);
2870
4362
  rb_define_module_function(mWiringpi, "serialDataAvail", _wrap_serialDataAvail, -1);
2871
4363
  rb_define_module_function(mWiringpi, "serialGetchar", _wrap_serialGetchar, -1);
2872
- rb_define_module_function(mWiringpi, "serialPrintf", _wrap_serialPrintf, -1);
4364
+ rb_define_module_function(mWiringpi, "shiftOut", _wrap_shiftOut, -1);
4365
+ rb_define_module_function(mWiringpi, "shiftIn", _wrap_shiftIn, -1);
4366
+ rb_define_module_function(mWiringpi, "wiringPiSPIGetFd", _wrap_wiringPiSPIGetFd, -1);
4367
+ rb_define_module_function(mWiringpi, "wiringPiSPIDataRW", _wrap_wiringPiSPIDataRW, -1);
4368
+ rb_define_module_function(mWiringpi, "wiringPiSPISetup", _wrap_wiringPiSPISetup, -1);
4369
+ rb_define_module_function(mWiringpi, "wiringPiI2CSetupInterface", _wrap_wiringPiI2CSetupInterface, -1);
4370
+ rb_define_module_function(mWiringpi, "wiringPiI2CSetup", _wrap_wiringPiI2CSetup, -1);
4371
+ rb_define_module_function(mWiringpi, "wiringPiI2CRead", _wrap_wiringPiI2CRead, -1);
4372
+ rb_define_module_function(mWiringpi, "wiringPiI2CReadReg8", _wrap_wiringPiI2CReadReg8, -1);
4373
+ rb_define_module_function(mWiringpi, "wiringPiI2CReadReg16", _wrap_wiringPiI2CReadReg16, -1);
4374
+ rb_define_module_function(mWiringpi, "wiringPiI2CWrite", _wrap_wiringPiI2CWrite, -1);
4375
+ rb_define_module_function(mWiringpi, "wiringPiI2CWriteReg8", _wrap_wiringPiI2CWriteReg8, -1);
4376
+ rb_define_module_function(mWiringpi, "wiringPiI2CWriteReg16", _wrap_wiringPiI2CWriteReg16, -1);
4377
+ rb_define_module_function(mWiringpi, "softToneCreate", _wrap_softToneCreate, -1);
4378
+ rb_define_module_function(mWiringpi, "softToneWrite", _wrap_softToneWrite, -1);
4379
+ rb_define_module_function(mWiringpi, "softServoWrite", _wrap_softServoWrite, -1);
4380
+ rb_define_module_function(mWiringpi, "softServoSetup", _wrap_softServoSetup, -1);
4381
+ rb_define_module_function(mWiringpi, "softPwmCreate", _wrap_softPwmCreate, -1);
4382
+ rb_define_module_function(mWiringpi, "softPwmWrite", _wrap_softPwmWrite, -1);
4383
+ rb_define_module_function(mWiringpi, "mcp23s17Setup", _wrap_mcp23s17Setup, -1);
4384
+ rb_define_module_function(mWiringpi, "mcp23017Setup", _wrap_mcp23017Setup, -1);
4385
+ rb_define_module_function(mWiringpi, "mcp23s08Setup", _wrap_mcp23s08Setup, -1);
4386
+ rb_define_module_function(mWiringpi, "mcp23008Setup", _wrap_mcp23008Setup, -1);
4387
+ rb_define_module_function(mWiringpi, "sr595Setup", _wrap_sr595Setup, -1);
4388
+ rb_define_module_function(mWiringpi, "lcdHome", _wrap_lcdHome, -1);
4389
+ rb_define_module_function(mWiringpi, "lcdClear", _wrap_lcdClear, -1);
4390
+ rb_define_module_function(mWiringpi, "lcdSendCommand", _wrap_lcdSendCommand, -1);
4391
+ rb_define_module_function(mWiringpi, "lcdPosition", _wrap_lcdPosition, -1);
4392
+ rb_define_module_function(mWiringpi, "lcdPutchar", _wrap_lcdPutchar, -1);
4393
+ rb_define_module_function(mWiringpi, "lcdPuts", _wrap_lcdPuts, -1);
4394
+ rb_define_module_function(mWiringpi, "lcdPrintf", _wrap_lcdPrintf, -1);
4395
+ rb_define_module_function(mWiringpi, "lcdInit", _wrap_lcdInit, -1);
2873
4396
  }
2874
4397