diff options
Diffstat (limited to 'Linux_x86/phDal4Nfc_uart.c')
-rw-r--r-- | Linux_x86/phDal4Nfc_uart.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Linux_x86/phDal4Nfc_uart.c b/Linux_x86/phDal4Nfc_uart.c index 7ff9c4c..a2f6db3 100644 --- a/Linux_x86/phDal4Nfc_uart.c +++ b/Linux_x86/phDal4Nfc_uart.c @@ -342,7 +342,7 @@ int phDal4Nfc_uart_read(uint8_t * pBuffer, int nNbBytesToRead) read_property(); // Read timeout: - // FW mode: no timeout + // FW mode: 10s timeout // 1 byte read: steady-state LLC length read, allowed to block forever // >1 byte read: LLC payload, 100ms timeout (before pn544 re-transmit) if (nNbBytesToRead > 1 && !libnfc_firmware_mode) { @@ -353,6 +353,10 @@ int phDal4Nfc_uart_read(uint8_t * pBuffer, int nNbBytesToRead) timeout.tv_nsec -= 1000000000; } ptv = &tv; + } else if (libnfc_firmware_mode) { + clock_gettime(CLOCK_MONOTONIC, &timeout); + timeout.tv_sec += 10; + ptv = &tv; } else { ptv = NULL; } |