| | |
- __builtin__.object
-
- BasePlatform
class BasePlatform(__builtin__.object) |
| |
An abstract class for creating platforms.
BasePlatform is what all platforms are created from. Platforms are expected
to override the methods of BasePlatform to provide different kinds of
peripheral devices like GPIO pins, PWM pins, and communication busses. |
| |
Methods defined here:
- get_digital_input(self, pin)
- get_digital_output(self, pin)
- get_hardware_spi_bus(self, port, device)
- get_i2c_bus(self)
- get_pwm_output(self, pin)
- get_software_spi_bus(self, sclk_pin, mosi_pin, miso_pin, ss_pin)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- __abstractmethods__ = frozenset(['get_digital_input', 'get_digital_output', 'get_hardware_spi_bus', 'get_i2c_bus', 'get_pwm_output', 'get_software_spi_bus'])
- __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()).
| |