Files
loustique-home/venv/lib/python3.11/site-packages/gpiozero/__pycache__/devices.cpython-311.pyc

267 lines
30 KiB
Plaintext
Raw Normal View History

2026-03-21 10:53:02 +01:00
<EFBFBD>
?<3F><>i8a<00><00><><00>ddlZddlZddlZddlZddlmZddlmZddlm Z  ddl
m Z n#e $r ddl m Z YnwxYwddlmZddlmZmZdd lmZmZmZmZmZmZmZmZmZdd
lmZd ZGd <0C>d e <20><00>Z!Gd<0E>de!<21><10><00>Z"Gd<11>dee"<22><00>Z#Gd<13>de#<23><00>Z$Gd<15>de#<23><00>Z%d<17>Z&d<18>Z'ej(e'<27><00>dS)<19>N<><01>
namedtuple)<01>chain)<01> FunctionType)<01> entry_points<74>)<01>_threads_shutdown)<02> ValuesMixin<69> SharedMixin) <09> BadPinFactory<72> DeviceClosed<65>CompositeDeviceBadName<6D>CompositeDeviceBadOrder<65>CompositeDeviceBadDevice<63>GPIOPinMissing<6E>GPIODeviceClosed<65>NativePinFactoryFallback<63>PinFactoryFallback)<01>
frozendictz<EFBFBD>Falling back to the experimental pin factory NativeFactory because no other pin factory could be loaded. For best results, install RPi.GPIO or pigpio. See https://gpiozero.readthedocs.io/en/stable/api_pins.html for more information.c<00>(<00><00>eZdZ<02>fd<01>Z<03>fd<02>Z<04>xZS)<03>GPIOMetac<00>:<00><01>t<00><00><00>||||<03><00>}|<03><00><00>D]`\}}t|t<00><00>rF|js?|jD]7}t||<05><00>r%t||<05><00>}|jr|j|_n<01>8<EFBFBD>a|S<00>N) <09>super<65>__new__<5F>items<6D>
isinstancer<00>__doc__<5F>__mro__<5F>hasattr<74>getattr)
<EFBFBD>mcls<6C>name<6D>bases<65>cls_dict<63>cls<6C> attr_name<6D>attr<74>base_cls<6C>base_fn<66> __class__s
<20><>\/home/maxime/Documents/loustiques-home/venv/lib/python3.11/site-packages/gpiozero/devices.pyrzGPIOMeta.__new__7s<><00><><00><13>g<EFBFBD>g<EFBFBD>o<EFBFBD>o<EFBFBD>d<EFBFBD>D<EFBFBD>%<25><18>:<3A>:<3A><03> (<28>~<7E>~<7E>/<2F>/<2F> "<22> "<22>O<EFBFBD>I<EFBFBD>t<EFBFBD><19>$<24> <0C>-<2D>-<2D> "<22>d<EFBFBD>l<EFBFBD> "<22> #<23> <0B>"<22>"<22>H<EFBFBD><1E>x<EFBFBD><19>3<>3<>"<22>")<29>(<28>I<EFBFBD>"><3E>"><3E><07>"<22>?<3F>"<22>+2<>?<3F>D<EFBFBD>L<EFBFBD>!<21>E<EFBFBD><45><EFBFBD><12>
<EFBFBD>c<00>d<00><01><00><05><06><07>t<00>t<00><00>sJ<00>t<00>t<00><00>r<><00>j|i|<02><01><01> <00>j<00><00><00><00><07>xjdz c_n<>#t tf$r\}t<00><00>j |i|<02><01><01>d<01>_<00>j
<00><06><00><05><06>fd<02>}|<04>_
tj <00><07><00><00>j<00><Yd}~n!d}~wwxYwt<00><00>j |i|<02><01><01>t<00>t<00><00>r <0B>jdkr!tt<00><07><00><00><00><00>_<00>S)Nrc<00><><00><04>td<01>jdz
<00><00><00>_<00>jsE <00><02><00> <00>j<00>=dS#t$rYdSwxYw# <00>j<00>=w#t$rYwwxYwxYwdS)Nrr)<04>max<61>_refs<66>
_instances<EFBFBD>KeyError)r&<00>key<65> old_close<73>selfs<00><><EFBFBD><EFBFBD>r,<00>closez GPIOMeta.__call__.<locals>.closeZs<><00><><00>!$<24>Q<EFBFBD><04>
<EFBFBD>Q<EFBFBD><0E>!7<>!7<>D<EFBFBD>J<EFBFBD><1F>:<3A>
%<25> %<25>%<25>I<EFBFBD>K<EFBFBD>K<EFBFBD>K<EFBFBD>%<25>$'<27>N<EFBFBD>3<EFBFBD>$7<>$7<>$7<><37>#+<2B>%<25>%<25>%<25>!%<25><04><04> %<25><><EFBFBD><EFBFBD><EFBFBD>%<25>$'<27>N<EFBFBD>3<EFBFBD>$7<>$7<><37>#+<2B>%<25>%<25>%<25>!%<25><04> %<25><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
%<25>
%s><00>
A <00><<00>
A
<03> A
<03> A(<03>A<04>A(<03>
A%<07>"A(<03>$A%<07>%A()<10>
issubclass<EFBFBD>GPIOBaser <00> _shared_keyr2r1r3<00>AttributeErrorr<00>__call__r7<00>weakref<65>ref<65> frozenset<65>dir<69> __attrs__) r&<00>args<67>kwargs<67>er7r4r5r6r+s ` @@@<40>r,r<zGPIOMeta.__call__Fsm<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00><1A>#<23>x<EFBFBD>(<28>(<28>(<28>(<28>(<28> <15>c<EFBFBD>;<3B> '<27> '<27>" 5<>"<22>#<23>/<2F>4<EFBFBD>2<>6<EFBFBD>2<>2<>C<EFBFBD> 8<>*<2A>s<EFBFBD>~<7E>c<EFBFBD>*<2A>,<2C>,<2C><04><14>
<EFBFBD>
<EFBFBD>a<EFBFBD><0F>
<EFBFBD>
<EFBFBD>
<EFBFBD><EFBFBD><1C>n<EFBFBD>-<2D> 8<> 8<> 8<>'<27>u<EFBFBD>w<EFBFBD>w<EFBFBD>'<27><14>8<><16>8<>8<><04><1E><04>
<EFBFBD>!<21>J<EFBFBD> <09> %<25> %<25> %<25> %<25> %<25> %<25> %<25> %<25>#<23><04>
<EFBFBD>&-<2D>k<EFBFBD>$<24>&7<>&7<><03><0E>s<EFBFBD>#<23>#<23>#<23>#<23>#<23>#<23><><EFBFBD><EFBFBD><EFBFBD>/ 8<><38><EFBFBD><EFBFBD>4$<24>5<EFBFBD>7<EFBFBD>7<EFBFBD>#<23>T<EFBFBD>4<>V<EFBFBD>4<>4<>D<EFBFBD> <1A>#<23>{<7B>+<2B>+<2B> 2<>t<EFBFBD>z<EFBFBD>Q<EFBFBD><EFBFBD><EFBFBD>&<26>s<EFBFBD>4<EFBFBD>y<EFBFBD>y<EFBFBD>1<>1<>D<EFBFBD>N<EFBFBD><13> s<00>%A&<00>&C<03>7AC<03>C)<06>__name__<5F>
__module__<EFBFBD> __qualname__rr<<00> __classcell__<5F>r+s@r,rr4sQ<00><><00><00><00><00><00> <13> <13> <13> <13> <13>.<14>.<14>.<14>.<14>.<14>.<14>.<14>.<14>.r-rc<00>R<00><00>eZdZ<02>fd<01>Zd<02>Zd<03>Zed<04><00><00>Zd<05>Zd<06>Z d<07>Z
<EFBFBD>xZ S)r9c<00><><00><01>t|d<01><00>r)||jvr td|jj<00>d|<01>d<02><05><00><00>t <00><00><00>||<02><00>S)NrA<00>'z' object has no attribute ')r rAr;r+rEr<00> __setattr__<5F>r6r#<00>valuer+s <20>r,rMzGPIOBase.__setattr__xsn<00><><00> <13>4<EFBFBD><1B> %<25> %<25> Q<01>$<24>d<EFBFBD>n<EFBFBD>*D<>*D<> <20>O<>D<EFBFBD>N<EFBFBD>+<2B>O<>O<><04>O<>O<>O<>Q<01>Q<01> Q<01><14>w<EFBFBD>w<EFBFBD>"<22>"<22>4<EFBFBD><15>/<2F>/<2F>/r-c<00>.<00>|<00><00><00>dSr<00>r7<00>r6s r,<00>__del__zGPIOBase.__del__<5F>s<00><00>* <0A>
<EFBFBD>
<EFBFBD> <0C> <0C> <0C> <0C> r-c<00><00>dS)a<>
Shut down the device and release all associated resources (such as GPIO
pins).
This method is idempotent (can be called on an already closed device
without any side-effects). It is primarily intended for interactive use
at the command line. It disables the device and releases its pin(s) for
use by another device.
You can attempt to do this simply by deleting an object, but unless
you've cleaned up all references to the object this may not work (even
if you've cleaned up all references, there's still no guarantee the
garbage collector will actually delete the object at that point). By
contrast, the close method provides a means of ensuring that the object
is shut down.
For example, if you have a breadboard with a buzzer connected to pin
16, but then wish to attach an LED instead:
>>> from gpiozero import *
>>> bz = Buzzer(16)
>>> bz.on()
>>> bz.off()
>>> bz.close()
>>> led = LED(16)
>>> led.blink()
:class:`Device` descendents can also be used as context managers using
the :keyword:`with` statement. For example:
>>> from gpiozero import *
>>> with Buzzer(16) as bz:
... bz.on()
...
>>> with LED(16) as led:
... led.on()
...
N<>rRs r,r7zGPIOBase.close<73>s
<00><00>Z <0A>r-c<00><00>t<00>)z<>
Returns :data:`True` if the device is closed (see the :meth:`close`
method). Once a device is closed you can no longer use any other
methods or properties to control or query the device.
<20><01>NotImplementedErrorrRs r,<00>closedzGPIOBase.closed<65>s
<00><00>"<22>!r-c<00>L<00>|jrt|jj<00>d<01><02><00><00>dS)Nz is closed or uninitialized)rYr r+rErRs r,<00> _check_openzGPIOBase._check_open<65>s?<00><00> <0F>;<3B> I<01><1E><17>><3E>*<2A>G<>G<>G<>I<01>I<01> I<01> I<01> Ir-c<00><00>|SrrUrRs r,<00> __enter__zGPIOBase.__enter__<5F>s<00><00><13> r-c<00>.<00>|<00><00><00>dSrrQ)r6<00>exc_type<70> exc_value<75>exc_tbs r,<00>__exit__zGPIOBase.__exit__<5F>s<00><00> <0C>
<EFBFBD>
<EFBFBD> <0C> <0C> <0C> <0C> r-) rErFrGrMrSr7<00>propertyrYr[r]rbrHrIs@r,r9r9ws<><00><><00><00><00><00><00>
0<>
0<>
0<>
0<>
0<><15><15><15>.- <0A>- <0A>- <0A>^<0E>"<22>"<22><0E>X<EFBFBD>"<22>I<01>I<01>I<01>
<14><14><14><15><15><15><15><15><15>r-r9)<01> metaclassc<00><><00><00>eZdZdZdZdd<03><01>fd<04>
Zed<05><00><00>Zed<06><00><00>Zd<07>Z d<08>Z
e d <09><00><00>Z e d
<EFBFBD><00><00>Z <0A>xZS) <0B>DeviceaG
Represents a single device of any type; GPIO-based, SPI-based, I2C-based,
etc. This is the base class of the device hierarchy. It defines the basic
services applicable to all devices (specifically the :attr:`is_active`
property, the :attr:`value` property, and the :meth:`close` method).
.. attribute:: pin_factory
This attribute exists at both a class level (representing the default
pin factory used to construct devices when no *pin_factory* parameter
is specified), and at an instance level (representing the pin factory
that the device was constructed with).
The pin factory provides various facilities to the device including
allocating pins, providing low level interfaces (e.g. SPI), and clock
facilities (querying and calculating elapsed times).
N<><01> pin_factoryc<00><><00><01>|<01>+t<00><00><00>tj|_n||_t<00><00><00><00><00>dSr)rf<00>ensure_pin_factoryrhr<00>__init__)r6rhr+s <20>r,rkzDevice.__init__<5F>sM<00><><00> <16> <1E> <12> %<25> %<25> '<27> '<27> '<27>%<25>1<>D<EFBFBD> <1C> <1C>*<2A>D<EFBFBD> <1C> <0A><07><07><18><18><1A><1A><1A><1A>r-c<00>h<00>tj<00>%t<00><00><00>t_dSdS)a<>
Ensures that :attr:`Device.pin_factory` is set appropriately.
This is called implicitly upon construction of any device, but there
are some circumstances where you may need to call it manually.
Specifically, when you wish to retrieve board information without
constructing any devices, e.g.::
Device.ensure_pin_factory()
info = Device.pin_factory.board_info
If :attr:`Device.pin_factory` is not :data:`None`, this function does
nothing. Otherwise it will attempt to locate and initialize a default
pin factory. This may raise a number of different exceptions including
:exc:`ImportError` if no valid pin driver can be imported.
N)rfrh<00>_default_pin_factoryrUr-r,rjzDevice.ensure_pin_factory<72>s/<00><00>$ <12> <1D> %<25>!'<27>!<<3C>!<<3C>!><3E>!><3E>F<EFBFBD> <1E> <1E> <1E> &<26> %r-c
<00>|<00>ddddd<05>}tj<00>d<06><00>}|<01><>|<00><00><00>D]<5D>\}} |<02>dd<08><00>\}}t ||f<01> <09><00>}t ||<04><00><00><00>}|d
kr&tjtt<00><00><00><00>|cS#t$r1}tjtd |<01>d |<07><01><04><00><00><00>Yd}~<07><>d}~wwxYwtd <0A><00><00>tj<00><00>5td<0E><0F><00>}ddd<00><00>n #1swxYwY|D]+} | j|kr| <09><00><00><00><00>cS<00>,|D]=} | j|<01><00><00>kr| <09><00><00><00><00>cS<00>>td|<01><02><02><00><00>)Nz gpiozero.pins.lgpio:LGPIOFactoryz$gpiozero.pins.rpigpio:RPiGPIOFactoryz"gpiozero.pins.pigpio:PiGPIOFactoryz"gpiozero.pins.native:NativeFactory)<04>lgpio<69>rpigpio<69>pigpio<69>native<76>GPIOZERO_PIN_FACTORY<52>:r)<01>fromlistrrzFalling back from z: z'Unable to load any default pin factory!<21>gpiozero_pin_factories)<01>groupzUnable to find pin factory )<13>os<6F>environ<6F>getr<00>split<69>
__import__r!<00>warnings<67>warnr<00>native_fallback_message<67> Exceptionrr <00>catch_warningsrr#<00>load<61>lower)
<EFBFBD>default_factoriesr#<00> entry_point<6E>mod_name<6D>cls_name<6D>modulerhrDrw<00>eps
r,rmzDevice._default_pin_factorys|<00><00>:<3A>=<3D>;<3B>;<3B> 
<EFBFBD>
<EFBFBD><19> <12>z<EFBFBD>~<7E>~<7E>4<>5<>5<><04> <0F><<3C>&7<>%<<3C>%<<3C>%><3E>%><3E>
P<01>
P<01>!<21><04>k<EFBFBD> P<01>)4<>):<3A>):<3A>3<EFBFBD><01>)B<>)B<>&<26>H<EFBFBD>h<EFBFBD>'<27><08>H<EFBFBD>;<3B>G<>G<>G<>F<EFBFBD>";<3B>'<27>&<26>(<28>";<3B>";<3B>"=<3D>"=<3D>K<EFBFBD><1B>x<EFBFBD>'<27>'<27> <20> <0A>&><3E>?V<>&W<>&W<>X<>X<>X<>&<26>&<26>&<26>&<26><> <20>P<01>P<01>P<01><1C>M<EFBFBD>*<2A>+M<><04>+M<>+M<><01>+M<>+M<>N<>N<>P<01>P<01>P<01>P<01>P<01>P<01>P<01>P<01><><EFBFBD><EFBFBD><EFBFBD>P<01><><EFBFBD><EFBFBD> <20> I<>J<>J<> J<> <1A>(<28>*<2A>*<2A> E<01> E<01>%<25>+C<>D<>D<>D<><05> E<01> E<01> E<01> E<01> E<01> E<01> E<01> E<01> E<01> E<01> E<01><><EFBFBD><EFBFBD> E<01> E<01> E<01> E<01><1C> '<27> '<27><02><15>7<EFBFBD>d<EFBFBD>?<3F>?<3F>$<24>2<EFBFBD>7<EFBFBD>7<EFBFBD>9<EFBFBD>9<EFBFBD>;<3B>;<3B>&<26>&<26>&<26>#<23><1B> '<27> '<27><02><15>7<EFBFBD>d<EFBFBD>j<EFBFBD>j<EFBFBD>l<EFBFBD>l<EFBFBD>*<2A>*<2A>$<24>2<EFBFBD>7<EFBFBD>7<EFBFBD>9<EFBFBD>9<EFBFBD>;<3B>;<3B>&<26>&<26>&<26>+<2B><1F> F<>d<EFBFBD> F<> F<>G<>G<> Gs+<00>A0B6<02>6
C1<05>'C,<05>,C1<05>D3<03>3D7<07>:D7c<00><><00> |<00><00><00>d|jj<00>d<02>S#t$rd|jj<00>d<03>cYSwxYw)N<>
<gpiozero.z object><3E> object closed>)r[r+rEr rRs r,<00>__repr__zDevice.__repr__@sk<00><00> I<01> <10> <1C> <1C> <1E> <1E> <1E>A<><04><0E> 7<>A<>A<>A<> A<><41><1B> I<01> I<01> I<01>H<><04><0E> 7<>H<>H<>H<> H<> H<> H<> I<01><><EFBFBD>s<00>#&<00>A<03>Ac<00><00>dS)aX
Called by :meth:`Factory.reserve_pins` to test whether the *other*
:class:`Device` using a common pin conflicts with this device's intent
to use it. The default is :data:`True` indicating that all devices
conflict with common pins. Sub-classes may override this to permit
more nuanced replies.
TrU)r6<00>others r,<00>_conflicts_withzDevice._conflicts_withGs <00><00><14>tr-c<00><00>t<00>)a1
Returns a value representing the device's state. Frequently, this is a
boolean value, or a number between 0 and 1 but some devices use larger
ranges (e.g. -1 to +1) and composite devices usually use tuples to
return the states of all their subordinate components.
rWrRs r,rOz Device.valueQs
<00><00>"<22>!r-c<00>*<00>t|j<00><00>S)z<>
Returns :data:`True` if the device is currently active and
:data:`False` otherwise. This property is usually derived from
:attr:`value`. Unlike :attr:`value`, this is *always* a boolean.
)<02>boolrOrRs r,<00> is_activezDevice.is_active[s<00><00><14>D<EFBFBD>J<EFBFBD><1F><1F>r-)rErFrGrrhrk<00> staticmethodrjrmr<>r<>rcrOr<>rHrIs@r,rfrf<00>s<><00><><00><00><00><00><00><08><08>"<17>K<EFBFBD>&*<2A><1B><1B><1B><1B><1B><1B><1B><12>?<3F>?<3F><12>\<5C>?<3F>(<12>-H<01>-H<01><12>\<5C>-H<01>^I<01>I<01>I<01><14><14><14><0E>"<22>"<22><0E>X<EFBFBD>"<22><0E> <20> <20><0E>X<EFBFBD> <20> <20> <20> <20> r-rfc<00><><00><00>eZdZdZddd<03><02>fd<04>
Zd<05>Z<05>fd<06>Z<06>fd<07>Zd<08>Zd <09>Z d
<EFBFBD>Z
e d <0B><00><00>Z d <0C>Z e d <0A><00><00>Ze d<0E><00><00>Ze d<0F><00><00>Ze d<10><00><00>Z<11>xZS)<11>CompositeDevicea<65>
Extends :class:`Device`. Represents a device composed of multiple devices
like simple HATs, H-bridge motor controllers, robots composed of multiple
motors, etc.
The constructor accepts subordinate devices as positional or keyword
arguments. Positional arguments form unnamed devices accessed by treating
the composite device as a container, while keyword arguments are added to
the device as named (read-only) attributes.
For example:
.. code-block:: pycon
>>> from gpiozero import *
>>> d = CompositeDevice(LED(2), LED(3), LED(4), btn=Button(17))
>>> d[0]
<gpiozero.LED object on pin GPIO2, active_high=True, is_active=False>
>>> d[1]
<gpiozero.LED object on pin GPIO3, active_high=True, is_active=False>
>>> d[2]
<gpiozero.LED object on pin GPIO4, active_high=True, is_active=False>
>>> d.btn
<gpiozero.Button object on pin GPIO17, pull_up=True, is_active=False>
>>> d.value
CompositeDeviceValue(device_0=False, device_1=False, device_2=False, btn=False)
:param Device \*args:
The un-named devices that belong to the composite device. The
:attr:`value` attributes of these devices will be represented within
the composite device's tuple :attr:`value` in the order specified here.
:type _order: list or None
:param _order:
If specified, this is the order of named items specified by keyword
arguments (to ensure that the :attr:`value` tuple is constructed with a
specific order). All keyword arguments *must* be included in the
collection. If omitted, an alphabetically sorted order will be selected
for keyword arguments.
:type pin_factory: Factory or None
:param pin_factory:
See :doc:`api_pins` for more information (this is an advanced feature
which most users can ignore).
:param Device \*\*kwargs:
The named devices that belong to the composite device. These devices
will be accessible as named attributes on the resulting device, and
their :attr:`value` attributes will be accessible as named elements of
the composite device's tuple :attr:`value`.
N)<02>_orderrhc <00><><00><01><04>d|_ti<00><00>|_d|_||_ |j<00>'t <00><04><00><00><00><00>|_nJt<00><04><00><00><00><00>t|j<00><00>z
D]}t|<05>d<02><02><00><00>t|j<00><00>|_t|j<00><00>tt|<00><00><00><00>zD]}t|<06>d<03><02><00><00>t|<03><04> <00><00><00><00>D])}t|t<00><00>st!|<07>d<04><02><00><00><01>*t<00><04><00>|_t#|jj<00>d<05>td<06>t)t+|<03><00><00><00>D<00><00>|j<00><00><00><00>|_nT#t|<03><04> <00><00><00><00>D]+}t|t<00><00>r|<07><00><00><00>,<2C>xYw|t<00>fd<07>|jD<00><00><00><00>z|_t/<00><00><00>|<02><08><00>dS) NrUz missing from _orderz is a reserved namez doesn't inherit from Device<63>Valuec3<00> K<00>|] }d|<01><00>V<00><00>
dS)<02>device_NrU)<02>.0<EFBFBD>is r,<00> <genexpr>z+CompositeDevice.__init__.<locals>.<genexpr><3E>s(<00><00><00><00>?<3F>?<3F><11>}<7D><11>}<7D>}<7D>?<3F>?<3F>?<3F>?<3F>?<3F>?r-c3<00>(<00>K<00>|] }<01>|V<00><00> dSrrU)r<><00>vrCs <20>r,r<>z+CompositeDevice.__init__.<locals>.<genexpr><3E>s'<00><><00><00><00> @<40> @<40>q<EFBFBD><16><01><19> @<40> @<40> @<40> @<40> @<40> @r-rg)<19>_allr<00>_named<65> _namedtupler<65><00>sorted<65>keys<79>setr<00>tupler@rr<00>valuesrrfrrr+rE<00>range<67>lenr7rrk) r6r<>rhrBrC<00> missing_namer#<00>devr+s ` <20>r,rkzCompositeDevice.__init__<5F>sA<00><><EFBFBD><00><16><04> <09> <20><12>n<EFBFBD>n<EFBFBD><04> <0B><1F><04><18><1C><04> <0B> <12><13>{<7B>"<22>$<24>V<EFBFBD>[<5B>[<5B>]<5D>]<5D>3<>3<><04> <0B> <0B>$'<27><06> <0B> <0B> <0A> <0A>$6<>$6<><13>T<EFBFBD>[<5B>9I<39>9I<39>$I<>?<3F>?<3F>L<EFBFBD>1<>'<27>=<3D>=<3D>=<3D>?<3F>?<3F>?<3F><1F><04> <0B>,<2C>,<2C>D<EFBFBD>K<EFBFBD><1B>D<EFBFBD>K<EFBFBD>(<28>(<28>3<EFBFBD>s<EFBFBD>4<EFBFBD>y<EFBFBD>y<EFBFBD>><3E>><3E>9<> K<01> K<01><04>,<2C><04>-I<>-I<>-I<>J<>J<>J<><1C>T<EFBFBD>6<EFBFBD>=<3D>=<3D>?<3F>?<3F>3<>3<> ><3E> ><3E><03>!<21>#<23>v<EFBFBD>.<2E>.<2E>><3E>2<><1E><<3C><<3C><<3C>><3E>><3E>><3E>><3E>%<25>V<EFBFBD>,<2C>,<2C>D<EFBFBD>K<EFBFBD>)<29><17>><3E>*<2A>1<>1<>1<><15>?<3F>?<3F>e<EFBFBD>C<EFBFBD><04>I<EFBFBD>I<EFBFBD>.><3E>.><3E>?<3F>?<3F>?<3F><14><1B>M<>M<> O<01> O<01>D<EFBFBD> <1C> <1C><> <12><1C>T<EFBFBD>6<EFBFBD>=<3D>=<3D>?<3F>?<3F>3<>3<> <20> <20><03><1D>c<EFBFBD>6<EFBFBD>*<2A>*<2A> <20><17>I<EFBFBD>I<EFBFBD>K<EFBFBD>K<EFBFBD>K<EFBFBD><4B> <11><><EFBFBD><EFBFBD><18>5<EFBFBD> @<40> @<40> @<40> @<40>D<EFBFBD>K<EFBFBD> @<40> @<40> @<40>@<40>@<40>@<40><04> <09> <0A><07><07><18><18>[<5B><18>1<>1<>1<>1<>1s <00>FF=<00>=AHc<00><><00>|dkrti<00><00>S |j|S#t$rtd|<01><00><02><00><00>wxYw)Nr<4E>zno such attribute )rr<>r3r;)r6r#s r,<00> __getattr__zCompositeDevice.__getattr__<5F>s]<00><00> <0F>8<EFBFBD> <1B> <1B><1D>b<EFBFBD>><3E>><3E> !<21> ><3E><17>;<3B>t<EFBFBD>$<24> $<24><><17> ><3E> ><3E> ><3E> <20>!<<3C>d<EFBFBD>!<<3C>!<<3C>=<3D>=<3D> =<3D> ><3E><><EFBFBD>s <00> $<00>Ac<00>~<00><01>||jvrtd|<01><00><02><00><00>t<00><00><00>||<02><00>S)Nzcan't set attribute )r<>r;rrMrNs <20>r,rMzCompositeDevice.__setattr__<5F>sA<00><><00> <0F>4<EFBFBD>;<3B> <1E> <1E> <20>!><3E><04>!><3E>!><3E>?<3F>?<3F> ?<3F><14>w<EFBFBD>w<EFBFBD>"<22>"<22>4<EFBFBD><15>/<2F>/<2F>/r-c <00>(<00><01> |<00><00><00>t|j<00><00>}d<01>|j<00><00>}t|<00><00>t|j<00><00>z
}|dkr,|dkr&d|jj<00>dt|<00><00><00>d|<02>d|<03>d<07> S|dkr#d|jj<00>dt|<00><00><00>d|<02>d<08>Sd|jj<00>dt|<00><00><00>d <09>S#t$r#t<00><00><00> <00><00>cYSwxYw)
Nz, rr<>z object containing z
devices: z and z unnamed><3E>>z unnamed devices>)
r[r<>r<><00>joinr<6E>r+rEr rr<>)r6<00>named<65>names<65>unnamedr+s <20>r,r<>zCompositeDevice.__repr__<5F>sv<00><><00> &<26> <10> <1C> <1C> <1E> <1E> <1E><17><04> <0B>$<24>$<24>E<EFBFBD><18>I<EFBFBD>I<EFBFBD>d<EFBFBD>k<EFBFBD>*<2A>*<2A>E<EFBFBD><19>$<24>i<EFBFBD>i<EFBFBD>#<23>d<EFBFBD>k<EFBFBD>"2<>"2<>2<>G<EFBFBD><14>q<EFBFBD>y<EFBFBD>y<EFBFBD>W<EFBFBD>q<EFBFBD>[<5B>[<5B>K<01><14><1E>!8<>K<01>K<01><1A>4<EFBFBD>y<EFBFBD>y<EFBFBD>K<01>K<01>,1<>K<01>K<01>8?<3F>K<01>K<01>K<01>L<01><17><11><19><19>5<><14><1E>!8<>5<>5<><1A>4<EFBFBD>y<EFBFBD>y<EFBFBD>5<>5<>,1<>5<>5<>5<>6<>
4<><14><1E>!8<>4<>4<><1A>4<EFBFBD>y<EFBFBD>y<EFBFBD>4<>4<>4<>5<><35><1C> &<26> &<26> &<26><18>7<EFBFBD>7<EFBFBD>#<23>#<23>%<25>%<25> %<25> %<25> %<25> &<26><><EFBFBD>s<00>BC$<00>(C$<00>C$<00>$*D<03>Dc<00>*<00>t|j<00><00>Sr)r<>r<>rRs r,<00>__len__zCompositeDevice.__len__<5F>s<00><00><12>4<EFBFBD>9<EFBFBD>~<7E>~<7E>r-c<00><00>|j|Sr<00>r<>)r6<00>indexs r,<00> __getitem__zCompositeDevice.__getitem__<5F>s<00><00><13>y<EFBFBD><15><1F>r-c<00>*<00>t|j<00><00>Sr)<02>iterr<72>rRs r,<00>__iter__zCompositeDevice.__iter__<5F>s<00><00><13>D<EFBFBD>I<EFBFBD><EFBFBD><EFBFBD>r-c<00><00>|jSrr<>rRs r,<00>allzCompositeDevice.all<6C>s <00><00><14>y<EFBFBD>r-c<00>v<00>t|dd<00><00>r'|jD]}|<01><00><00><00>d|_dSdS)Nr<4E>rU)r!r<>r7)r6<00>devices r,r7zCompositeDevice.close<73>sK<00><00> <12>4<EFBFBD><16><14> &<26> &<26> <1B><1E>)<29> <1F> <1F><06><16> <0C> <0C><0E><0E><0E><0E><1A>D<EFBFBD>I<EFBFBD>I<EFBFBD>I<EFBFBD> <1B> r-c<00>4<00>td<01>|D<00><00><00><00>S)Nc3<00>$K<00>|] }|jV<00><00> dSr)rY<00>r<>r<>s r,r<>z)CompositeDevice.closed.<locals>.<genexpr><3E>s$<00><00><00><00>4<>4<>V<EFBFBD>6<EFBFBD>=<3D>4<>4<>4<>4<>4<>4r-)r<>rRs r,rYzCompositeDevice.closed<65>s<00><00><12>4<>4<>t<EFBFBD>4<>4<>4<>4<>4<>4r-c<00><00>|jS)z<>
The :func:`~collections.namedtuple` type constructed to represent the
value of the composite device. The :attr:`value` attribute returns
values of this type.
)r<>rRs r,rzCompositeDevice.namedtuple<6C>s <00><00><14><1F>r-c<00>*<00>|jd<01>|D<00><00><00>S)a8
A :func:`~collections.namedtuple` containing a value for each
subordinate device. Devices with names will be represented as named
elements. Unnamed devices will have a unique name generated for them,
and they will appear in the position they appeared in the constructor.
c3<00>$K<00>|] }|jV<00><00> dSr)rOr<>s r,r<>z(CompositeDevice.value.<locals>.<genexpr>s$<00><00><00><00> A<> A<>&<26><16><1C> A<> A<> A<> A<> A<> Ar-rrRs r,rOzCompositeDevice.value<75>s"<00><00><1F>t<EFBFBD><EFBFBD> A<> A<>D<EFBFBD> A<> A<> A<>B<>Br-c<00>*<00>t|j<00><00>S)z~
Composite devices are considered "active" if any of their constituent
devices have a "truthy" value.
)<02>anyrOrRs r,r<>zCompositeDevice.is_actives<00><00> <13>4<EFBFBD>:<3A><EFBFBD><EFBFBD>r-)rErFrGrrkr<>rMr<>r<>r<>r<>rcr<>r7rYrrOr<>rHrIs@r,r<>r<>es[<00><><00><00><00><00><00>2<08>2<08>h&*<2A>t<EFBFBD>2<>2<>2<>2<>2<>2<>2<>>><3E>><3E>><3E>0<>0<>0<>0<>0<> &<26>&<26>&<26>&<26>&<26>*<1E><1E><1E> <20> <20> <20><1F><1F><1F><0E><19><19><0E>X<EFBFBD><19><1B><1B><1B> <0E>5<>5<><0E>X<EFBFBD>5<><0E> <20> <20><0E>X<EFBFBD> <20><0E>C<01>C<01><0E>X<EFBFBD>C<01><0E><1F><1F><0E>X<EFBFBD><1F><1F><1F><1F>r-r<>c<00><><00><00>eZdZdZd dd<03><01>fd<04> Zd<05>Zd<06>Z<06>fd<07>Zed<08><00><00>Z <09>fd <09>Z
ed
<EFBFBD><00><00>Z ed <0B><00><00>Z d <0C>Z <0A>xZS)<0E>
GPIODevicea
Extends :class:`Device`. Represents a generic GPIO device and provides
the services common to all single-pin GPIO devices (like ensuring two
GPIO devices do no share a :attr:`pin`).
:type pin: int or str
:param pin:
The GPIO pin that the device is connected to. See :ref:`pin-numbering`
for valid pin numbers. If this is :data:`None` a :exc:`GPIODeviceError`
will be raised. If the pin is already in use by another device,
:exc:`GPIOPinInUse` will be raised.
Nrgc<00><00><01>t<00><00><00>|<02><01><00>d|_|<01>td<02><00><00>|j<00>||<01><00>|j<00>|<01><00>}||_d|_d|_dS)Nrgz No pin givenTF) rrk<00>_pinrrh<00> reserve_pins<6E>pin<69> _active_state<74>_inactive_state)r6r<>rhr+s <20>r,rkzGPIODevice.__init__s<><00><><00> <0A><07><07><18><18>[<5B><18>1<>1<>1<><19><04> <09> <0E>;<3B> <20><1E>0<>0<> 0<> <0C><18>%<25>%<25>d<EFBFBD>C<EFBFBD>0<>0<>0<><12><1E>"<22>"<22>3<EFBFBD>'<27>'<27><03><17><04> <09>!<21><04><1A>$<24><04><1C><1C>r-c<00>2<00>t||jk<00><00>Sr)<02>intr<74>)r6<00>states r,<00>_state_to_valuezGPIODevice._state_to_value.s<00><00><12>5<EFBFBD>D<EFBFBD>.<2E>.<2E>/<2F>/<2F>/r-c<00><><00> |<00>|jj<00><00>S#ttf$r|<00><00><00><00>wxYwr)r<>r<>r<>r;<00> TypeErrorr[rRs r,<00>_readzGPIODevice._read1sT<00><00> <12><17>'<27>'<27><04><08><0E>7<>7<> 7<><37><1E> <09>*<2A> <12> <12> <12> <10> <1C> <1C> <1E> <1E> <1E> <11> <12><><EFBFBD>s <00>!<00>'Ac<00><><00><01>t<00><00><00><00><00>t|dd<00><00><00>C|j<00>||jjj<00><00>|j<00><00><00>d|_dS)Nr<4E>)rr7r!rh<00> release_pinsr<73><00>infor#)r6r+s <20>r,r7zGPIODevice.close8sc<00><><00> <0A><07><07> <0A> <0A><0F><0F><0F> <12>4<EFBFBD><16><14> &<26> &<26> 2<> <10> <1C> )<29> )<29>$<24><04> <09><0E>0C<30> D<> D<> D<> <10>I<EFBFBD>O<EFBFBD>O<EFBFBD> <1D> <1D> <1D><18><04> <09> <09> r-c<00>8<00> |jduS#t$rYdSwxYw)NT)r<>r;rRs r,rYzGPIODevice.closed?s6<00><00> <18><17>9<EFBFBD><04>$<24> $<24><><1D> <18> <18> <18><17>4<EFBFBD>4<EFBFBD> <18><><EFBFBD>s <00> <00>
<03>c<00><><00><01> t<00><00><00><00><00>dS#t$r!}tt |<01><00><00><00><00>d}~wwxYwr)rr[r r<00>str)r6rDr+s <20>r,r[zGPIODevice._check_openFsW<00><><00> +<2B> <11>G<EFBFBD>G<EFBFBD> <1F> <1F> !<21> !<21> !<21> !<21> !<21><><1B> +<2B> +<2B> +<2B>"<22>3<EFBFBD>q<EFBFBD>6<EFBFBD>6<EFBFBD>*<2A>*<2A> *<2A><><EFBFBD><EFBFBD><EFBFBD> +<2B><><EFBFBD>s<00> %<00>
A<03>A <03> Ac<00><00>|jS)aB
The :class:`Pin` that the device is connected to. This will be
:data:`None` if the device has been closed (see the
:meth:`~Device.close` method). When dealing with GPIO pins, query
``pin.number`` to discover the GPIO pin (in BCM numbering) that the
device is connected to.
)r<>rRs r,r<>zGPIODevice.pinMs <00><00><14>y<EFBFBD>r-c<00>*<00>|<00><00><00>Sr)r<>rRs r,rOzGPIODevice.valueXs<00><00><13>z<EFBFBD>z<EFBFBD>|<7C>|<7C>r-c<00><><00> d|jj<00>d|j<00>d|j<00>d<04>S#t$rd|jj<00>d<05>cYSwxYw)Nr<4E>z object on pin z , is_active=r<>r<>)r+rEr<>r<>r rRs r,r<>zGPIODevice.__repr__\s<><00><00> I<01>=<3D>T<EFBFBD>^<5E>4<>=<3D>=<3D><17>8<EFBFBD>=<3D>=<3D>+/<2F>><3E>=<3D>=<3D>=<3D> ><3E><><1C> I<01> I<01> I<01>H<><04><0E> 7<>H<>H<>H<> H<> H<> H<> I<01><><EFBFBD>s <00>"<00>?<03>?r)rErFrGrrkr<>r<>r7rcrYr[r<>rOr<>rHrIs@r,r<>r<>s
<00><><00><00><00><00><00> <08> <08> %<25><04> %<25> %<25> %<25> %<25> %<25> %<25> %<25>0<>0<>0<><12><12><12><19><19><19><19><19><0E><18><18><0E>X<EFBFBD><18> +<2B>+<2B>+<2B>+<2B>+<2B><0E><19><19><0E>X<EFBFBD><19><0E><1C><1C><0E>X<EFBFBD><1C>I<01>I<01>I<01>I<01>I<01>I<01>Ir-r<>c<00>T<00>tj<00><>tjj5d<01>tjj<00><00><00>D<00><00>}ddd<00><00>n #1swxYwY|D]}|<01><00><00><00>tj<00><00><00>dt_dSdS)Nc<00>4<00>h|]}|D]}|<02><00>}|<03>|<03><03><11>SrrU)r<><00>ref_listr>r<>s r,<00> <setcomp>z$_devices_shutdown.<locals>.<setcomp>hsF<00><00> <0E> <0E> <0E><1C>#<23> <0E> <0E><18><1F>C<EFBFBD>E<EFBFBD>E<EFBFBD>C<EFBFBD><16>?<3F> <14>#<23>?<3F>?<3F>?r-)rfrh<00> _res_lock<63> _reservationsr<73>r7)<02>reserved_devicesr<73>s r,<00>_devices_shutdownr<6E>es<><00><00> <0A><19>%<25> <13> <1F> )<29> <0E> <0E> <0E> <0E> &<26> 2<> @<40> G<> G<> I<> I<> <0E> <0E> <0E> <1C> <0E> <0E> <0E> <0E> <0E> <0E> <0E> <0E> <0E> <0E> <0E><><EFBFBD><EFBFBD> <0E> <0E> <0E> <0E>$<24> <18> <18>C<EFBFBD> <0F>I<EFBFBD>I<EFBFBD>K<EFBFBD>K<EFBFBD>K<EFBFBD>K<EFBFBD><0E><1A> <20> <20>"<22>"<22>"<22>!<21><06><1A><1A><1A>&<26>%s<00>.A<03>A<07>Ac<00>><00>t<00><00>t<00><00>dSr)r r<>rUr-r,<00> _shutdownr<6E>us <00><00><15><17><17><17><15><17><17><17><17>r-))rx<00>atexitr=r}<00> collectionsr<00> itertoolsr<00>typesr<00>importlib_metadatar<00> ImportError<6F>importlib.metadata<74>threadsr <00>mixinsr
r <00>excr r rrrrrrr<00>compatrr<00>typerr9rfr<>r<>r<>r<><00>registerrUr-r,<00><module>r<>s<><00><01>
<EFBFBD> <09> <09> <09> <0A> <0A> <0A> <0A><0E><0E><0E><0E><0F><0F><0F><0F>"<22>"<22>"<22>"<22>"<22>"<22><1B><1B><1B><1B><1B><1B><1E><1E><1E><1E><1E><1E>0<>/<2F>/<2F>/<2F>/<2F>/<2F>/<2F>/<2F><><12>0<>0<>0<>/<2F>/<2F>/<2F>/<2F>/<2F>/<2F>/<2F>/<2F>0<><30><EFBFBD><EFBFBD>'<27>&<26>&<26>&<26>&<26>&<26><02><02><02><02><02><02><02><02>
<02>
<02>
<02>
<02>
<02>
<02>
<02>
<02>
<02>
<02>
<02>
<02>
<02>
<02>
<02>
<02>
<02>
<02>
<02>
<02>
<02>
<02><1F><1E><1E><1E><1E><1E>X<01><18>@<14>@<14>@<14>@<14>@<14>t<EFBFBD>@<14>@<14>@<14>Fe<15>e<15>e<15>e<15>e<15><18>e<15>e<15>e<15>e<15>PC <20>C <20>C <20>C <20>C <20>[<5B>(<28>C <20>C <20>C <20>Li<1F>i<1F>i<1F>i<1F>i<1F>f<EFBFBD>i<1F>i<1F>i<1F>XQI<01>QI<01>QI<01>QI<01>QI<01><16>QI<01>QI<01>QI<01>h "<22> "<22> "<22> <18><18><18>
<10><06><0F> <09><1A><1A><1A><1A>s <00>+<00> 9<03>9