1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

Merge pull request #180 from Links2004/esp8266

add Winbond flash chip Ids
This commit is contained in:
Ivan Grokhotkov 2015-05-05 23:48:50 +03:00
commit 9d6d375e8b

View File

@ -223,10 +223,13 @@ FlashMode_t EspClass::getFlashChipMode(void)
* Infos from
* http://www.wlxmall.com/images/stock_item/att/A1010004.pdf
* http://www.gigadevice.com/product-series/5.html?locale=en_US
* http://www.elinux.org/images/f/f5/Winbond-w25q32.pdf
*/
uint32_t EspClass::getFlashChipSizeByChipId(void) {
uint32_t chipId = getFlashChipId();
switch(chipId) {
// GigaDevice
case 0x1740C8: // GD25Q64B
return (8_MB);
case 0x1640C8: // GD25Q32B
@ -243,6 +246,15 @@ uint32_t EspClass::getFlashChipSizeByChipId(void) {
return (128_kB);
case 0x1040C8: // GD25Q12
return (64_kB);
// Winbond
case 0x1640EF: // W25Q32
return (4_MB);
case 0x1540EF: // W25Q16
return (2_MB);
case 0x1440EF: // W25Q80
return (1_MB);
default:
return 0;
}