瀏覽代碼

Merge pull request #1 from FrankBoesing/patch-1

Bugfix Capacity (important)
main
Paul Stoffregen 9 年之前
父節點
當前提交
29bdb85fc3
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      SerialFlashChip.cpp

+ 2
- 2
SerialFlashChip.cpp 查看文件

@@ -217,10 +217,10 @@ uint32_t SerialFlashChip::capacity()
//Serial.print("capacity ");
//Serial.println(id[3], HEX);
if (id[2] >= 16 && id[2] <= 31) {
return 1 >> id[2];
return 1 << id[2];
}
if (id[2] >= 32 && id[2] <= 37) {
return 1 >> (id[2] - 6);
return 1 << (id[2] - 6);
}
return 1048576; // unknown, guess 1 MByte
}

Loading…
取消
儲存