adafruit / Adafruit-PN532

Arduino library for SPI and I2C access to the PN532 RFID/Near Field Communication chip
Other
421 stars 265 forks source link

Added options to manage custom I2C declaration #89

Closed FStefanni closed 1 year ago

FStefanni commented 3 years ago

Hi,

this pr add the option to pass a custom I2C instance object instead to use the Wire (or Wire1) instances. This allow users to choose which I2C instance to use, in case of platforms with more than a single I2C. Moreover, an option is also provided to avoid to call the method .begin() on the I2C instance, in case it is initialized by the user code.

The pr is fully backward compatible.

This pull request is somehow related to pr #46 , since the latter performs similar changes to support external SPI declarations.

Regards.

FStefanni commented 3 years ago

Hi,

I have seen the pipeline fails due to missing Doxygen comments, but it is not the code I changed, but all the original library code which is missing Doxygen comments. Sorry, but I have no time to fix them all. So I hope this will not block to accept the pr.

Regards.

caternuson commented 1 year ago

Closing. Added with #109.