Commit 315a068d by developer33

ReaderOpenEx added, lib submodules updated, binaries updated

parent d3e39a84
eclipse.preferences.version=1
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1226322284/MINGW_HOME/delimiter=;
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1226322284/MINGW_HOME/operation=replace
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1226322284/MINGW_HOME/value=C\:\\mingw-w64\\x86_64-5.1.0-posix-seh-rt_v4-rev0\\mingw64
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1226322284/MINGW_HOME/value=C\:\\mingw64
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1226322284/append=true
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1226322284/appendContributed=true
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1777558369.2075570673/MINGW_HOME/delimiter=;
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1777558369.2075570673/MINGW_HOME/operation=replace
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1777558369.2075570673/MINGW_HOME/value=C\:\\mingw-w64\\i686-5.1.0-posix-dwarf-rt_v4-rev0\\mingw32
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1777558369.2075570673/MINGW_HOME/value=C\:\\mingw32
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1777558369.2075570673/append=true
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1777558369.2075570673/appendContributed=true
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1777558369/MINGW_HOME/delimiter=;
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1777558369/MINGW_HOME/operation=replace
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1777558369/MINGW_HOME/value=C\:\\mingw-w64\\i686-5.1.0-posix-dwarf-rt_v4-rev0\\mingw32
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1777558369/MINGW_HOME/value=C\:\\mingw32
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1777558369/append=true
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958.1777558369/appendContributed=true
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958/MINGW_HOME/delimiter=;
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958/MINGW_HOME/operation=replace
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958/MINGW_HOME/value=C\:\\mingw-w64\\x86_64-5.1.0-posix-seh-rt_v4-rev0\\mingw64
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958/MINGW_HOME/value=C\:\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958/append=true
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.1272368177.226908958/appendContributed=true
lib @ 9f2464bb
Subproject commit 763e3fccda8fa5f453102803d2fd168bf9b2b900
Subproject commit 9f2464bb97d4b665a60544b934858984fae4430c
......@@ -59,23 +59,62 @@ int main(void) {
printf(" Please wait while opening uFR NFC reader.\n");
printf(" --------------------------------------------------\n");
status = ReaderOpen();
if (status != UFR_OK) {
printf(" Error while opening device, status is: 0x%08X\n", status);
getchar();
return EXIT_FAILURE;
}
int mode = 0;
printf("Select reader opening mode:\n");
printf(" (1) - Simple Reader Open\n");
printf(" (2) - Advanced Reader Open\n");
scanf("%d", &mode);
fflush(stdin);
if (mode == 1){
status = ReaderOpen();
}
else if (mode == 2)
{
uint32_t reader_type = 1;
char port_name[1024] = "";
uint32_t port_interface = 2;
char open_args[1024] = "";
const char str_interface[2] = "";
printf("Enter reader type:\n");
scanf("%d", &reader_type);
fflush(stdin);
printf("Enter port name:\n");
scanf("%s", port_name);
fflush(stdin);
printf("Enter port interface:\n");
scanf("%s", str_interface);
if (str_interface[0] == 'U'){
port_interface = 85;
} else if (str_interface[0] == 'T')
{
port_interface = 84;
} else{
port_interface = atoi(str_interface);
}
fflush(stdin);
printf("Enter additional argument:\n");
scanf("%s", open_args);
fflush(stdin);
status = ReaderOpenEx(reader_type, port_name, port_interface, open_args);
}
else
{
printf("Invalid input. Press any key to quit the application...");
getchar();
return EXIT_FAILURE;
}
if (!CheckDependencies()) {
ReaderClose();
getchar();
return EXIT_FAILURE;
}
status = ReaderReset();
if (status != UFR_OK) {
printf(" Error while opening device, status is: 0x%08X\n", status);
getchar();
return EXIT_FAILURE;
}
printf(" --------------------------------------------------\n");
printf(" uFR NFC reader successfully opened.\n");
......
......@@ -130,14 +130,14 @@ const char *GetDlTypeName(uint8_t dl_type_code) {
return "DL_MIFARE_CLASSIC_1K";
case DL_MIFARE_CLASSIC_4K:
return "DL_MIFARE_CLASSIC_4K";
case DL_MIFARE_PLUS_S_2K:
return "DL_MIFARE_PLUS_S_2K";
case DL_MIFARE_PLUS_S_4K:
return "DL_MIFARE_PLUS_S_4K";
case DL_MIFARE_PLUS_X_2K:
return "DL_MIFARE_PLUS_X_2K";
case DL_MIFARE_PLUS_X_4K:
return "DL_MIFARE_PLUS_X_4K";
case DL_MIFARE_PLUS_S_2K_SL0:
return "DL_MIFARE_PLUS_S_2K_SL0";
case DL_MIFARE_PLUS_S_4K_SL0:
return "DL_MIFARE_PLUS_S_4K_SL0";
case DL_MIFARE_PLUS_X_2K_SL0:
return "DL_MIFARE_PLUS_X_2K_SL0";
case DL_MIFARE_PLUS_X_4K_SL0:
return "DL_MIFARE_PLUS_X_4K_SL0";
case DL_MIFARE_DESFIRE:
return "DL_MIFARE_DESFIRE";
case DL_MIFARE_DESFIRE_EV1_2K:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment