pyparts.platforms.gpio.raspberrypi_gpio
index
/home/sean/src/python/pyparts/src/pyparts/platforms/gpio/raspberrypi_gpio.py

 
Modules
       
pyparts.platforms.gpio.base_gpio
RPi.GPIO

 
Classes
       
pyparts.platforms.gpio.base_gpio.BaseDigitalInput(pyparts.platforms.gpio.base_gpio.BaseGPIO)
RaspberryPiDigitalInput(pyparts.platforms.gpio.base_gpio.BaseDigitalInput, RaspberryPiGPIO)
pyparts.platforms.gpio.base_gpio.BaseGPIO(__builtin__.object)
RaspberryPiGPIO
RaspberryPiDigitalInput(pyparts.platforms.gpio.base_gpio.BaseDigitalInput, RaspberryPiGPIO)
RaspberryPiDigitalOutput

 
class RaspberryPiDigitalInput(pyparts.platforms.gpio.base_gpio.BaseDigitalInput, RaspberryPiGPIO)
    Raspberry Pi implementation of a DigitalInput.
 
 
Method resolution order:
RaspberryPiDigitalInput
pyparts.platforms.gpio.base_gpio.BaseDigitalInput
RaspberryPiGPIO
pyparts.platforms.gpio.base_gpio.BaseGPIO
__builtin__.object

Methods defined here:
__init__(self, pin)
Creates a DigitalInput pin for a Raspberry Pi.
 
Args:
  pin: Integer. The pin to create the DigitalInput on.
add_interrupt(self, type, callback=None, debounce_time_ms=0)
Creates an interrupt on the digital input pin.
 
Args:
  type: FALLING, RISING, or BOTH. Edge type to trigger the interrupt on.
  callback. Function. The function to call when the interrupt fires.
      (default=None)
  debounce_time_ms: Integer. Debounce time to add to the interrupt.
      (default=0)
remove_interrupt(self)
Removes all interrupts from the pin.
wait_for_edge(self, type)
Block until an edge is detected.
 
Args:
  type: FALLING, RISING, or BOTH. Edge type to detect before unblocking.

Data and other attributes defined here:
INTERRUPT_BOTH = 33
INTERRUPT_FALLING = 32
INTERRUPT_RISING = 31
__abstractmethods__ = frozenset([])

Methods inherited from pyparts.platforms.gpio.base_gpio.BaseGPIO:
set_high(self)
Writes a value of HIGH to the GPIO pin.
 
Raises:
  GPIOError: Trying to write to a pin in INPUT mode will throw an
    exception.
set_low(self)
Writes a value of LOW to the GPIO pin.
 
Raises:
  GPIOError: Trying to write to a pin in INPUT mode will throw an
    exception.

Data descriptors inherited from pyparts.platforms.gpio.base_gpio.BaseGPIO:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
is_high
Checks if the GPIO pin has a value of HIGH.
 
Returns:
  True if the pin is in a HIGH state, False otherwise.
is_low
Checks if the GPIO pin has a value of LOW.
 
Returns:
  True if the GPIO pin is in a LOW state, False otherwise.
mode
Gets the mode the GPIO pin is in.
 
Returns:
  The mode being used by the GPIO pin.
pin_number
Gets the pin number of the GPIO.
 
Returns:
  The GPIO's pin number.
pull_up_down
Gets the state of the GPIO pull up or pull down resistors.
 
Returns:
  The state of the GPIO pull up or pull down resistors.

Data and other attributes inherited from pyparts.platforms.gpio.base_gpio.BaseGPIO:
BIDIRECTIONAL = 2
INPUT = 1
OUTPUT = 0
PUD_DOWN = 2
PUD_UP = 1
__metaclass__ = <class 'abc.ABCMeta'>
Metaclass for defining Abstract Base Classes (ABCs).
 
Use this metaclass to create an ABC.  An ABC can be subclassed
directly, and then acts as a mix-in class.  You can also register
unrelated concrete classes (even built-in classes) and unrelated
ABCs as 'virtual subclasses' -- these and their descendants will
be considered subclasses of the registering ABC by the built-in
issubclass() function, but the registering ABC won't show up in
their MRO (Method Resolution Order) nor will method
implementations defined by the registering ABC be callable (not
even via super()).

 
class RaspberryPiDigitalOutput(RaspberryPiGPIO)
    Raspberry Pi implementation of a DigitalOutput.
 
 
Method resolution order:
RaspberryPiDigitalOutput
RaspberryPiGPIO
pyparts.platforms.gpio.base_gpio.BaseGPIO
__builtin__.object

Methods defined here:
__init__(self, pin)
Creates a DigitalOutput pin for a Raspberry Pi.
 
Args:
  pin: Integer. The pin to create the DigitalOutput on.

