From 4086ee67aca65c8644a6550f160ae1f2bf99195c Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Fri, 6 Dec 2019 14:31:53 +0100 Subject: [PATCH] api/customdevices: use bytes for I2C This is a more natural data type than tuples or ints for this class. --- pybricks/customdevices.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pybricks/customdevices.py b/pybricks/customdevices.py index 492a212..c4110f7 100644 --- a/pybricks/customdevices.py +++ b/pybricks/customdevices.py @@ -83,7 +83,7 @@ class I2CDevice(): length (``int``): How many bytes to read. Returns: - tuple of ``int``: Bytes returned from the device. + ``bytes``: Bytes returned from the device. """ pass @@ -93,7 +93,6 @@ class I2CDevice(): Arguments: reg (``int``): Register at which to begin writing: 0--255 or 0x00--0xFF. - data (tuple of ``int``): Tuple of the bytes to be written. To write - just one byte, a single ``int`` is also allowed. + data (``bytes``): Bytes to be written. """ pass