소스 검색

Support 64Mbit and 128Mbit flash size auto detection.

HuangRui 9 년 전
부모
커밋
5d9caf23b6
2개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      app/platform/flash_api.c
  2. 2 0
      app/platform/flash_api.h

+ 6 - 0
app/platform/flash_api.c

@@ -56,6 +56,12 @@ uint32_t flash_get_size_byte(void)
     case SIZE_32MBIT:
         // 32Mbit, 4MByte
         flash_size = 4 * 1024 * 1024;
+    case SIZE_64MBIT:
+        // 64Mbit, 8MByte
+        flash_size = 8 * 1024 * 1024;
+    case SIZE_128MBIT:
+        // 128Mbit, 16MByte
+        flash_size = 16 * 1024 * 1024;
         break;
     default:
         // Unknown flash size, fall back mode.

+ 2 - 0
app/platform/flash_api.h

@@ -52,6 +52,8 @@ typedef struct
         SIZE_8MBIT = 2,
         SIZE_16MBIT = 3,
         SIZE_32MBIT = 4,
+        SIZE_64MBIT = 5,
+        SIZE_128MBIT = 6,
     } size : 4;
 } ICACHE_STORE_TYPEDEF_ATTR SPIFlashInfo;