mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 18:57:12 +08:00
fast mode on sc upgrade, no much diff
This commit is contained in:
parent
2f71d951e1
commit
93171e3d74
1 changed files with 7 additions and 0 deletions
|
@ -643,8 +643,15 @@ static int CmdSmartUpgrade(const char *Cmd) {
|
|||
uint32_t bytes_sent = 0;
|
||||
uint32_t bytes_remaining = firmware_size;
|
||||
|
||||
// fast push mode
|
||||
conn.block_after_ACK = true;
|
||||
|
||||
while (bytes_remaining > 0) {
|
||||
uint32_t bytes_in_packet = MIN(PM3_CMD_DATA_SIZE, bytes_remaining);
|
||||
if (bytes_in_packet == bytes_remaining) {
|
||||
// Disable fast mode on last packet
|
||||
conn.block_after_ACK = false;
|
||||
}
|
||||
clearCommandBuffer();
|
||||
SendCommandOLD(CMD_SMART_UPLOAD, index + bytes_sent, bytes_in_packet, 0, dump + bytes_sent, bytes_in_packet);
|
||||
if (!WaitForResponseTimeout(CMD_ACK, NULL, 2000)) {
|
||||
|
|
Loading…
Reference in a new issue