target: Make the buffers used to program a target's Flash better bounded in lifetime and memory usage
This commit is contained in:
parent
a067e801d7
commit
34696c0fec
@ -271,6 +271,11 @@ int target_flash_write(target *t,
|
|||||||
dest += tmplen;
|
dest += tmplen;
|
||||||
src += tmplen;
|
src += tmplen;
|
||||||
len -= tmplen;
|
len -= tmplen;
|
||||||
|
/* If the current chunk of Flash is now full from this operation
|
||||||
|
* then finish operations on the Flash chunk and free the internal buffer.
|
||||||
|
*/
|
||||||
|
if (dest == f->start + f->length)
|
||||||
|
ret |= target_flash_done_buffered(f);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user