mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-16 10:03:04 -07:00
Automated upgrades SendCommandOLD/MIX 0,0,0,NULL,0 -> NG and SendCommandOLD ....,NULL,0 -> MIX
This commit is contained in:
parent
39272ba1fb
commit
290f2b625b
43 changed files with 144 additions and 144 deletions
|
@ -259,7 +259,7 @@ fail:
|
|||
|
||||
// Get the state of the proxmark, backwards compatible
|
||||
static int get_proxmark_state(uint32_t *state) {
|
||||
SendCommandOLD(CMD_DEVICE_INFO, 0, 0, 0, NULL, 0);
|
||||
SendCommandNG(CMD_DEVICE_INFO, NULL, 0);
|
||||
PacketResponseNG resp;
|
||||
WaitForResponse(CMD_UNKNOWN, &resp); // wait for any response. No timeout.
|
||||
|
||||
|
@ -304,11 +304,11 @@ static int enter_bootloader(char *serial_port_name) {
|
|||
&& (state & DEVICE_INFO_FLAG_OSIMAGE_PRESENT)) {
|
||||
// New style handover: Send CMD_START_FLASH, which will reset the board
|
||||
// and enter the bootrom on the next boot.
|
||||
SendCommandOLD(CMD_START_FLASH, 0, 0, 0, NULL, 0);
|
||||
SendCommandNG(CMD_START_FLASH, NULL, 0);
|
||||
PrintAndLogEx(SUCCESS, "(Press and release the button only to " _YELLOW_("abort") ")");
|
||||
} else {
|
||||
// Old style handover: Ask the user to press the button, then reset the board
|
||||
SendCommandOLD(CMD_HARDWARE_RESET, 0, 0, 0, NULL, 0);
|
||||
SendCommandNG(CMD_HARDWARE_RESET, NULL, 0);
|
||||
PrintAndLogEx(SUCCESS, "Press and hold down button NOW if your bootloader requires it.");
|
||||
}
|
||||
msleep(100);
|
||||
|
@ -359,9 +359,9 @@ int flash_start_flashing(int enable_bl_writes, char *serial_port_name) {
|
|||
PacketResponseNG resp;
|
||||
|
||||
if (enable_bl_writes) {
|
||||
SendCommandOLD(CMD_START_FLASH, FLASH_START, FLASH_END, START_FLASH_MAGIC, NULL, 0);
|
||||
SendCommandMIX(CMD_START_FLASH, FLASH_START, FLASH_END, START_FLASH_MAGIC, NULL, 0);
|
||||
} else {
|
||||
SendCommandOLD(CMD_START_FLASH, BOOTLOADER_END, FLASH_END, 0, NULL, 0);
|
||||
SendCommandMIX(CMD_START_FLASH, BOOTLOADER_END, FLASH_END, 0, NULL, 0);
|
||||
}
|
||||
return wait_for_ack(&resp);
|
||||
} else {
|
||||
|
@ -445,7 +445,7 @@ void flash_free(flash_file_t *ctx) {
|
|||
|
||||
// just reset the unit
|
||||
int flash_stop_flashing(void) {
|
||||
SendCommandOLD(CMD_HARDWARE_RESET, 0, 0, 0, NULL, 0);
|
||||
SendCommandNG(CMD_HARDWARE_RESET, NULL, 0);
|
||||
msleep(100);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue