mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-12 04:35:28 -07:00
address review comments
This commit is contained in:
parent
48ec109a1e
commit
34e317a9df
@ -461,7 +461,7 @@ bool FlashDetect(bool flash_init) {
|
||||
if (flash_init) {
|
||||
if (!FlashInit()) {
|
||||
if (g_dbglevel > 3) Dbprintf("FlashDetect() FlashInit fail");
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -483,6 +483,7 @@ bool FlashDetect(bool flash_init) {
|
||||
if (flash_init) {
|
||||
FlashStop();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -501,8 +502,10 @@ bool FlashInit(void) {
|
||||
}
|
||||
|
||||
#ifndef AS_BOOTROM
|
||||
if (spi_flash_p64k == 0){
|
||||
if (!FlashDetect(false)) return 0;
|
||||
if (spi_flash_p64k == 0) {
|
||||
if (!FlashDetect(false)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif // #ifndef AS_BOOTROM
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
# define FLASH_MEM_MAX_SIZE 0x40000 // (262144)
|
||||
#endif
|
||||
#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
|
||||
|
||||
#ifndef FLASH_MEM_MAX_4K_SECTOR
|
||||
|
Loading…
x
Reference in New Issue
Block a user