Adafruit_PureIO/smbus.py
def write_word_data(self, addr, cmd, val):
        """Write a word (2 bytes) of data to the specified cmd register of the
        device.  Note that this will write the data in the endianness of the
        processor running Python (typically little endian)!
        """
        assert self._device is not None, 'Bus must be opened before operations are made against it!'
        # Construct a string of data to send with the command register and word value.
        data = struct.pack('=BH', cmd & 0xFF, val & 0xFFFF)
        # Send the data to the device.
        self._select_device(addr)
        self._device.write(data)
def write_word_data(self, addr, cmd, val):
        """Write a word (2 bytes) of data to the specified cmd register of the
        device.  Note that this will write the data in the endianness of the
        processor running Python (typically little endian)!
        """
        assert self._device is not None, 'Bus must be opened before operations are made against it!'
        # Construct a string of data to send with the command register and word value.
        data = struct.pack('=BH', cmd & 0xFF, val & 0xFFFF)
        # Send the data to the device.
        self._select_device(addr)
        self._device.write(data)
def write_word_data ( self , addr , cmd , val ) : assert self . _device is not None , 'Bus must be opened before operations are made against it!' # Construct a string of data to send with the command register and word value. data = struct . pack ( '=BH' , cmd & 0xFF , val & 0xFFFF ) # Send the data to the device. self . _select_device ( addr ) self . _device . write ( data )
Write a word (2 bytes) of data to the specified cmd register of the
        device.  Note that this will write the data in the endianness of the
        processor running Python (typically little endian)!
Write a word ( 2 bytes ) of data to the specified cmd register of the device . Note that this will write the data in the endianness of the processor running Python ( typically little endian ) !