def read_byte_data ( self , addr , cmd ) : self . _set_addr ( addr ) res = SMBUS . i2c_smbus_read_byte_data ( self . _fd , ffi . cast ( "__u8" , cmd ) ) if res == - 1 : raise IOError ( ffi . errno ) return res
read byte data smbus python
read_byte_data ( addr cmd ) - > result
def read_byte_data(self, addr, cmd):
        """read_byte_data(addr, cmd) -> result

        Perform SMBus Read Byte Data transaction.
        """
        self._set_addr(addr)
        res = SMBUS.i2c_smbus_read_byte_data(self._fd, ffi.cast("__u8", cmd))
        if res == -1:
            raise IOError(ffi.errno)
        return res