adafruit / Adafruit_CircuitPython_PN532

CircuitPython driver for the PN532 NFC/RFID Breakout and PN532 NFC/RFID Shield
MIT License
91 stars 47 forks source link

Add commented out import for DigitalInOut #25

Closed xon235 closed 5 years ago

xon235 commented 5 years ago

This seems to be the better way in order to avoid confusion

tannewt commented 5 years ago

How does this avoid confusion? Is there a context for this that I'm missing?

caternuson commented 5 years ago

Is it to go along with these commented out lines? https://github.com/adafruit/Adafruit_CircuitPython_PN532/blob/b949e87e1a1ff46128ca8102dda78534719a77ea/examples/pn532_readwrite_mifare.py#L46-L52

xon235 commented 5 years ago

Is it to go along with these commented out lines?

https://github.com/adafruit/Adafruit_CircuitPython_PN532/blob/b949e87e1a1ff46128ca8102dda78534719a77ea/examples/pn532_readwrite_mifare.py#L46-L52

Yes, since we are letting others choose which connection or feature to choose by uncommenting lines, we might as well include import lines for required imports when uncommenting lines such as line 48, 51 and also 56. Which all requires DigitalInOut.

I first came across this when trying this example using SPI.

caternuson commented 5 years ago

Thanks. Looks good. Hopefully that will be a little more clear and less confusing when trying to use I2C/SPI.