From 061321c353ba6df0e5af7f10ea8c58f866659c17 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 7 May 2019 20:13:01 +0200 Subject: [PATCH] flash still need old cmds --- client/deprecated-hid-flasher/flasher/flash.c | 12 ++++++------ client/flash.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/client/deprecated-hid-flasher/flasher/flash.c b/client/deprecated-hid-flasher/flasher/flash.c index 9091cc12f..e7a7a774e 100644 --- a/client/deprecated-hid-flasher/flasher/flash.c +++ b/client/deprecated-hid-flasher/flasher/flash.c @@ -260,7 +260,7 @@ fail: // Get the state of the proxmark, backwards compatible static int get_proxmark_state(uint32_t *state) { - SendCommandNG(CMD_DEVICE_INFO, NULL, 0); + SendCommandOLD(CMD_DEVICE_INFO, 0, 0, 0, NULL, 0); PacketResponseOLD resp; ReceiveCommand(&resp); @@ -307,11 +307,11 @@ static int enter_bootloader(void) { && (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. - SendCommandNG(CMD_START_FLASH, NULL, 0); + SendCommandOLD(CMD_START_FLASH, 0, 0, 0, NULL, 0); fprintf(stderr, "(Press and release the button only to abort)\n"); } else { // Old style handover: Ask the user to press the button, then reset the board - SendCommandNG(CMD_HARDWARE_RESET, NULL, 0); + SendCommandOLD(CMD_HARDWARE_RESET, 0, 0, 0, NULL, 0); fprintf(stderr, "Press and hold down button NOW if your bootloader requires it.\n"); } fprintf(stderr, "Waiting for Proxmark3 to reappear on USB..."); @@ -356,9 +356,9 @@ int flash_start_flashing(int enable_bl_writes) { // This command is stupid. Why the heck does it care which area we're // flashing, as long as it's not the bootloader area? The mind boggles. if (enable_bl_writes) { - SendCommandMIX(CMD_START_FLASH, FLASH_START, FLASH_END, START_FLASH_MAGIC, NULL, 0); + SendCommandOLD(CMD_START_FLASH, FLASH_START, FLASH_END, START_FLASH_MAGIC, NULL, 0); } else { - SendCommandMIX(CMD_START_FLASH, BOOTLOADER_END, FLASH_END, 0, NULL, 0); + SendCommandOLD(CMD_START_FLASH, BOOTLOADER_END, FLASH_END, 0, NULL, 0); } return wait_for_ack(); } else { @@ -440,7 +440,7 @@ void flash_free(flash_file_t *ctx) { // just reset the unit int flash_stop_flashing(void) { - SendCommandNG(CMD_HARDWARE_RESET, NULL, 0); + SendCommandOLD(CMD_HARDWARE_RESET, 0, 0, 0, NULL, 0); msleep(100); return 0; } diff --git a/client/flash.c b/client/flash.c index b3ad88859..322fc3e49 100644 --- a/client/flash.c +++ b/client/flash.c @@ -259,7 +259,7 @@ fail: // Get the state of the proxmark, backwards compatible static int get_proxmark_state(uint32_t *state) { - SendCommandNG(CMD_DEVICE_INFO, NULL, 0); + SendCommandOLD(CMD_DEVICE_INFO, 0, 0, 0, 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. - SendCommandNG(CMD_START_FLASH, NULL, 0); + SendCommandOLD(CMD_START_FLASH, 0, 0, 0, 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 - SendCommandNG(CMD_HARDWARE_RESET, NULL, 0); + SendCommandOLD(CMD_HARDWARE_RESET, 0, 0, 0, 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) { - SendCommandMIX(CMD_START_FLASH, FLASH_START, FLASH_END, START_FLASH_MAGIC, NULL, 0); + SendCommandOLD(CMD_START_FLASH, FLASH_START, FLASH_END, START_FLASH_MAGIC, NULL, 0); } else { - SendCommandMIX(CMD_START_FLASH, BOOTLOADER_END, FLASH_END, 0, NULL, 0); + SendCommandOLD(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) { - SendCommandNG(CMD_HARDWARE_RESET, NULL, 0); + SendCommandOLD(CMD_HARDWARE_RESET, 0, 0, 0, NULL, 0); msleep(100); return 0; }