Skip to content

Commit 95c6d56

Browse files
committed
Updated to pull headers from wiringpi.i
1 parent 9d49ca6 commit 95c6d56

File tree

1 file changed

+9
-39
lines changed

1 file changed

+9
-39
lines changed

generate-bindings.py

+9-39
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,14 @@
1-
HEADERS = [
2-
"WiringPi/wiringPi/wiringPi.h",
3-
"WiringPi/wiringPi/wiringPiI2C.h",
4-
"WiringPi/wiringPi/wiringPiSPI.h",
5-
"WiringPi/wiringPi/wiringSerial.h",
6-
"WiringPi/wiringPi/wiringShift.h",
7-
"WiringPi/wiringPi/wpiExtensions.h",
1+
HEADERS = []
82

9-
"WiringPi/wiringPi/drcSerial.h",
10-
"WiringPi/wiringPi/max31855.h",
11-
"WiringPi/wiringPi/max5322.h",
12-
"WiringPi/wiringPi/mcp23008.h",
13-
"WiringPi/wiringPi/mcp23016.h",
14-
"WiringPi/wiringPi/mcp23016reg.h",
15-
"WiringPi/wiringPi/mcp23017.h",
16-
"WiringPi/wiringPi/mcp23s08.h",
17-
"WiringPi/wiringPi/mcp23s17.h",
18-
"WiringPi/wiringPi/mcp23x0817.h",
19-
"WiringPi/wiringPi/mcp23x08.h",
20-
"WiringPi/wiringPi/mcp3002.h",
21-
"WiringPi/wiringPi/mcp3004.h",
22-
"WiringPi/wiringPi/mcp3422.h",
23-
"WiringPi/wiringPi/mcp4802.h",
24-
"WiringPi/wiringPi/pcf8574.h",
25-
"WiringPi/wiringPi/pcf8591.h",
26-
"WiringPi/wiringPi/sn3218.h",
27-
"WiringPi/wiringPi/softPwm.h",
28-
"WiringPi/wiringPi/softServo.h",
29-
"WiringPi/wiringPi/softTone.h",
30-
"WiringPi/wiringPi/sr595.h",
3+
src = open("wiringpi.i").read().split('\n')
4+
5+
for line in src:
6+
line = line.strip()
7+
if line.startswith('#include') and line.endswith('.h"'):
8+
HEADERS.append(line.replace('#include','').replace('"','').strip())
9+
10+
#print(HEADERS)
3111

32-
"WiringPi/devLib/ds1302.h",
33-
"WiringPi/devLib/font.h",
34-
"WiringPi/devLib/gertboard.h",
35-
"WiringPi/devLib/lcd128x64.h",
36-
"WiringPi/devLib/lcd.h",
37-
"WiringPi/devLib/maxdetect.h",
38-
"WiringPi/devLib/piFace.h",
39-
"WiringPi/devLib/piGlow.h",
40-
"WiringPi/devLib/piNes.h"
41-
]
4212
def is_c_decl(line):
4313
for fn in ['wiringPiISR','wiringPiSetupPiFace','wiringPiSetupPiFaceForGpioProg']:
4414
if fn in line:

0 commit comments

Comments
 (0)