def readOnly(self, count): """Execute a read only transaction with the device. Read 1 to 7 bytes from a device. This method does not write any data to prompt the device. :param count: The number of bytes to read in the transaction. [1..7] :returns: The data read from the device. """ if count < 1 or count > 7: raise ValueError("count must be between 1 and 7") hal.i2CRead(self.port, self.deviceAddress, count)
def readOnly(self, count): """Execute a read only transaction with the device. Read bytes from a device. This method does not write any data to prompt the device. :param count: The number of bytes to read in the transaction. :returns: The data read from the device. """ if count < 1: raise ValueError("count must be at least 1, %s given" % count) return hal.i2CRead(self.port, self.deviceAddress, count)
def readOnly(self, count): """Execute a read only transaction with the device. Read bytes from a device. This method does not write any data to prompt the device. :param count: The number of bytes to read in the transaction. :returns: The data read from the device. :rtype: iterable of bytes """ if count < 1: raise ValueError("count must be at least 1, %s given" % count) return hal.i2CRead(self.port, self.deviceAddress, count)