parent
0429f1f342
commit
fb7c8912fe
@ -1,2 +1,4 @@
|
|||||||
build/
|
build/
|
||||||
|
wiringpi.egg-info/
|
||||||
|
dist/
|
||||||
__pycache__
|
__pycache__
|
||||||
|
|||||||
@ -1,277 +0,0 @@
|
|||||||
# This file was automatically generated by SWIG (http://www.swig.org).
|
|
||||||
# Version 2.0.7
|
|
||||||
#
|
|
||||||
# Do not make changes to this file unless you know what you are doing--modify
|
|
||||||
# the SWIG interface file instead.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
from sys import version_info
|
|
||||||
if version_info >= (2,6,0):
|
|
||||||
def swig_import_helper():
|
|
||||||
from os.path import dirname
|
|
||||||
import imp
|
|
||||||
fp = None
|
|
||||||
try:
|
|
||||||
fp, pathname, description = imp.find_module('__wiringpi', [dirname(__file__)])
|
|
||||||
except ImportError:
|
|
||||||
import __wiringpi
|
|
||||||
return __wiringpi
|
|
||||||
if fp is not None:
|
|
||||||
try:
|
|
||||||
_mod = imp.load_module('__wiringpi', fp, pathname, description)
|
|
||||||
finally:
|
|
||||||
fp.close()
|
|
||||||
return _mod
|
|
||||||
__wiringpi = swig_import_helper()
|
|
||||||
del swig_import_helper
|
|
||||||
else:
|
|
||||||
import __wiringpi
|
|
||||||
del version_info
|
|
||||||
try:
|
|
||||||
_swig_property = property
|
|
||||||
except NameError:
|
|
||||||
pass # Python < 2.2 doesn't have 'property'.
|
|
||||||
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
|
|
||||||
if (name == "thisown"): return self.this.own(value)
|
|
||||||
if (name == "this"):
|
|
||||||
if type(value).__name__ == 'SwigPyObject':
|
|
||||||
self.__dict__[name] = value
|
|
||||||
return
|
|
||||||
method = class_type.__swig_setmethods__.get(name,None)
|
|
||||||
if method: return method(self,value)
|
|
||||||
if (not static):
|
|
||||||
self.__dict__[name] = value
|
|
||||||
else:
|
|
||||||
raise AttributeError("You cannot add attributes to %s" % self)
|
|
||||||
|
|
||||||
def _swig_setattr(self,class_type,name,value):
|
|
||||||
return _swig_setattr_nondynamic(self,class_type,name,value,0)
|
|
||||||
|
|
||||||
def _swig_getattr(self,class_type,name):
|
|
||||||
if (name == "thisown"): return self.this.own()
|
|
||||||
method = class_type.__swig_getmethods__.get(name,None)
|
|
||||||
if method: return method(self)
|
|
||||||
raise AttributeError(name)
|
|
||||||
|
|
||||||
def _swig_repr(self):
|
|
||||||
try: strthis = "proxy of " + self.this.__repr__()
|
|
||||||
except: strthis = ""
|
|
||||||
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
|
|
||||||
|
|
||||||
try:
|
|
||||||
_object = object
|
|
||||||
_newclass = 1
|
|
||||||
except AttributeError:
|
|
||||||
class _object : pass
|
|
||||||
_newclass = 0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def wiringPiSetup():
|
|
||||||
return __wiringpi.wiringPiSetup()
|
|
||||||
wiringPiSetup = __wiringpi.wiringPiSetup
|
|
||||||
|
|
||||||
def wiringPiSetupSys():
|
|
||||||
return __wiringpi.wiringPiSetupSys()
|
|
||||||
wiringPiSetupSys = __wiringpi.wiringPiSetupSys
|
|
||||||
|
|
||||||
def wiringPiSetupGpio():
|
|
||||||
return __wiringpi.wiringPiSetupGpio()
|
|
||||||
wiringPiSetupGpio = __wiringpi.wiringPiSetupGpio
|
|
||||||
|
|
||||||
def piFaceSetup(*args):
|
|
||||||
return __wiringpi.piFaceSetup(*args)
|
|
||||||
piFaceSetup = __wiringpi.piFaceSetup
|
|
||||||
|
|
||||||
def piBoardRev():
|
|
||||||
return __wiringpi.piBoardRev()
|
|
||||||
piBoardRev = __wiringpi.piBoardRev
|
|
||||||
|
|
||||||
def wpiPinToGpio(*args):
|
|
||||||
return __wiringpi.wpiPinToGpio(*args)
|
|
||||||
wpiPinToGpio = __wiringpi.wpiPinToGpio
|
|
||||||
|
|
||||||
def pinMode(*args):
|
|
||||||
return __wiringpi.pinMode(*args)
|
|
||||||
pinMode = __wiringpi.pinMode
|
|
||||||
|
|
||||||
def getAlt(*args):
|
|
||||||
return __wiringpi.getAlt(*args)
|
|
||||||
getAlt = __wiringpi.getAlt
|
|
||||||
|
|
||||||
def pullUpDnControl(*args):
|
|
||||||
return __wiringpi.pullUpDnControl(*args)
|
|
||||||
pullUpDnControl = __wiringpi.pullUpDnControl
|
|
||||||
|
|
||||||
def digitalWrite(*args):
|
|
||||||
return __wiringpi.digitalWrite(*args)
|
|
||||||
digitalWrite = __wiringpi.digitalWrite
|
|
||||||
|
|
||||||
def digitalWriteByte(*args):
|
|
||||||
return __wiringpi.digitalWriteByte(*args)
|
|
||||||
digitalWriteByte = __wiringpi.digitalWriteByte
|
|
||||||
|
|
||||||
def gpioClockSet(*args):
|
|
||||||
return __wiringpi.gpioClockSet(*args)
|
|
||||||
gpioClockSet = __wiringpi.gpioClockSet
|
|
||||||
|
|
||||||
def pwmWrite(*args):
|
|
||||||
return __wiringpi.pwmWrite(*args)
|
|
||||||
pwmWrite = __wiringpi.pwmWrite
|
|
||||||
|
|
||||||
def setPadDrive(*args):
|
|
||||||
return __wiringpi.setPadDrive(*args)
|
|
||||||
setPadDrive = __wiringpi.setPadDrive
|
|
||||||
|
|
||||||
def digitalRead(*args):
|
|
||||||
return __wiringpi.digitalRead(*args)
|
|
||||||
digitalRead = __wiringpi.digitalRead
|
|
||||||
|
|
||||||
def pwmSetMode(*args):
|
|
||||||
return __wiringpi.pwmSetMode(*args)
|
|
||||||
pwmSetMode = __wiringpi.pwmSetMode
|
|
||||||
|
|
||||||
def pwmSetRange(*args):
|
|
||||||
return __wiringpi.pwmSetRange(*args)
|
|
||||||
pwmSetRange = __wiringpi.pwmSetRange
|
|
||||||
|
|
||||||
def pwmSetClock(*args):
|
|
||||||
return __wiringpi.pwmSetClock(*args)
|
|
||||||
pwmSetClock = __wiringpi.pwmSetClock
|
|
||||||
|
|
||||||
def wiringPiISR(*args):
|
|
||||||
return __wiringpi.wiringPiISR(*args)
|
|
||||||
wiringPiISR = __wiringpi.wiringPiISR
|
|
||||||
|
|
||||||
def piThreadCreate(*args):
|
|
||||||
return __wiringpi.piThreadCreate(*args)
|
|
||||||
piThreadCreate = __wiringpi.piThreadCreate
|
|
||||||
|
|
||||||
def piLock(*args):
|
|
||||||
return __wiringpi.piLock(*args)
|
|
||||||
piLock = __wiringpi.piLock
|
|
||||||
|
|
||||||
def piUnlock(*args):
|
|
||||||
return __wiringpi.piUnlock(*args)
|
|
||||||
piUnlock = __wiringpi.piUnlock
|
|
||||||
|
|
||||||
def delay(*args):
|
|
||||||
return __wiringpi.delay(*args)
|
|
||||||
delay = __wiringpi.delay
|
|
||||||
|
|
||||||
def delayMicroseconds(*args):
|
|
||||||
return __wiringpi.delayMicroseconds(*args)
|
|
||||||
delayMicroseconds = __wiringpi.delayMicroseconds
|
|
||||||
|
|
||||||
def millis():
|
|
||||||
return __wiringpi.millis()
|
|
||||||
millis = __wiringpi.millis
|
|
||||||
|
|
||||||
def micros():
|
|
||||||
return __wiringpi.micros()
|
|
||||||
micros = __wiringpi.micros
|
|
||||||
|
|
||||||
def serialOpen(*args):
|
|
||||||
return __wiringpi.serialOpen(*args)
|
|
||||||
serialOpen = __wiringpi.serialOpen
|
|
||||||
|
|
||||||
def serialClose(*args):
|
|
||||||
return __wiringpi.serialClose(*args)
|
|
||||||
serialClose = __wiringpi.serialClose
|
|
||||||
|
|
||||||
def serialFlush(*args):
|
|
||||||
return __wiringpi.serialFlush(*args)
|
|
||||||
serialFlush = __wiringpi.serialFlush
|
|
||||||
|
|
||||||
def serialPutchar(*args):
|
|
||||||
return __wiringpi.serialPutchar(*args)
|
|
||||||
serialPutchar = __wiringpi.serialPutchar
|
|
||||||
|
|
||||||
def serialPuts(*args):
|
|
||||||
return __wiringpi.serialPuts(*args)
|
|
||||||
serialPuts = __wiringpi.serialPuts
|
|
||||||
|
|
||||||
def serialPrintf(*args):
|
|
||||||
return __wiringpi.serialPrintf(*args)
|
|
||||||
serialPrintf = __wiringpi.serialPrintf
|
|
||||||
|
|
||||||
def serialDataAvail(*args):
|
|
||||||
return __wiringpi.serialDataAvail(*args)
|
|
||||||
serialDataAvail = __wiringpi.serialDataAvail
|
|
||||||
|
|
||||||
def serialGetchar(*args):
|
|
||||||
return __wiringpi.serialGetchar(*args)
|
|
||||||
serialGetchar = __wiringpi.serialGetchar
|
|
||||||
|
|
||||||
def shiftOut(*args):
|
|
||||||
return __wiringpi.shiftOut(*args)
|
|
||||||
shiftOut = __wiringpi.shiftOut
|
|
||||||
|
|
||||||
def shiftIn(*args):
|
|
||||||
return __wiringpi.shiftIn(*args)
|
|
||||||
shiftIn = __wiringpi.shiftIn
|
|
||||||
|
|
||||||
def wiringPiSPIGetFd(*args):
|
|
||||||
return __wiringpi.wiringPiSPIGetFd(*args)
|
|
||||||
wiringPiSPIGetFd = __wiringpi.wiringPiSPIGetFd
|
|
||||||
|
|
||||||
def wiringPiSPIDataRW(*args):
|
|
||||||
return __wiringpi.wiringPiSPIDataRW(*args)
|
|
||||||
wiringPiSPIDataRW = __wiringpi.wiringPiSPIDataRW
|
|
||||||
|
|
||||||
def wiringPiSPISetup(*args):
|
|
||||||
return __wiringpi.wiringPiSPISetup(*args)
|
|
||||||
wiringPiSPISetup = __wiringpi.wiringPiSPISetup
|
|
||||||
|
|
||||||
def wiringPiI2CRead(*args):
|
|
||||||
return __wiringpi.wiringPiI2CRead(*args)
|
|
||||||
wiringPiI2CRead = __wiringpi.wiringPiI2CRead
|
|
||||||
|
|
||||||
def wiringPiI2CReadReg8(*args):
|
|
||||||
return __wiringpi.wiringPiI2CReadReg8(*args)
|
|
||||||
wiringPiI2CReadReg8 = __wiringpi.wiringPiI2CReadReg8
|
|
||||||
|
|
||||||
def wiringPiI2CReadReg16(*args):
|
|
||||||
return __wiringpi.wiringPiI2CReadReg16(*args)
|
|
||||||
wiringPiI2CReadReg16 = __wiringpi.wiringPiI2CReadReg16
|
|
||||||
|
|
||||||
def wiringPiI2CWrite(*args):
|
|
||||||
return __wiringpi.wiringPiI2CWrite(*args)
|
|
||||||
wiringPiI2CWrite = __wiringpi.wiringPiI2CWrite
|
|
||||||
|
|
||||||
def wiringPiI2CWriteReg8(*args):
|
|
||||||
return __wiringpi.wiringPiI2CWriteReg8(*args)
|
|
||||||
wiringPiI2CWriteReg8 = __wiringpi.wiringPiI2CWriteReg8
|
|
||||||
|
|
||||||
def wiringPiI2CWriteReg16(*args):
|
|
||||||
return __wiringpi.wiringPiI2CWriteReg16(*args)
|
|
||||||
wiringPiI2CWriteReg16 = __wiringpi.wiringPiI2CWriteReg16
|
|
||||||
|
|
||||||
def softToneCreate(*args):
|
|
||||||
return __wiringpi.softToneCreate(*args)
|
|
||||||
softToneCreate = __wiringpi.softToneCreate
|
|
||||||
|
|
||||||
def softToneWrite(*args):
|
|
||||||
return __wiringpi.softToneWrite(*args)
|
|
||||||
softToneWrite = __wiringpi.softToneWrite
|
|
||||||
|
|
||||||
def softServoWrite(*args):
|
|
||||||
return __wiringpi.softServoWrite(*args)
|
|
||||||
softServoWrite = __wiringpi.softServoWrite
|
|
||||||
|
|
||||||
def softServoSetup(*args):
|
|
||||||
return __wiringpi.softServoSetup(*args)
|
|
||||||
softServoSetup = __wiringpi.softServoSetup
|
|
||||||
|
|
||||||
def softPwmCreate(*args):
|
|
||||||
return __wiringpi.softPwmCreate(*args)
|
|
||||||
softPwmCreate = __wiringpi.softPwmCreate
|
|
||||||
|
|
||||||
def softPwmWrite(*args):
|
|
||||||
return __wiringpi.softPwmWrite(*args)
|
|
||||||
softPwmWrite = __wiringpi.softPwmWrite
|
|
||||||
# This file is compatible with both classic and new-style classes.
|
|
||||||
|
|
||||||
cvar = __wiringpi.cvar
|
|
||||||
|
|
||||||
@ -1,85 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
check-make-ok()
|
|
||||||
{
|
|
||||||
if [ $? != 0 ]; then
|
|
||||||
echo ""
|
|
||||||
echo "Make Failed..."
|
|
||||||
echo "Please check the messages and fix any problems. If you're still stuck,"
|
|
||||||
echo "then please email all the output and as many details as you can to"
|
|
||||||
echo " projects@drogon.net"
|
|
||||||
echo ""
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ x$1 = "xclean" ]; then
|
|
||||||
echo Cleaning
|
|
||||||
echo
|
|
||||||
cd wiringPi
|
|
||||||
make clean
|
|
||||||
cd ../gpio
|
|
||||||
make clean
|
|
||||||
cd ../examples
|
|
||||||
make clean
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ x$1 = "xuninstall" ]; then
|
|
||||||
echo Uninstalling
|
|
||||||
echo
|
|
||||||
echo "WiringPi library"
|
|
||||||
cd wiringPi
|
|
||||||
sudo make uninstall
|
|
||||||
echo
|
|
||||||
echo "GPIO Utility"
|
|
||||||
cd ../gpio
|
|
||||||
sudo make uninstall
|
|
||||||
cd ..
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
echo "wiringPi Build script"
|
|
||||||
echo "====================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
# Check for I2C being installed...
|
|
||||||
# ... and if-so, then automatically make the I2C helpers
|
|
||||||
|
|
||||||
if [ -f /usr/include/linux/i2c-dev.h ]; then
|
|
||||||
grep -q i2c_smbus_read_byte /usr/include/linux/i2c-dev.h
|
|
||||||
if [ $? = 0 ]; then
|
|
||||||
target=i2c
|
|
||||||
echo "Building wiringPi with the I2C helper libraries."
|
|
||||||
else
|
|
||||||
target=all
|
|
||||||
echo "The wiringPi I2C helper libraries will not be built."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "WiringPi library"
|
|
||||||
cd wiringPi
|
|
||||||
sudo make uninstall
|
|
||||||
make $target
|
|
||||||
check-make-ok
|
|
||||||
sudo make install
|
|
||||||
check-make-ok
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "GPIO Utility"
|
|
||||||
cd ../gpio
|
|
||||||
make
|
|
||||||
check-make-ok
|
|
||||||
sudo make install
|
|
||||||
check-make-ok
|
|
||||||
|
|
||||||
# echo
|
|
||||||
# echo "Examples"
|
|
||||||
# cd ../examples
|
|
||||||
# make
|
|
||||||
# cd ..
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo All Done.
|
|
||||||
Loading…
Reference in new issue