fix: 'lf t55xx write' - wrong bitshift
This commit is contained in:
@@ -1401,7 +1401,7 @@ void T55xxWriteBlockExt(uint32_t data, uint8_t blockno, uint32_t pwd, uint8_t fl
|
|||||||
LED_A_ON();
|
LED_A_ON();
|
||||||
bool pwd_mode = (flags & 0x1);
|
bool pwd_mode = (flags & 0x1);
|
||||||
uint8_t page = (flags & 0x2) >> 1;
|
uint8_t page = (flags & 0x2) >> 1;
|
||||||
bool test_mode = (flags & 0x4 >> 3);
|
bool test_mode = (flags & 0x4) >> 2;
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
|
|
||||||
// Set up FPGA, 125kHz
|
// Set up FPGA, 125kHz
|
||||||
@@ -1415,7 +1415,7 @@ void T55xxWriteBlockExt(uint32_t data, uint8_t blockno, uint32_t pwd, uint8_t fl
|
|||||||
WaitUS(t_config.start_gap);
|
WaitUS(t_config.start_gap);
|
||||||
|
|
||||||
if (test_mode) {
|
if (test_mode) {
|
||||||
Dbprintf("T55xx writing with ", _YELLOW_("test mode enabled"));
|
Dbprintf("T55xx writing with %s", _YELLOW_("test mode enabled"));
|
||||||
// undocmented testmode opcode 01
|
// undocmented testmode opcode 01
|
||||||
T55xxWriteBit(0);
|
T55xxWriteBit(0);
|
||||||
T55xxWriteBit(1);
|
T55xxWriteBit(1);
|
||||||
|
|||||||
@@ -1103,7 +1103,7 @@ static int CmdT55xxWriteBlock(const char *Cmd) {
|
|||||||
ng.flags = flags;
|
ng.flags = flags;
|
||||||
|
|
||||||
SendCommandNG(CMD_T55XX_WRITE_BLOCK, (uint8_t *)&ng, sizeof(ng));
|
SendCommandNG(CMD_T55XX_WRITE_BLOCK, (uint8_t *)&ng, sizeof(ng));
|
||||||
if (!WaitForResponseTimeout(CMD_T55XX_WRITE_BLOCK, &resp, 1500)) {
|
if (!WaitForResponseTimeout(CMD_T55XX_WRITE_BLOCK, &resp, 2000)) {
|
||||||
PrintAndLogEx(WARNING, "Error occurred, device did not ACK write operation. (May be due to old firmware)");
|
PrintAndLogEx(WARNING, "Error occurred, device did not ACK write operation. (May be due to old firmware)");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user