Skip to content

Commit 13eebfd

Browse files
committed
add i2c address
1 parent f19d242 commit 13eebfd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

adafruit_pn532/i2c.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@
2929
class PN532_I2C(PN532):
3030
"""Driver for the PN532 connected over I2C."""
3131

32-
def __init__(self, i2c, *, irq=None, reset=None, req=None, debug=False):
32+
def __init__(
33+
self, i2c, address=_I2C_ADDRESS, *, irq=None, reset=None, req=None, debug=False
34+
):
3335
"""Create an instance of the PN532 class using I2C. Note that PN532
3436
uses clock stretching. Optional IRQ pin (not used),
3537
resetp pin and debugging output.
3638
"""
3739
self.debug = debug
3840
self._req = req
39-
self._i2c = i2c_device.I2CDevice(i2c, _I2C_ADDRESS)
41+
self._i2c = i2c_device.I2CDevice(i2c, address)
4042
super().__init__(debug=debug, irq=irq, reset=reset)
4143

4244
def _wakeup(self):

0 commit comments

Comments
 (0)