From 0bdef6cb2aae325e50ae0af246a476453bbea497 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Mon, 11 Oct 2010 10:53:24 +0000 Subject: [PATCH] pn532_uart: send ACK frame to cancel a eventual previous command during nfc_connect() too. --- libnfc/drivers/pn532_uart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libnfc/drivers/pn532_uart.c b/libnfc/drivers/pn532_uart.c index 4e68eaa..8b69c12 100644 --- a/libnfc/drivers/pn532_uart.c +++ b/libnfc/drivers/pn532_uart.c @@ -154,6 +154,8 @@ pn532_uart_connect (const nfc_device_desc_t * pndd) uart_set_speed (sp, pndd->uiSpeed); + // Send ACK frame to cancel a previous command + pn532_uart_ack ((nfc_device_spec_t) sp); // PN532 could be powered down, we need to wake it up before line testing. pn532_uart_wakeup ((nfc_device_spec_t) sp); // Check communication using "Diagnose" command, with "Comunication test" (0x00)