diff --git a/CMakeLists.txt b/CMakeLists.txt index 564218b..dd7904d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,8 @@ PROJECT(libnfc C) CMAKE_MINIMUM_REQUIRED(VERSION 2.6) SET(VERSION_MAJOR "1") -SET(VERSION_MINOR "5") -SET(VERSION_PATCH "1") +SET(VERSION_MINOR "6") +SET(VERSION_PATCH "0") SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") diff --git a/configure.ac b/configure.ac index dd71f22..21238d4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # General init # /!\ Don't forget to update 'CMakeLists.txt' too /!\ -AC_INIT(libnfc, 1.5.1, info@libnfc.org) +AC_INIT(libnfc, 1.6.0, info@libnfc.org) AC_CONFIG_MACRO_DIR([m4]) diff --git a/libnfc/Makefile.am b/libnfc/Makefile.am index 7a62c23..fe373e7 100644 --- a/libnfc/Makefile.am +++ b/libnfc/Makefile.am @@ -18,7 +18,7 @@ libnfc_la_SOURCES = \ nfc-emulation.c \ nfc-internal.c -libnfc_la_LDFLAGS = -no-undefined -version-info 2:0:0 -export-symbols-regex '^nfc_|^iso14443a_|pn53x_transceive|pn53x_SAMConfiguration' +libnfc_la_LDFLAGS = -no-undefined -version-info 3:0:0 -export-symbols-regex '^nfc_|^iso14443a_|pn53x_transceive|pn53x_SAMConfiguration' libnfc_la_CFLAGS = @DRIVERS_CFLAGS@ libnfc_la_LIBADD = \ $(top_builddir)/libnfc/chips/libnfcchips.la \ diff --git a/libnfc/buses/uart_win32.c b/libnfc/buses/uart_win32.c index 8ae25ef..68d1484 100644 --- a/libnfc/buses/uart_win32.c +++ b/libnfc/buses/uart_win32.c @@ -157,7 +157,7 @@ uart_receive (serial_port sp, uint8_t * pbtRx, const size_t szRx, void * abort_p if (!SetCommTimeouts (((struct serial_port_windows *) sp)->hPort, &timeouts)) { log_put (LOG_CATEGORY, NFC_PRIORITY_ERROR, "Unable to apply new timeout settings."); - return ECOMIO; + return NFC_EIO; } log_put (LOG_CATEGORY, NFC_PRIORITY_TRACE, "Timeouts are set to %u ms", timeout_ms); @@ -175,9 +175,9 @@ uart_receive (serial_port sp, uint8_t * pbtRx, const size_t szRx, void * abort_p if (!res) { DWORD err = GetLastError(); log_put (LOG_CATEGORY, NFC_PRIORITY_ERROR, "ReadFile error: %u", err); - return ECOMIO; + return NFC_EIO; } else if (dwBytesReceived == 0) { - return ECOMTIMEOUT; + return NFC_ETIMEOUT; } if (((DWORD)szRx) > dwTotalBytesReceived) { @@ -185,12 +185,12 @@ uart_receive (serial_port sp, uint8_t * pbtRx, const size_t szRx, void * abort_p } if (abort_flag_p != NULL && (*abort_flag_p) && dwTotalBytesReceived == 0) { - return EOPABORT; + return NFC_EOPABORTED; } } while (((DWORD)szRx) > dwTotalBytesReceived); LOG_HEX ("RX", pbtRx, szRx); - return (dwTotalBytesReceived == (DWORD) szRx) ? 0 : ECOMIO; + return (dwTotalBytesReceived == (DWORD) szRx) ? 0 : NFC_EIO; } int @@ -207,15 +207,15 @@ uart_send (serial_port sp, const uint8_t * pbtTx, const size_t szTx, int timeout if (!SetCommTimeouts (((struct serial_port_windows *) sp)->hPort, &timeouts)) { log_put (LOG_CATEGORY, NFC_PRIORITY_ERROR, "Unable to apply new timeout settings."); - return ECOMIO; + return NFC_EIO; } LOG_HEX ("TX", pbtTx, szTx); if (!WriteFile (((struct serial_port_windows *) sp)->hPort, pbtTx, szTx, &dwTxLen, NULL)) { - return ECOMIO; + return NFC_EIO; } if (!dwTxLen) - return ECOMIO; + return NFC_EIO; return 0; }