mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
address review comments
This commit is contained in:
parent
48ec109a1e
commit
34e317a9df
2 changed files with 7 additions and 4 deletions
|
@ -461,7 +461,7 @@ bool FlashDetect(bool flash_init) {
|
||||||
if (flash_init) {
|
if (flash_init) {
|
||||||
if (!FlashInit()) {
|
if (!FlashInit()) {
|
||||||
if (g_dbglevel > 3) Dbprintf("FlashDetect() FlashInit fail");
|
if (g_dbglevel > 3) Dbprintf("FlashDetect() FlashInit fail");
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,6 +483,7 @@ bool FlashDetect(bool flash_init) {
|
||||||
if (flash_init) {
|
if (flash_init) {
|
||||||
FlashStop();
|
FlashStop();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -502,7 +503,9 @@ bool FlashInit(void) {
|
||||||
|
|
||||||
#ifndef AS_BOOTROM
|
#ifndef AS_BOOTROM
|
||||||
if (spi_flash_p64k == 0) {
|
if (spi_flash_p64k == 0) {
|
||||||
if (!FlashDetect(false)) return 0;
|
if (!FlashDetect(false)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif // #ifndef AS_BOOTROM
|
#endif // #ifndef AS_BOOTROM
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
# define FLASH_MEM_MAX_SIZE 0x40000 // (262144)
|
# define FLASH_MEM_MAX_SIZE 0x40000 // (262144)
|
||||||
#endif
|
#endif
|
||||||
#ifndef FLASH_MEM_MAX_SIZE_P
|
#ifndef FLASH_MEM_MAX_SIZE_P
|
||||||
# define FLASH_MEM_MAX_SIZE_P(p64k) (1024 * 64 * p64k)
|
# define FLASH_MEM_MAX_SIZE_P(p64k) (1024 * 64 * (p64k))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FLASH_MEM_MAX_4K_SECTOR
|
#ifndef FLASH_MEM_MAX_4K_SECTOR
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue