FIX: I did a clean up of the "LF PCF7931" code. The write command is not quite done.

FIX: Added some more "clearCommandBuffer" calls before sending..
This commit is contained in:
iceman1001 2015-10-12 21:30:54 +02:00
commit 2285d9dd94
5 changed files with 151 additions and 146 deletions

View file

@ -219,14 +219,11 @@ int CmdT55xxReadBlock(const char *Cmd) {
int password = 0xFFFFFFFF; //default to blank Block 7
char cmdp = param_getchar(Cmd, 0);
if (cmdp == 'h' || cmdp == 'H')
return usage_t55xx_read();
if (cmdp == 'h' || cmdp == 'H') return usage_t55xx_read();
int res = sscanf(Cmd, "%d %x", &block, &password);
if ( res < 1 || res > 2 )
return usage_t55xx_read();
if ( res < 1 || res > 2 ) return usage_t55xx_read();
if ((block < 0) | (block > 7)) {
PrintAndLog("Block must be between 0 and 7");