Data and other attributes defined here:
__abstractmethods__ = frozenset([])

Methods inherited from pyparts.platforms.gpio.base_gpio.BaseGPIO:
set_high(self)
Writes a value of HIGH to the GPIO pin.
 
Raises:
  GPIOError: Trying to write to a pin in INPUT mode will throw an
    exception.
set_low(self)
Writes a value of LOW to the GPIO pin.
 
Raises:
  GPIOError: Trying to write to a pin in INPUT mode will throw an
    exception.

Data descriptors inherited from pyparts.platforms.gpio.base_gpio.BaseGPIO:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
is_high
Checks if the GPIO pin has a value of HIGH.
 
Returns:
  True if the pin is in a HIGH state, False otherwise.
is_low
Checks if the GPIO pin has a value of LOW.
 
Returns:
  True if the GPIO pin is in a LOW state, False otherwise.
mode
Gets the mode the GPIO pin is in.
 
Returns:
  The mode being used by the GPIO pin.
pin_number
Gets the pin number of the GPIO.
 
Returns:
  The GPIO's pin number.
pull_up_down
Gets the state of the GPIO pull up or pull down resistors.
 
Returns:
  The state of the GPIO pull up or pull down resistors.

Data and other attributes inherited from pyparts.platforms.gpio.base_gpio.BaseGPIO:
BIDIRECTIONAL = 2
INPUT = 1
OUTPUT = 0
PUD_DOWN = 2
PUD_UP = 1
__metaclass__ = <class 'abc.ABCMeta'>
Metaclass for defining Abstract Base Classes (ABCs).
 
Use this metaclass to create an ABC.  An ABC can be subclassed
directly, and then acts as a mix-in class.  You can also register
unrelated concrete classes (even built-in classes) and unrelated
ABCs as 'virtual subclasses' -- these and their descendants will
be considered subclasses of the registering ABC by the built-in
issubclass() function, but the registering ABC won't show up in
their MRO (Method Resolution Order) nor will method
implementations defined by the registering ABC be callable (not
even via super()).

 
class RaspberryPiGPIO(pyparts.platforms.gpio.base_gpio.BaseGPIO)
    Raspberry Pi implementation of a GPIO peripheral.
 
 
Method resolution order:
RaspberryPiGPIO
pyparts.platforms.gpio.base_gpio.BaseGPIO
__builtin__.object

Methods defined here:
__init__(self, pin, mode, pull_up_down=1)
Creates a GPIO pin for a Raspberry Pi.
 
Args:
  pin: Integer. The pin number to create the GPIO on.
  mode: INPUT or OUTPUT. The pin mode to put the GPIO in.
  pull_up_down: PUD_UP or PUD_DOWN. Enable pull up or pull down resistors.
      (default=PUD_UP)

Data and other attributes defined here:
__abstractmethods__ = frozenset([])

Methods inherited from pyparts.platforms.gpio.base_gpio.BaseGPIO:
set_high(self)
Writes a value of HIGH to the GPIO pin.
 
Raises:
  GPIOError: Trying to write to a pin in INPUT mode will throw an
    exception.
set_low(self)
Writes a value of LOW to the GPIO pin.
 
Raises:
  GPIOError: Trying to write to a pin in INPUT mode will throw an
    exception.

Data descriptors inherited from pyparts.platforms.gpio.base_gpio.BaseGPIO:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
is_high
Checks if the GPIO pin has a value of HIGH.
 
Returns:
  True if the pin is in a HIGH state, False otherwise.
is_low
Checks if the GPIO pin has a value of LOW.
 
Returns:
  True if the GPIO pin is in a LOW state, False otherwise.
mode
Gets the mode the GPIO pin is in.
 
Returns:
  The mode being used by the GPIO pin.
pin_number
Gets the pin number of the GPIO.
 
Returns:
  The GPIO's pin number.
pull_up_down
Gets the state of the GPIO pull up or pull down resistors.
 
Returns:
  The state of the GPIO pull up or pull down resistors.

Data and other attributes inherited from pyparts.platforms.gpio.base_gpio.BaseGPIO:
BIDIRECTIONAL = 2
INPUT = 1
OUTPUT = 0
PUD_DOWN = 2
PUD_UP = 1
__metaclass__ = <class 'abc.ABCMeta'>
Metaclass for defining Abstract Base Classes (ABCs).
 
Use this metaclass to create an ABC.  An ABC can be subclassed
directly, and then acts as a mix-in class.  You can also register
unrelated concrete classes (even built-in classes) and unrelated
ABCs as 'virtual subclasses' -- these and their descendants will
be considered subclasses of the registering ABC by the built-in
issubclass() function, but the registering ABC won't show up in
their MRO (Method Resolution Order) nor will method
implementations defined by the registering ABC be callable (not
even via super()).