mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
sugar
This commit is contained in:
parent
d0ed3ce368
commit
22fb92f9c8
1 changed files with 2 additions and 14 deletions
|
@ -254,12 +254,7 @@ uint16_t Flash_ReadData(uint32_t address, uint8_t *out, uint16_t len) {
|
||||||
// length should never be zero
|
// length should never be zero
|
||||||
if (!len || Flash_CheckBusy(BUSY_TIMEOUT)) return 0;
|
if (!len || Flash_CheckBusy(BUSY_TIMEOUT)) return 0;
|
||||||
|
|
||||||
|
uint8_t cmd = (FASTFLASH) ? FASTREAD : READDATA;
|
||||||
uint8_t cmd = READDATA;
|
|
||||||
|
|
||||||
if(FASTFLASH) {
|
|
||||||
cmd = FASTREAD;
|
|
||||||
}
|
|
||||||
|
|
||||||
FlashSendByte(cmd);
|
FlashSendByte(cmd);
|
||||||
Flash_TransferAdresse(address);
|
Flash_TransferAdresse(address);
|
||||||
|
@ -273,8 +268,6 @@ uint16_t Flash_ReadData(uint32_t address, uint8_t *out, uint16_t len) {
|
||||||
out[i] = FlashSendByte(0xFF);
|
out[i] = FlashSendByte(0xFF);
|
||||||
|
|
||||||
out[i] = FlashSendLastByte(0xFF);
|
out[i] = FlashSendLastByte(0xFF);
|
||||||
|
|
||||||
|
|
||||||
FlashStop();
|
FlashStop();
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
@ -291,11 +284,7 @@ uint16_t Flash_ReadDataCont(uint32_t address, uint8_t *out, uint16_t len) {
|
||||||
// length should never be zero
|
// length should never be zero
|
||||||
if (!len) return 0;
|
if (!len) return 0;
|
||||||
|
|
||||||
uint8_t cmd = READDATA;
|
uint8_t cmd = (FASTFLASH) ? FASTREAD : READDATA;
|
||||||
|
|
||||||
if(FASTFLASH) {
|
|
||||||
cmd = FASTREAD;
|
|
||||||
}
|
|
||||||
|
|
||||||
FlashSendByte(cmd);
|
FlashSendByte(cmd);
|
||||||
Flash_TransferAdresse(address);
|
Flash_TransferAdresse(address);
|
||||||
|
@ -309,7 +298,6 @@ uint16_t Flash_ReadDataCont(uint32_t address, uint8_t *out, uint16_t len) {
|
||||||
out[i] = FlashSendByte(0xFF);
|
out[i] = FlashSendByte(0xFF);
|
||||||
|
|
||||||
out[i] = FlashSendLastByte(0xFF);
|
out[i] = FlashSendLastByte(0xFF);
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue