address review comments

This commit is contained in:
ANTodorov
2024-11-17 22:07:58 +02:00
parent 48ec109a1e
commit 34e317a9df
2 changed files with 7 additions and 4 deletions
+6 -3
View File
@@ -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
+1 -1
View File
@@ -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