pn532_uart: send ACK frame to cancel a eventual previous command during nfc_connect() too.

This commit is contained in:
Romuald Conty 2010-10-11 10:53:24 +00:00
parent 49e6fff104
commit 0bdef6cb2a

View file

@ -154,6 +154,8 @@ pn532_uart_connect (const nfc_device_desc_t * pndd)
uart_set_speed (sp, pndd->uiSpeed); 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 could be powered down, we need to wake it up before line testing.
pn532_uart_wakeup ((nfc_device_spec_t) sp); pn532_uart_wakeup ((nfc_device_spec_t) sp);
// Check communication using "Diagnose" command, with "Comunication test" (0x00) // Check communication using "Diagnose" command, with "Comunication test" (0x00)