Created
July 10, 2013 16:16
-
-
Save scalone/5967682 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned char * SReader_ReadCard(int *size) | |
{ | |
int cmdbuf[] = { 0x1b, 0x41, 0x00, 0x00, 0x2f, 0x75 }; | |
// clear buffer; | |
int tmpsize = 0; | |
unsigned char *tmpbuf = get_DataBuffer(&tmpsize); | |
if (tmpbuf) | |
free(tmpbuf); | |
clearDataStatus(); | |
write_command(cmdbuf, 6); | |
m_comStatus = COM_READCARD; | |
*size = -1; | |
_WAITTING_RESPONSE_(10000) | |
int datasize = 0; | |
unsigned char * buffer = processDataResult(&datasize); | |
*size = datasize; | |
return buffer; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment