Skip to content

Commit

Permalink
Add max size
Browse files Browse the repository at this point in the history
  • Loading branch information
arendst committed Oct 30, 2023
1 parent 09f473b commit 6410e72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasmota/tasmota_support/support_esp.ino
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ uint32_t ESP_magicFlashChipSize(uint8_t spi_size) {
return 1024;
}
*/
return (uint32_t)0x100000 << spi_size; // 0 = 8 MBit (1MB), 5 = 256 MBit (32MB)
return (uint32_t)0x100000 << (spi_size & 0x0F); // 0 = 8 MBit (1MB), 5 = 256 MBit (32MB)
}

uint32_t ESP_getSketchSize(void) {
Expand Down

0 comments on commit 6410e72

Please sign in to comment.