Public Member Functions | Public Attributes | List of all members
gpio_control.gpio_control_utils._GenericOutputPin Class Reference

Public Member Functions

def __init__ (self, configured_pinbus_object, pin, set_high_=None, set_low_=None)
 
def close (self)
 
def set_high (self)
 
def set_low (self)
 

Public Attributes

 configured_pinbus_object
 
 pin
 
 set_high_func
 
 set_low_func
 
 type
 

Detailed Description

Class to provide consistent function calls to different pin outputs.

Takes in three functions as arguments, which allows us to call 'configure', 'set_low',
and 'set_high' on this class later, despite it being any actual implementation of gpio control
Also provide the option of an 'additional_shutdown' to run on close() if necessary.

We're using functional programming here and elsewhere. If you aren't familiar with that, give
that topic a quick read: https://docs.python.org/3/howto/functional.html.
If you're reading this because you'd like to contribute (thanks!) but are feeling daunted,
please feel free to open an issue on the tracker so I can work with you on that.

Definition at line 101 of file gpio_control_utils.py.

Constructor & Destructor Documentation

def gpio_control.gpio_control_utils._GenericOutputPin.__init__ (   self,
  configured_pinbus_object,
  pin,
  set_high_ = None,
  set_low_ = None 
)

Definition at line 115 of file gpio_control_utils.py.

Member Function Documentation

def gpio_control.gpio_control_utils._GenericOutputPin.close (   self)
Make sure we're cleaning up while we shut down here 

Definition at line 131 of file gpio_control_utils.py.

def gpio_control.gpio_control_utils._GenericOutputPin.set_high (   self)
Pull the pin high (typically 3.3v or 5v), but don't try to run None 

Definition at line 127 of file gpio_control_utils.py.

def gpio_control.gpio_control_utils._GenericOutputPin.set_low (   self)
Pull the pin low (0v), but don't try to run None 

Definition at line 123 of file gpio_control_utils.py.

Member Data Documentation

gpio_control.gpio_control_utils._GenericOutputPin.configured_pinbus_object

Definition at line 118 of file gpio_control_utils.py.

gpio_control.gpio_control_utils._GenericOutputPin.pin

Definition at line 121 of file gpio_control_utils.py.

gpio_control.gpio_control_utils._GenericOutputPin.set_high_func

Definition at line 119 of file gpio_control_utils.py.

gpio_control.gpio_control_utils._GenericOutputPin.set_low_func

Definition at line 120 of file gpio_control_utils.py.

gpio_control.gpio_control_utils._GenericOutputPin.type

Definition at line 116 of file gpio_control_utils.py.


The documentation for this class was generated from the following file:


gpio_control
Author(s):
autogenerated on Thu Apr 22 2021 02:55:39