def setPinValue(self, aValue): """ Set pin value \param aValue value to write """ try: wrapper.setPinValue(self.__device, aValue) except Exception, e: raise AsGpioError(str(e))
def setPinDirection(self, aDirection): """ Set period in us \param aDirection pin direction "in":input "out":output """ try: wrapper.setPinDirection(self.__device, aDirection) except Exception, e: raise AsGpioError(str(e))
def getIrqMode(self): """ get irq mode """ try: return wrapper.getIrqMode(self.__device) except Exception, e: raise AsGpioError(str(e))
def getPinDirection(self): """ Set period in us \param aDirection pin direction 0:input 1:output """ try: return wrapper.getPinDirection(self.__device) except Exception, e: raise AsGpioError(str(e))
def getPinNumber(self): """ Get pin number \param return pin number """ try: return wrapper.getPinNumber(self.__device) except Exception, e: raise AsGpioError(str(e))
def setIrqMode(self, aMode): """ Set irq Mode \param aMode. "none" "rising" "falling" "both" """ try: return wrapper.setIrqMode(self.__device, aMode) except Exception, e: raise AsGpioError(str(e))
def blockingGetPinValue(self, aDelay_ms): """ Get pin value (blocking mode) \param return pin value """ try: return wrapper.blockingGetPinValue(self.__device, aDelay_ms) except Exception, e: raise AsGpioError(str(e))
def getPinValue(self): """ Get pin value \param return pin value """ try: return wrapper.getPinValue(self.__device) except Exception, e: raise AsGpioError(str(e))
def blockingGetPinValue(self, aDelay_ms): """ Get pin value (blocking mode) \param return pin value """ try: return wrapper.blockingGetPinValue(self.__device, aDelay_ms); except Exception, e: raise AsGpioError(str(e))
def setIrqMode(self, aMode): """ Set irq Mode \param aMode. 1:MODE_NOINT 2:MODE_RISING 3:MODE_FALLING 4:MODE_BOTH """ try: return wrapper.setIrqMode(self.__device, aMode) except Exception, e: raise AsGpioError(str(e))
def __init__(self, aPortLetter, aPinNum): try: self.__device = wrapper.gpio_open(aPortLetter, aPinNum) except Exception, e: raise AsGpioError("Can't open GPIO port "+str(aPortLetter)+\ " pin "+str(aPinNum)+": "+str(e))
def __init__(self, aGpioNum): try: self.__device = wrapper.gpio_open(aGpioNum) except Exception, e: raise AsGpioError("Can't open GPIO number " + str(aGpioNum) + ": " + str(e))
def __del__(self): try: wrapper.gpio_close(self.__device) except Exception, e: pass
def __init__(self, aGpioNum): try: self.__device = wrapper.gpio_open(aGpioNum) except Exception, e: raise AsGpioError("Can't open GPIO number "+str(aGpioNum)+": "+str(e))