Skip to content

Commit ab93e45

Browse files
committed
libnfc: fix pn532 driver error
1 parent 5bc6aaf commit ab93e45

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

components/nfc/nfc/config.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
* Author: Jack Chen <[email protected]>
66
*/
77

8-
#if defined(CONFIG_PN532_IFCE_UART)
9-
#define DRIVER_PN532_UART_ENABLED
10-
#elif defined(CONFIG_PN532_IFCE_I2C)
11-
#define DRIVER_PN532_I2C_ENABLED
12-
#endif
8+
#define DRIVER_PN532_UART_ENABLED
139

1410
#define PACKAGE_VERSION "libnfc-1.7.1"

main/src/user/nfc_app.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@ static void nfc_app_task_handle(void *pvParameter)
6060
);
6161
xLastWakeTime = xTaskGetTickCount();
6262
// Open NFC device
63-
#ifdef CONFIG_PN532_IFCE_UART
6463
while ((pnd = nfc_open(context, "pn532_uart:uart1:115200")) == NULL) {
65-
#else
66-
while ((pnd = nfc_open(context, "pn532_i2c:i2c0")) == NULL) {
67-
#endif
6864
ESP_LOGE(TAG, "device reset");
6965
pn532_setpin_reset(0);
7066
vTaskDelay(100 / portTICK_RATE_MS);

0 commit comments

Comments
 (0)