mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
Correctly handle unaligned address in EspClass::flashWrite u8 overload (#8605)
Separate page handling logic and the actual writing. Make sure we place both unaligned src and dest into a buffer. Fixes edge-case introduced for SPIFFS that exclusively works through unaligned flash write function. This copies the behaviour of official RTOS port, but does not change the original spi_flash_write.
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
#include <BSTest.h>
|
||||
#include <ESP8266WiFi.h>
|
||||
|
||||
BS_ENV_DECLARE();
|
||||
|
||||
@ -176,6 +175,11 @@ TEST_CASE("Unaligned page cross only", "[spi_flash]")
|
||||
CHECK(testFlash(0xa0000 + 255, 1, 2));
|
||||
}
|
||||
|
||||
TEST_CASE("Unaligned page cross with unaligned size (#8372, #8588, #8605)", "[spi_flash]")
|
||||
{
|
||||
CHECK(testFlash(0xa00b, 0, 202));
|
||||
}
|
||||
|
||||
void loop ()
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user