代码拉取完成,页面将自动刷新
HEADERS = []
src = open("wiringpi.i").read().split('\n')
for line in src:
line = line.strip()
if line.startswith('#include') and line.endswith('.h"'):
HEADERS.append(line.replace('#include','').replace('"','').strip())
def is_c_decl(line):
for fn in ['wiringPiISR','wiringPiSetupPiFace','wiringPiSetupPiFaceForGpioProg']:
if fn in line:
return False
for prefix in ['extern','void','int','uint8_t']:
if line.startswith(prefix):
return True
print("// Generated by generate-bindings.py - do not edit manually!")
for file in HEADERS:
print("\n// Header file {}".format(file))
if file == "wiringOP/devLib/font.h":
continue # continue here
h = open(file).read().split('\n')
extern = False
cont = False
if 'extern "C" {' not in h:
extern = True
for line in h:
line = line.strip()
if cont:
print("\t{}".format(line))
cont = ";" not in line
continue
if line.startswith('extern "C"'):
extern = True
continue
if is_c_decl(line) and extern:
print(line)
cont = ";" not in line
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。