Adding a SPI driver for pn532

The driver seems to work well.
I tested it on Linux with i.mx233-based board using hardware SPI.
I tried to modify the build files as well, but it's probably a little messy.
I'm not sure whether it will work on other *nix OSes,
so it's probably better to limit the driver to Linux only using build system.
This commit is contained in:
Eugeny Boger
2013-02-28 23:24:42 +01:00
committed by Philippe Teuwen
parent a0ebd8ba15
commit d9fd9155ea
9 changed files with 1141 additions and 8 deletions

View File

@@ -105,6 +105,10 @@
# include "drivers/pn532_uart.h"
#endif /* DRIVER_PN532_UART_ENABLED */
#if defined (DRIVER_PN532_SPI_ENABLED)
# include "drivers/pn532_spi.h"
#endif /* DRIVER_PN532_SPI_ENABLED */
#define LOG_CATEGORY "libnfc.general"
#define LOG_GROUP NFC_LOG_GROUP_GENERAL
@@ -134,6 +138,9 @@ nfc_drivers_init()
#if defined (DRIVER_PN532_UART_ENABLED)
nfc_register_driver(&pn532_uart_driver);
#endif /* DRIVER_PN532_UART_ENABLED */
#if defined (DRIVER_PN532_SPI_ENABLED)
nfc_register_driver(&pn532_spi_driver);
#endif /* DRIVER_PN532_SPI_ENABLED */
#if defined (DRIVER_ARYGON_ENABLED)
nfc_register_driver(&arygon_driver);
#endif /* DRIVER_ARYGON_ENABLED */