How to use the liquidctl.pmbus.WriteBit function in liquidctl

To help you get started, we’ve selected a few liquidctl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jonasmalacofilho / liquidctl / liquidctl / driver / corsair_hid_psu.py View on Github external
def _exec(self, writebit, command, data=None):
        self._write([_SLAVE_ADDRESS | WriteBit(writebit), CMD(command)] + (data or []))
        return self._read()
github jonasmalacofilho / liquidctl / liquidctl / driver / corsair_hid_psu.py View on Github external
def _get_fan_control_mode(self):
        """Get hardware/software fan control mode."""
        return FanControlMode(self._exec(WriteBit.READ, _CORSAIR_FAN_CONTROL_MODE)[2])
github jonasmalacofilho / liquidctl / liquidctl / driver / corsair_hid_psu.py View on Github external
def _get_timedelta(self, command):
        """Get timedelta with `command`."""
        secs = int.from_bytes(self._exec(WriteBit.READ, command)[2:], byteorder='little')
        return timedelta(seconds=secs)