+
     vi  c                   s    R t ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^@t
Rt^t]P                  t. R	Ot ! R R]4      t]tR# )
aF  liquidctl driver for NZXT E-series PSUs.

Supported devices: NZXT E500, E650 and E850.

Features:

- electrical output monitoring: complete
- general device monitoring: partial
- fan control: missing
- 12V multiple rail configuration: missing

Copyright Jonas Malaco and contributors
SPDX-License-Identifier: GPL-3.0-or-later
N)UsbHidDriverNotSupportedByDevice)CommandCode)linear_to_floatg{Gzd?c                   s   a  ] tR t^t o RtRRR/ 3RRR/ 3RRR/ 3.tR	 tR
 tR tR t	R t
R tR tR tR tR tRR ltR tR tR tRtV tR# )NzxtEPsuz NZXT E-series power supply unit.iw  iY  z	NZXT E500iY  z	NZXT E650i %  z	NZXT E850c                s    R# )z1Initialize the device.

Apparently not required.
N )selfkwargss   &,?/usr/lib/python3.14/site-packages/liquidctl/driver/nzxt_epsu.py
initializeZNzxtEPsu.initialize(   s     	    c           	     sL   V P                   P                  4        V P                  4       w  r#RV P                  \        P
                  4      R3RV P                  \        P                  4      R3RV RV 2R3.p\        \        4       F  w  rVVP                  V R2V P                  V4      R	34       VP                  V R
2V P                  \        P                  VR7      R34       VP                  V R2V P                  \        P                  VR7      R34       K  	  V# )zJGet a status report.

Returns a list of `(property, value, unit)` tuples.
ZTemperatureu   °Cz	Fan speedZrpmzFirmware versionZ/Z z output voltageZVz output current)pageZAz output powerZW)deviceZclear_enqueued_reports_get_fw_versions
_get_floatCMDZREAD_TEMPERATURE_2ZREAD_FAN_SPEED_1Z	enumerate_RAILSZappend	_get_voutZ	READ_IOUTZ	READ_POUT)r   r   Zfw_humanZfw_camZstatusZiZnames   &,     r	   
get_statusZNzxtEPsu.get_status0   s
    	**,002DOOC,B,BCUK$//#*>*>?GH:Qvh!7<

 !(GAMMdV?3T^^A5FLMMMdV?3T__S]]YZ_5[]`abMMdV=14??3==WX?3Y[^_` ) r   c                    \        4       hzNot supported by this device.r   )r   channelmodeZcolorsr      &&&&,r	   	set_colorZNzxtEPsu.set_colorC       "$$r   c                r   r   r   )r   r   Zprofiler      &&&,r	   set_speed_profileZNzxtEPsu.set_speed_profileG   r   r   c                r   r   r   )r   r   Zdutyr   r   r	   set_fixed_speedZNzxtEPsu.set_fixed_speedK   r   r   c                s    \        V4      \        8:  g   Q h\        ^\        ,           4      pW^^\        V4      ,           % V P                  P	                  V4       R# )   N)Zlen_REPORT_LENGTHZ	bytearrayr   Zwrite)r   dataZpackets   && r	   _writeZNzxtEPsu._writeO   sG    4yN***1~-.#'q!c$i- &!r   c                s@    V P                   P                  \        4      # N)r   Zreadr   r      &r	   _readZNzxtEPsu._readU   s    {{//r   c                s:    \         P                  ! \        4       R# )zGive the device some time and avoid error responses.

Not well understood but probably related to the PIC16F1455
microcontroller.  It is possible that it isn't just used for a "dumb"
PMBus/HID bridge, requiring time to be left for other tasks.
N)timeZsleep
_MIN_DELAYr#   r$   r	   _waitZNzxtEPsu._waitX   s     	

:r   c                sJ   R p^^ V^,           ^^`V.p\        \        4       F]  pV P                  4        V P                  V4       V P	                  4       pV^ ,          ^8X  g   KD  V^,          V^,           8X  g   K[  Tp M	  V'       g   Q R\         R24       hV^^V,            # Nzinvalid response (attempts=Z))range	_ATTEMPTSr(   r!   r%   )r   cmddata_lenr    msg_ress   &&&    r	   
_exec_readZNzxtEPsu._exec_readb   s    Q1as3y!AJJLKK**,C 1v~#a&HqL"8 " ?29+Q??tAq8|%%r   c           	     s   R p^^ V^,           ^^`\         P                  ^W.	p\        \        4       Fm  pV P	                  4        V P                  V4       V P                  4       pV^ ,          ^8X  g   KD  V^,          V^,           8X  g   K[  V^,          V8X  g   Kk  Tp M	  V'       g   Q R\         R24       hV^^V,            # r)   )r   ZPAGE_PLUS_READr*   r+   r(   r!   r%   )r   r   r,   r-   r    r.   r/   r0   s   &&&&    r	   _exec_page_plus_readZNzxtEPsu._exec_page_plus_readr   s    Q1as/A/A1dPy!AJJLKK**,C 1v~#a&HqL"8SVx=O " ?29+Q??tAq8|%%r   Nc                sv    Vf   \        V P                  V^4      4      # \        V P                  W!^4      4      # r"   )r   r1   r2   )r   r,   r   s   &&&r	   r   ZNzxtEPsu._get_float   s5    <"4??3#:;;"4#<#<T#JKKr   c                s    V P                  V\        P                  ^4      ^ ,          pV^,	          ^ 8X  g   Q hV P                  V\        P                  ^4      p\	        W2^,          4      # )r   )r2   r   Z	VOUT_MODEZ	READ_VOUTr   )r   Zrailr   Zvouts   &&  r	   r   ZNzxtEPsu._get_vout   sV    ((s}}a@CqyA~~((s}}a@tD[11r   c                s    V P                  \        ^4      w  r\        V.4      P                  4        VR 2p\        P                  \        P                  V4      RR7      pW43# )i   Z03Zbig)Z	byteorder)r1   _SEASONIC_READ_FIRMWARE_VERSIONZbytesZdecodeZintZ
from_bytesZfromhex)r   ZminorZmajorZ	human_verZ	ascam_vers   &    r	   r   ZNzxtEPsu._get_fw_versions   sY    'FJeW~,,./bz:	NN5==#;uNM	%%r   c                r   r   r   )r   r   r   Zvaluer   r   r	   
set_screenZNzxtEPsu.set_screen   r   r   r   r"   )Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__Z_MATCHESr
   r   r   r   r   r!   r%   r(   r1   r2   r   r   r   r4   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r	   r   r      s     * 
b)	b)	b)H&%%%"0& & L2&% %r   r   )z+12V peripheralsz+12V EPS/ATX12Vz+12V motherboard/PCI-ez+5V combinedz+3.3V combined)r5   r&   Zliquidctl.driver.usbr    Zliquidctl.errorr   Zliquidctl.pmbusr   r   r   r   r'   r+   ZMFR_SPECIFIC_FCr3   r   r   ZSeasonicEDriverr   r   r	   <module>r6      sQ     - 0 . +
	"%"5"5 	lw%| w%v r   