+
     h(2  c                   s   ^ RI Ht ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 Rt
]P                  t^t^t^
t^t^	t^t^ t^t^t^t^t^	t^t^t^t^	t^t^!t^)t^t^t ^	t!^#t"^"t#^t$^t%^t&^t'^ t(^t)^ t*^t+^t,^t-Rt.^t/^t0^ t1^ t2^t3^ t4^t5^t6^t7^t8^t9^t:^
t;^ t<^t=^	t>^t?^t@^tA^tB^tC^ tD^`tE^ tF^@tG ! R R]H4      tI ! R R]H4      tJ ! R	 R
]H4      tK ! R R]P                  4      tM ! R R]H4      tN ! R R]H4      tOR tPR# )    N)groupbyzWander Lairson Costai  c                   s*   a  ] tR t^gt o RtR tRtV tR# )EndpointzEndpoint descriptor object.c                s    VP                   V n        VP                  V n        VP                  V n        \        P                  ! VP                  4      V n	        R # N)
ZbEndpointAddressaddressZ	bIntervalintervalZwMaxPacketSizemaxPacketSizeutilZendpoint_typebmAttributestype)selfZep   &&//usr/lib/python3.14/site-packages/usb/legacy.py__init__ZEndpoint.__init__i   s>    **..&&r7	    )r   r   r   r	   N__name__
__module____qualname____firstlineno____doc__r   __static_attributes____classdictcell__Z__classdict__   @r   r   r   g   s     &8 8r   r   c                   s*   a  ] tR t^ot o RtR tRtV tR# )	InterfacezInterface descriptor object.c                s   VP                   V n        VP                  V n        VP                  V n        VP
                  V n        VP                  V n        VP                  V n
        V Uu. uF  p\        V4      NK  	  upV n        R # u upi r   )ZbAlternateSettingalternateSettingZbInterfaceNumberinterfaceNumber
iInterfaceZbInterfaceClassinterfaceClassZbInterfaceSubClassinterfaceSubClassZbInterfaceProtocolinterfaceProtocolr   	endpoints)r
   ZintfZe   && r   r   ZInterface.__init__q   sp     $ 6 6#44//"22!%!8!8!%!8!8/34t!(1+t44s   +B	)r   r    r   r   r   r   r   Nr   r   r   r   r   r   o   s     '5 5r   r   c                   s*   a  ] tR t^zt o RtR tRtV tR# )Configurationz Configuration descriptor object.c           
     s   VP                   V n         VP                  ^,          V n        VP                  ^,	          ^,          V n        VP                  ^,	          ^,          V n        VP                  V n        VP                  V n	        \        \        V Uu. uF  p\        V4      NK  	  upR R7      R 4       UUu. uF  w  r4\        V4      NK  	  uppV n        R# u upi u uppi )i   c                     V P                   # r   )r   i   &r   <lambda>(Configuration.__init__.<locals>.<lambda>   s
    a6G6Gr   Zkeyc                 r#   r   )r   r$   r&   r   r'   r(      s
    a.@.@r   N)iConfigurationZ	bMaxPowermaxPowerr   remoteWakeupselfPoweredZwTotalLengthtotalLengthZbConfigurationValuevaluer   sortedr   Zlist
interfaces)r
   Zcfgr%   kgs   &&   r   r   ZConfiguration.__init__|   s    !00* --2a7,,1Q6++,,
07$*?B(Cs!1s(C,G%& %A1B1BDG 1B )Ds   C ?C%)r*   r1   r+   r,   r-   r.   r/   Nr   r   r   r   r"   r"   z   s     + r   r"   c                   s   a  ] tR t^t o R tR tRR ltRR ltRR ltRR lt	RR lt
R tR	 tR
 tR tR tR tR tRR ltRR ltR tRtV tR# )DeviceHandlec                s     Wn         R V n        R # r   )dev _DeviceHandle__claimed_interface)r
   r5   r   r   r   ZDeviceHandle.__init__   s    #' r   c                s    \        V R 4      '       d>   V P                  '       d*   \        P                  ! V P                  4       RV n        R# R# R# )r5   N)Zhasattrr5   r   Zdispose_resourcesr
   r&   r   _finalize_objectZDeviceHandle._finalize_object   s8    4DHHH""488,DH %-r   c                :    V P                   P                  WV4      # )a'  Perform a bulk write request to the endpoint specified.

Arguments:
    endpoint: endpoint number.
    buffer: sequence data buffer to write.
            This parameter can be any sequence type.
    timeout: operation timeout in milliseconds. (default: 100)
Returns the number of bytes written.
r5   Zwriter
   endpointbuffertimeout   &&&&r   	bulkWriteZDeviceHandle.bulkWrite        xx~~h88r   c                r9   )zPerforms a bulk read request to the endpoint specified.

Arguments:
    endpoint: endpoint number.
    size: number of bytes to read.
    timeout: operation timeout in milliseconds. (default: 100)
Returns a tuple with the data read.
r5   Zreadr
   r<   Zsizer>   r?   r   bulkReadZDeviceHandle.bulkRead        xx}}XW55r   c                r9   )a,  Perform a interrupt write request to the endpoint specified.

Arguments:
    endpoint: endpoint number.
    buffer: sequence data buffer to write.
            This parameter can be any sequence type.
    timeout: operation timeout in milliseconds. (default: 100)
Returns the number of bytes written.
r:   r;   r?   r   interruptWriteZDeviceHandle.interruptWrite   rA   r   c                r9   )zPerforms a interrupt read request to the endpoint specified.

Arguments:
    endpoint: endpoint number.
    size: number of bytes to read.
    timeout: operation timeout in milliseconds. (default: 100)
Returns a tuple with the data read.
rB   rC   r?   r   interruptReadZDeviceHandle.interruptRead   rE   r   c           	     sD    V P                   P                  VVVVVVR7      # )a~  Perform a control request to the default control pipe on a device.

Arguments:
    requestType: specifies the direction of data flow, the type
                 of request, and the recipient.
    request: specifies the request.
    buffer: if the transfer is a write transfer, buffer is a sequence
            with the transfer data, otherwise, buffer is the number of
            bytes to read.
    value: specific information to pass to the device. (default: 0)
           index: specific information to pass to the device. (default: 0)
    timeout: operation timeout in milliseconds. (default: 100)
Returns the number of bytes written.
)ZwValueZwIndexZdata_or_wLengthr>   )r5   Zctrl_transfer)r
   ZrequestTypeZrequestr=   r/   indexr>   s   &&&&&&&r   
controlMsgZDeviceHandle.controlMsg   s2     xx%%""&,% & ' 	'r   c                s<    V P                   P                  V4       R# )z]Clears any halt status on the specified endpoint.

Arguments:
    endpoint: endpoint number.
N)r5   Z
clear_haltr
   r<   r   r   	clearHaltZDeviceHandle.clearHalt   s     	H%r   c                s    \        V\        4      '       d   VP                  p\        P                  ! V P
                  V4       Wn        R# )ztClaims the interface with the Operating System.

Arguments:
    interface: interface number or an Interface object.
N)
isinstancer   r   r   Zclaim_interfacer5   r6   r
   Z	interfacer   r   claimInterfaceZDeviceHandle.claimInterface   s6     i++!11ITXXy1#, r   c                sj    \         P                  ! V P                  V P                  4       RV n        R# )z<Release an interface previously claimed with claimInterface.N)r   Zrelease_interfacer5   r6   r7   r&   r   releaseInterfaceZDeviceHandle.releaseInterface   s$    txx)A)AB#% r   c                s:    V P                   P                  4        R# )zOReset the specified device by sending a RESET
down the port it is connected to.N)r5   resetr7   r&   r   rQ   ZDeviceHandle.reset   s     	r   c                s(    V P                  V4       R# )zXReset all states for the specified endpoint.

Arguments:
    endpoint: endpoint number.
N)rK   rJ   r   r   resetEndpointZDeviceHandle.resetEndpoint   s     	x r   c                    \        V\        4      '       d   VP                  pV P                  P	                  V4       R# )zzSet the active configuration of a device.

Arguments:
    configuration: a configuration value or a Configuration object.
N)rL   r"   r/   r5   Zset_configuration)r
   Zconfigurationr   r   setConfigurationZDeviceHandle.setConfiguration  s.     m]33(..=""=1r   c                s    \        V\        4      '       d   VP                  pV P                  P	                  V P
                  V4       R# )zSets the active alternate setting of the current interface.

Arguments:
    alternate: an alternate setting number or an Interface object.
N)rL   r   r   r5   Zset_interface_altsettingr6   )r
   Z	alternater   r   setAltInterfaceZDeviceHandle.setAltInterface  s6     i++ 119))$*B*BINr   Nc                sb    \         P                  ! V P                  W4      P                  R4      # )a  Retrieve the string descriptor specified by index
    and langid from a device.

Arguments:
    index: index of descriptor in the device.
    length: number of bytes of the string (ignored)
    langid: Language ID. If it is omitted, the first
            language will be used.
Zascii)r   Z
get_stringr5   Zencode)r
   rH   lengthZlangidr?   r   	getStringZDeviceHandle.getString  s$     txx7>>wGGr   c                sF    \         P                  ! V P                  W1V4      # )zRetrieves a descriptor from the device identified by the type
and index of the descriptor.

Arguments:
    desc_type: descriptor type.
    desc_index: index of the descriptor.
    len: descriptor length.
    endpoint: ignored.
)controlZget_descriptorr5   )r
   Z	desc_typeZ
desc_indexrV   r<   s   &&&&&r   getDescriptorZDeviceHandle.getDescriptor#  s     %%dhh:NNr   c                rS   )zDetach a kernel driver from the interface (if one is attached,
    we have permission and the operation is supported by the OS)

Arguments:
    interface: interface number or an Interface object.
N)rL   r   r   r5   Zdetach_kernel_driverrM   r   r   detachKernelDriverZDeviceHandle.detachKernelDriver/  s.     i++!11I%%i0r   )Z__claimed_interfacer5   )d   )r    r    r[   r   )rO   )r   r   r   r   r   r8   r@   rD   rF   rG   rI   rK   rN   rP   rQ   rR   rT   rU   rW   rY   rZ   r   r   r   r   r   r4   r4      sb     (

9	6
9	6'.&
-&

!	2	O
H
O
1 
1r   r4   c                   s0   a  ] tR tRt o RtR tR tRtV tR# )Devicei;  zDevice descriptor objectc                s>   VP                   V n        VP                  V n        VP                  V n        \        VP                  ^,	          ^,          4      \        VP                  ^,	          ^,          4      ,           R,           \        VP                  ^,	          ^,          4      ,           \        VP                  ^,          4      ,           V n        VP                  V n
        RV n        VP                  V n        VP                  V n        VP                  V n        VP                  V n        VP                   V n        VP"                  V n        \        VP&                  ^,	          ^,          4      \        VP&                  ^,	          ^,          4      ,           R,           \        VP&                  ^,	          ^,          4      ,           \        VP&                  ^,          4      ,           V n        V Uu. uF  p\+        V4      NK  	  upV n        Wn        R# u upi )i   Z. N)ZbDeviceClassdeviceClassZbDeviceSubClassdeviceSubClassZbDeviceProtocoldeviceProtocolZstrZ	bcdDevicedeviceVersionr   devnumfilenameiManufactureriProductiSerialNumber	idProductidVendorZbMaxPacketSize0r   ZbcdUSB
usbVersionr"   configurationsr5   )r
   r5   Zcr!   r   r   ZDevice.__init__=  s   ++!11!11 #--2"5!<=!!3s :;<   !!3s :;<   34	5
 kk .. .. 00szzR/367cjjAo456 cjjAo456 SZZ#-.	/
 :==A}Q/= >s   6Hc                s,    \        V P                  4      # )z8Open the device for use.

Returns a DeviceHandle object
)r4   r5   r7   r&   r   openZDevice.openV  s    
 DHH%%r   )rj   r5   r^   r`   r_   ra   rb   rc   rd   re   rf   rg   rh   r   ri   N)	r   r   r   r   r   r   rk   r   r   r   r   r   r\   r\   ;  s     #2& &r   r\   c                   s*   a  ] tR tRt o RtR tRtV tR# )Busi]  zBus object.c                s    R V n         V Uu. uF  p\        V4      NK  	  upV n        V P                  ^ ,          P                  P                  V n        R# u upi )r]   N)dirnamer\   devicesr5   buslocation)r
   rn   dr!   r   r   ZBus.__init___  sC    +237aq	73Q++// 4s   A)rn   rm   rp   Nr   r   r   r   rl   rl   ]  s     0 0r   rl   c            	     sl    R \        \        \        P                  ! RR7      R R7      R 4       4       # )z$Returns a tuple with the usb busses.c              3   s<   "   T F  w  r\        V4      x  K  	  R # 5ir   )rl   )Z.0r2   r3   s   &  r   Z	<genexpr>Zbusses.<locals>.<genexpr>f  s         tqCFF  s   T)Zfind_allc                 r#   r   ro   rq   r&   r   r'   busses.<locals>.<lambda>g  s    155r   r)   c                 r#   r   rr   rs   r&   r   r'   rt   h  s    aeer   )r   r0   coreZfind r   r   bussesrw   d  s.    w499d+A   r   )QZusb.coreru   Zusb.utilr   Zusb._objfinalizerZ_objfinalizerZusb.controlrX   Z	itertoolsr   Z
