fixes.. to bool

This commit is contained in:
iceman1001 2017-07-11 18:31:10 +02:00
commit 310d0da9a4
13 changed files with 223 additions and 208 deletions

View file

@ -192,10 +192,8 @@ out:
}
int mfCheckKeys (uint8_t blockNo, uint8_t keyType, bool clear_trace, uint8_t keycnt, uint8_t * keyBlock, uint64_t * key){
#define STD_SEARCH 1
#define EXT_SEARCH 2
*key = 0;
UsbCommand c = {CMD_MIFARE_CHKKEYS, { (blockNo | (keyType << 8)), ((EXT_SEARCH << 8) | clear_trace), keycnt}};
UsbCommand c = {CMD_MIFARE_CHKKEYS, { (blockNo | (keyType << 8)), clear_trace, keycnt}};
memcpy(c.d.asBytes, keyBlock, 6 * keycnt);
clearCommandBuffer();
SendCommand(&c);
@ -336,7 +334,7 @@ int mfCGetBlock(uint8_t blockNo, uint8_t *data, uint8_t params) {
clearCommandBuffer();
SendCommand(&c);
UsbCommand resp;
if (WaitForResponseTimeout(CMD_ACK,&resp,1500)) {
if (WaitForResponseTimeout(CMD_ACK, &resp, 1500)) {
isOK = resp.arg[0] & 0xff;
memcpy(data, resp.d.asBytes, 16);
if (!isOK) return 2;