mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-04-11 00:56:18 +00:00
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:
committed by
Philippe Teuwen
parent
a0ebd8ba15
commit
d9fd9155ea
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user