Add I2C protocol support for PN532.

This commit is contained in:
Laurent Latil
2013-06-14 19:00:47 +02:00
committed by Philippe Teuwen
parent 6038aca7d1
commit 1b11450312
9 changed files with 920 additions and 1 deletions

View File

@@ -113,6 +113,10 @@
# include "drivers/pn532_spi.h"
#endif /* DRIVER_PN532_SPI_ENABLED */
#if defined (DRIVER_PN532_I2C_ENABLED)
# include "drivers/pn532_i2c.h"
#endif /* DRIVER_PN532_I2C_ENABLED */
#define LOG_CATEGORY "libnfc.general"
#define LOG_GROUP NFC_LOG_GROUP_GENERAL
@@ -145,11 +149,15 @@ nfc_drivers_init(void)
#if defined (DRIVER_PN532_SPI_ENABLED)
nfc_register_driver(&pn532_spi_driver);
#endif /* DRIVER_PN532_SPI_ENABLED */
#if defined (DRIVER_PN532_I2C_ENABLED)
nfc_register_driver(&pn532_i2c_driver);
#endif /* DRIVER_PN532_I2C_ENABLED */
#if defined (DRIVER_ARYGON_ENABLED)
nfc_register_driver(&arygon_driver);
#endif /* DRIVER_ARYGON_ENABLED */
}
/** @ingroup lib
* @brief Register an NFC device driver with libnfc.
* This function registers a driver with libnfc, the caller is responsible of managing the lifetime of the
@@ -189,6 +197,11 @@ nfc_init(nfc_context **context)
}
if (!nfc_drivers)
nfc_drivers_init();
//#if defined (I2C_DRIVERS_ENABLED)
// if (!i2c_drivers)
// i2c_drivers_init();
//#endif
}
/** @ingroup lib