mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
make style
This commit is contained in:
parent
33f2cb0981
commit
8e6258936c
5 changed files with 13 additions and 14 deletions
|
@ -1596,7 +1596,7 @@ static void TransmitFor14443a(const uint8_t *cmd, uint16_t len, uint32_t *timing
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//iceman test
|
//iceman test
|
||||||
if (AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {
|
if (AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {
|
||||||
b = (uint16_t)(AT91C_BASE_SSC->SSC_RHR);
|
b = (uint16_t)(AT91C_BASE_SSC->SSC_RHR);
|
||||||
|
@ -1937,7 +1937,7 @@ bool EmLogTrace(uint8_t *reader_data, uint16_t reader_len, uint32_t reader_Start
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
static int GetIso14443aAnswerFromTag(uint8_t *receivedResponse, uint8_t *receivedResponsePar, uint16_t offset) {
|
static int GetIso14443aAnswerFromTag(uint8_t *receivedResponse, uint8_t *receivedResponsePar, uint16_t offset) {
|
||||||
uint32_t c = 0;
|
uint32_t c = 0;
|
||||||
|
|
||||||
if (!iso14443a_active)
|
if (!iso14443a_active)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -1968,7 +1968,7 @@ static int GetIso14443aAnswerFromTag(uint8_t *receivedResponse, uint8_t *receive
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// timeout already in ms + 100ms guard time
|
// timeout already in ms + 100ms guard time
|
||||||
if (GetTickCount() - receive_timer > timeout + 100)
|
if (GetTickCount() - receive_timer > timeout + 100)
|
||||||
break;
|
break;
|
||||||
|
@ -2378,7 +2378,7 @@ void iso14443a_setup(uint8_t fpga_minor_mode) {
|
||||||
UartReset();
|
UartReset();
|
||||||
NextTransferTime = 2 * DELAY_ARM2AIR_AS_READER;
|
NextTransferTime = 2 * DELAY_ARM2AIR_AS_READER;
|
||||||
iso14a_set_timeout(1060); // 106 * 10ms default
|
iso14a_set_timeout(1060); // 106 * 10ms default
|
||||||
|
|
||||||
iso14443a_active = true;
|
iso14443a_active = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -164,9 +164,9 @@ void UsbPacketReceived(uint8_t *packet, int len) {
|
||||||
offset = (AT91C_IFLASH_NB_OF_PAGES / 2) * AT91C_IFLASH_PAGE_SIZE / sizeof(uint32_t);
|
offset = (AT91C_IFLASH_NB_OF_PAGES / 2) * AT91C_IFLASH_PAGE_SIZE / sizeof(uint32_t);
|
||||||
}
|
}
|
||||||
for (i = 0 + (64 * j); i < 64 + (64 * j); i++) {
|
for (i = 0 + (64 * j); i < 64 + (64 * j); i++) {
|
||||||
flash_mem[offset+i] = c->d.asDwords[i];
|
flash_mem[offset + i] = c->d.asDwords[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check that the address that we are supposed to write to is within our allowed region */
|
/* Check that the address that we are supposed to write to is within our allowed region */
|
||||||
if (((flash_address + AT91C_IFLASH_PAGE_SIZE - 1) >= end_addr) || (flash_address < start_addr)) {
|
if (((flash_address + AT91C_IFLASH_PAGE_SIZE - 1) >= end_addr) || (flash_address < start_addr)) {
|
||||||
/* Disallow write */
|
/* Disallow write */
|
||||||
|
@ -175,8 +175,8 @@ void UsbPacketReceived(uint8_t *packet, int len) {
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
efc_bank->EFC_FCR = MC_FLASH_COMMAND_KEY |
|
efc_bank->EFC_FCR = MC_FLASH_COMMAND_KEY |
|
||||||
MC_FLASH_COMMAND_PAGEN(page_n) |
|
MC_FLASH_COMMAND_PAGEN(page_n) |
|
||||||
AT91C_MC_FCMD_START_PROG;
|
AT91C_MC_FCMD_START_PROG;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait until flashing of page finishes
|
// Wait until flashing of page finishes
|
||||||
|
|
|
@ -539,7 +539,7 @@ int EMVSearch(EMVCommandChannel channel, bool ActivateField, bool LeaveFieldON,
|
||||||
i--;
|
i--;
|
||||||
} else {
|
} else {
|
||||||
// (1) - card select error, (4) reply timeout, (200) - result length = 0
|
// (1) - card select error, (4) reply timeout, (200) - result length = 0
|
||||||
if (res == 1 || res == 4 ||res == 200) {
|
if (res == 1 || res == 4 || res == 200) {
|
||||||
if (!LeaveFieldON)
|
if (!LeaveFieldON)
|
||||||
DropFieldEx(channel);
|
DropFieldEx(channel);
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ int main(int argc, char **argv) {
|
||||||
int res;
|
int res;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
flash_file_t files[MAX_FILES];
|
flash_file_t files[MAX_FILES];
|
||||||
char * filenames[MAX_FILES];
|
char *filenames[MAX_FILES];
|
||||||
bool info = false;
|
bool info = false;
|
||||||
memset(files, 0, sizeof(files));
|
memset(files, 0, sizeof(files));
|
||||||
|
|
||||||
|
@ -146,8 +146,8 @@ int main(int argc, char **argv) {
|
||||||
if (info)
|
if (info)
|
||||||
goto finish;
|
goto finish;
|
||||||
|
|
||||||
for (int i = 0 ; i < num_files; ++i){
|
for (int i = 0 ; i < num_files; ++i) {
|
||||||
res = flash_load(&files[i], filenames[i], can_write_bl, mem_avail*ONE_KB);
|
res = flash_load(&files[i], filenames[i], can_write_bl, mem_avail * ONE_KB);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
ret = -1;
|
ret = -1;
|
||||||
goto finish;
|
goto finish;
|
||||||
|
@ -174,7 +174,7 @@ finish:
|
||||||
|
|
||||||
CloseProxmark();
|
CloseProxmark();
|
||||||
|
|
||||||
if (ret==0)
|
if (ret == 0)
|
||||||
PrintAndLogEx(SUCCESS, _BLUE_("All done."));
|
PrintAndLogEx(SUCCESS, _BLUE_("All done."));
|
||||||
else
|
else
|
||||||
PrintAndLogEx(ERR, "Aborted on error.");
|
PrintAndLogEx(ERR, "Aborted on error.");
|
||||||
|
|
|
@ -31,4 +31,3 @@ elif action.lower() == "diff":
|
||||||
flash = text+data
|
flash = text+data
|
||||||
print_increase(flash, flash_ref, "Flash")
|
print_increase(flash, flash_ref, "Flash")
|
||||||
print_increase(bss, bss_ref, "RAM")
|
print_increase(bss, bss_ref, "RAM")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue