1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-23 08:45:22 +03:00

add method to get the actual size of the flash

This commit is contained in:
ficeto
2015-05-18 22:34:34 +03:00
parent 18349b2090
commit ba65783177
2 changed files with 8 additions and 0 deletions

View File

@ -158,6 +158,11 @@ uint32_t EspClass::getFlashChipId(void)
return spi_flash_get_id();
}
uint32_t EspClass::getFlashChipRealSize(void)
{
return (1 << ((spi_flash_get_id() >> 16) & 0xFF));
}
uint32_t EspClass::getFlashChipSize(void)
{
uint32_t data;