mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-11-10 17:49:32 +08:00
chg: 'analyze a' - some fpc test changes.
This commit is contained in:
parent
faef1a0938
commit
aa3b322d0f
1 changed files with 11 additions and 11 deletions
|
@ -1080,26 +1080,28 @@ void UsbPacketReceived(uint8_t *packet, int len) {
|
|||
static const char* welcome = "Proxmark3 Serial interface ready\n";
|
||||
strncat(dest, welcome, sizeof(dest) - strlen(dest) - 1);
|
||||
|
||||
sprintf(dest + strlen(dest) - 1, "Arg0 | 0x%" PRIx64 " \n", c->arg[0]);
|
||||
sprintf(dest + strlen(dest) - 1, "Arg1 | 0x%" PRIx64 " \n", c->arg[1]);
|
||||
sprintf(dest + strlen(dest) - 1, "Arg2 | 0x%" PRIx64 " \n", c->arg[2]);
|
||||
sprintf(dest + strlen(dest) - 1, "bytes | 0x%02x 0x%02x 0x%02x 0x%02x \n"
|
||||
sprintf(dest + strlen(dest) - 1, "| Arg0 0x%" PRIx64 " \n", c->arg[0]);
|
||||
sprintf(dest + strlen(dest) - 1, "| Arg1 0x%" PRIx64 " \n", c->arg[1]);
|
||||
sprintf(dest + strlen(dest) - 1, "| Arg2 0x%" PRIx64 " \n", c->arg[2]);
|
||||
sprintf(dest + strlen(dest) - 1, "| bytes 0x%02x 0x%02x 0x%02x 0x%02x \n"
|
||||
,c->d.asBytes[0], c->d.asBytes[1], c->d.asBytes[2], c->d.asBytes[3]);
|
||||
|
||||
/*
|
||||
|
||||
UsbCommand txcmd;
|
||||
for (size_t i=0; i < sizeof(UsbCommand); i++)
|
||||
((uint8_t*)&txcmd)[i] = 0x00;
|
||||
|
||||
// Compose the outgoing command frame
|
||||
txcmd.cmd = CMD_DEBUG_PRINT_STRING;
|
||||
txcmd.arg[0] = len;
|
||||
txcmd.arg[0] = strlen(dest);
|
||||
txcmd.arg[1] = 0;
|
||||
txcmd.arg[2] = 0;
|
||||
memcpy(txcmd.d.asBytes, dest, USB_CMD_DATA_SIZE);
|
||||
|
||||
usart_init();
|
||||
usart_writebuffer((uint8_t*)&txcmd, sizeof(UsbCommand));
|
||||
*/
|
||||
DbpString("Starting to listen");
|
||||
|
||||
DbpString("Justs send to usart");
|
||||
LED_A_ON();
|
||||
/*
|
||||
uint8_t rx[sizeof(UsbCommand)];
|
||||
|
@ -1110,7 +1112,7 @@ void UsbPacketReceived(uint8_t *packet, int len) {
|
|||
DbpString("got 544");
|
||||
}
|
||||
*/
|
||||
cmd_send(CMD_DEBUG_PRINT_STRING, strlen(dest), 0, 0, dest, strlen(dest));
|
||||
//cmd_send(CMD_DEBUG_PRINT_STRING, strlen(dest), 0, 0, dest, strlen(dest));
|
||||
//DbpString("finished");
|
||||
LED_A_OFF();
|
||||
cmd_send(CMD_ACK,0,0,0,0,0);
|
||||
|
@ -1196,7 +1198,6 @@ void UsbPacketReceived(uint8_t *packet, int len) {
|
|||
// arg0 = startindex
|
||||
// arg1 = length bytes to transfer
|
||||
// arg2 = RFU
|
||||
//Dbprintf("transfer to client parameters: %" PRIu32 " | %" PRIu32 " | %" PRIu32, startidx, numofbytes, c->arg[2]);
|
||||
|
||||
for (size_t i = 0; i < numofbytes; i += USB_CMD_DATA_SIZE) {
|
||||
len = MIN((numofbytes - i), USB_CMD_DATA_SIZE);
|
||||
|
@ -1231,7 +1232,6 @@ void UsbPacketReceived(uint8_t *packet, int len) {
|
|||
if (!FlashInit()) {
|
||||
break;
|
||||
}
|
||||
//Flash_CheckBusy(BUSY_TIMEOUT);
|
||||
|
||||
for(size_t i = 0; i < len; i += size) {
|
||||
len = MIN((len - i), size);
|
||||
|
|
Loading…
Reference in a new issue