forked from Archive/PX4-Autopilot
flash_cache:Flush complete cache line
This commit is contained in:
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) {
|
||||||
|
|
Loading…
Reference in New Issue