__author__ZUSBErrorZCLASS_AUDIOZ
CLASS_COMMZ
CLASS_DATAZ	CLASS_HIDZ	CLASS_HUBZCLASS_MASS_STORAGEZCLASS_PER_INTERFACEZCLASS_PRINTERZCLASS_WIRELESS_CONTROLLERZCLASS_VENDOR_SPECZ	DT_CONFIGZDT_CONFIG_SIZEZ	DT_DEVICEZDT_DEVICE_SIZEZDT_ENDPOINTZDT_ENDPOINT_AUDIO_SIZEZDT_ENDPOINT_SIZEZDT_HIDZDT_HUBZDT_HUB_NONVAR_SIZEZDT_INTERFACEZDT_INTERFACE_SIZEZDT_PHYSICALZ	DT_REPORTZ	DT_STRINGZENDPOINT_ADDRESS_MASKZENDPOINT_DIR_MASKZENDPOINT_INZENDPOINT_OUTZENDPOINT_TYPE_BULKZENDPOINT_TYPE_CONTROLZENDPOINT_TYPE_INTERRUPTZENDPOINT_TYPE_ISOCHRONOUSZENDPOINT_TYPE_MASKZERROR_BEGINZMAXALTSETTINGZ	MAXCONFIGZMAXENDPOINTSZMAXINTERFACESZ%PROTOCOL_BLUETOOTH_PRIMARY_CONTROLLERZRECIP_DEVICEZRECIP_ENDPOINTZRECIP_INTERFACEZRECIP_OTHERZREQ_CLEAR_FEATUREZREQ_GET_CONFIGURATIONZREQ_GET_DESCRIPTORZREQ_GET_INTERFACEZREQ_GET_STATUSZREQ_SET_ADDRESSZREQ_SET_CONFIGURATIONZREQ_SET_DESCRIPTORZREQ_SET_FEATUREZREQ_SET_INTERFACEZREQ_SYNCH_FRAMEZSUBCLASS_RF_CONTROLLERZ
TYPE_CLASSZTYPE_RESERVEDZTYPE_STANDARDZTYPE_VENDORZobjectr   r   r"   ZAutoFinalizedObjectr4   r\   rl   rw   rv   r   r   <module>rx      s  >   )  #
==

		    		  		  		       	() %        
8v 8	5 	5F $m1=44 m1^ &V  &D0& 0r   