mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-20 05:13:22 -07:00
Add support for standard USB Smartcard Readers (#765)
* add PCSC interface (pcsc.c and pcsc.h) * new command 'sc select' to choose an USB Smartcard Reader * updated CI/.travis.yml accordingly * remove TCK CRC check in i2c.c It is done in PrintATR() anyway * Fix TCK CRC check in PrintATR() * Add PCSC reader support to 'sc info'
This commit is contained in:
parent
1511ea28a8
commit
a9104f7e31
14 changed files with 382 additions and 93 deletions
|
@ -52,7 +52,22 @@ int ukbhit(void)
|
|||
return ( error == 0 ? cnt : -1 );
|
||||
}
|
||||
|
||||
#else
|
||||
char getch(void)
|
||||
{
|
||||
char c;
|
||||
int error;
|
||||
struct termios Otty, Ntty;
|
||||
if ( tcgetattr(STDIN_FILENO, &Otty) == -1 ) return -1;
|
||||
Ntty = Otty;
|
||||
Ntty.c_lflag &= ~ICANON; /* disable buffered i/o */
|
||||
if (0 == (error = tcsetattr(STDIN_FILENO, TCSANOW, &Ntty))) { // set new attributes
|
||||
c = getchar();
|
||||
error += tcsetattr(STDIN_FILENO, TCSANOW, &Otty); // reset attributes
|
||||
}
|
||||
return ( error == 0 ? c : -1 );
|
||||
}
|
||||
|
||||
#else // _WIN32
|
||||
|
||||
#include <conio.h>
|
||||
int ukbhit(void) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue