Skip to content

New flash writing method with offset/memory/size alignment handling #7514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Oct 15, 2020
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
701197d
Do not write more data than requested on PUYA flashes
drzony Aug 7, 2020
1def1c3
Merge branch 'master' into puya_flash_fixes
drzony Aug 9, 2020
02adea2
Always align flash reads/writes to 4 bytes
drzony Aug 10, 2020
f079f00
fixup! Always align flash reads/writes to 4 bytes
drzony Aug 10, 2020
e1cd190
fixup! Always align flash reads/writes to 4 bytes
drzony Aug 10, 2020
6cc5f1d
fixup! Always align flash reads/writes to 4 bytes
drzony Aug 11, 2020
7953559
Merge branch 'master' into puya_flash_fixes
drzony Aug 11, 2020
77da49c
Merge branch 'master' into puya_flash_fixes
drzony Aug 11, 2020
0a7b89a
Merge branch 'master' into puya_flash_fixes
drzony Oct 6, 2020
d941932
Check for result before additional read/write
drzony Oct 6, 2020
3cefcd9
Merge branch 'master' into puya_flash_fixes
drzony Oct 8, 2020
2bd885f
Add overloads for unaligned reads/writes
drzony Oct 8, 2020
d850f65
fixup! Add overloads for unaligned reads/writes
drzony Oct 8, 2020
5175867
fixup! Add overloads for unaligned reads/writes
drzony Oct 8, 2020
94c2df3
fixup! Add overloads for unaligned reads/writes
drzony Oct 8, 2020
64ceb92
fixup! Add overloads for unaligned reads/writes
drzony Oct 8, 2020
279a293
fixup! Add overloads for unaligned reads/writes
drzony Oct 9, 2020
c0d0257
fixup! Add overloads for unaligned reads/writes
drzony Oct 11, 2020
b3b3957
fixup! Add overloads for unaligned reads/writes
drzony Oct 11, 2020
a476e1b
Merge branch 'master' into puya_flash_fixes
drzony Oct 11, 2020
f2a6e0e
Add tests for flashRead/flashWrite
drzony Oct 11, 2020
eeb96fc
fixup! Add overloads for unaligned reads/writes
drzony Oct 12, 2020
7905a29
fixup! Add tests for flashRead/flashWrite
drzony Oct 12, 2020
323ffc0
fixup! Add tests for flashRead/flashWrite
drzony Oct 12, 2020
b919faa
fixup! Add overloads for unaligned reads/writes
drzony Oct 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! Always align flash reads/writes to 4 bytes
  • Loading branch information
drzony committed Aug 10, 2020
commit e1cd190189b07e16a6ca6370d2b382285fd3240b
11 changes: 0 additions & 11 deletions cores/esp8266/Esp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -752,17 +752,6 @@ bool EspClass::flashRead(uint32_t offset, uint32_t *data, size_t size) {
return rc == SPI_FLASH_RESULT_OK;
}

bool EspClass::flashRead(uint32_t offset, uint32_t *data, size_t size) {
size_t sizeAligned = size & ~3;
auto rc = spi_flash_read(offset, data, sizeAligned);
if (sizeAligned < size) {
uint32_t tempData;
rc = spi_flash_read(offset + sizeAligned, &tempData, 4);
memcpy((uint8_t *)data + sizeAligned, &tempData, size - sizeAligned);
}
return rc == SPI_FLASH_RESULT_OK;
}

String EspClass::getSketchMD5()
{
static String result;
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy