Skip to content

Commit 9b5cb1e

Browse files
committed
add params to docstring
1 parent 80df246 commit 9b5cb1e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

adafruit_nunchuk.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,17 @@
3535

3636

3737
class Nunchuk:
38-
"""Class which provides interface to Nintendo Nunchuk controller."""
38+
"""
39+
Class which provides interface to Nintendo Nunchuk controller.
40+
41+
:param i2c: The `busio.I2C` object to use.
42+
:param int address: (optional) The I2C address of the device.
43+
Default is 0x52.
44+
:param float i2c_read_delay: (optional) The time in seconds to pause
45+
between the I2C write and read. This needs to be at least 200us. A
46+
conservative default of 2000us is used since some hosts may not be
47+
able to achieve such timing.
48+
"""
3949

4050
def __init__(self, i2c, address=0x52, i2c_read_delay=0.002):
4151
self.buffer = bytearray(8)

0 commit comments

Comments
 (0)