mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
async_mcp: clean eof flag when prepare rx descriptors
This commit is contained in:
parent
db1c635db4
commit
e926298160
@ -135,6 +135,7 @@ static int async_memcpy_prepare_receive(async_memcpy_t asmcp, void *buffer, size
|
||||
|
||||
while (size > DMA_DESCRIPTOR_BUFFER_MAX_SIZE) {
|
||||
if (desc->dw0.owner != DMA_DESCRIPTOR_BUFFER_OWNER_DMA) {
|
||||
desc->dw0.suc_eof = 0;
|
||||
desc->dw0.size = DMA_DESCRIPTOR_BUFFER_MAX_SIZE;
|
||||
desc->buffer = &buf[prepared_length];
|
||||
desc = desc->next; // move to next descriptor
|
||||
@ -148,6 +149,7 @@ static int async_memcpy_prepare_receive(async_memcpy_t asmcp, void *buffer, size
|
||||
if (size) {
|
||||
if (desc->dw0.owner != DMA_DESCRIPTOR_BUFFER_OWNER_DMA) {
|
||||
end = desc; // the last descriptor used
|
||||
desc->dw0.suc_eof = 0;
|
||||
desc->dw0.size = size;
|
||||
desc->buffer = &buf[prepared_length];
|
||||
desc = desc->next; // move to next descriptor
|
||||
|
Loading…
Reference in New Issue
Block a user