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:
@ -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;
|
||||
|
Reference in New Issue
Block a user