mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-29 03:36:07 +08:00
flash_cache:Flush complete cache line
This commit is contained in:
committed by
Daniel Agar
parent
fd81951391
commit
645f4c3428
@@ -76,7 +76,7 @@ inline int fc_is_dirty(flash_cache_line_t *fl)
|
|||||||
|
|
||||||
int fc_flush(flash_cache_line_t *fl)
|
int fc_flush(flash_cache_line_t *fl)
|
||||||
{
|
{
|
||||||
size_t bytes = (fl->index + 1) * sizeof(fl->words[0]);
|
const size_t bytes = sizeof(fl->words);
|
||||||
size_t rv = arch_flash_write(fl->start_address, fl->words, bytes);
|
size_t rv = arch_flash_write(fl->start_address, fl->words, bytes);
|
||||||
|
|
||||||
if (rv == bytes) {
|
if (rv == bytes) {
|
||||||
|
|||||||
Reference in New Issue
Block a user