Replies: 2 comments 2 replies
-
Article at first page explains it. A new calculated position is the array index up to which we have valid new data in our rx buffer. And old_pos stores value of last read, which now becomes new start read position. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Function get data length returns "remainig data length". So if we receive 5 bytes and initial size was 20, function will return 15. 20-15 = 5. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys,
This article is super fascinating. But I didn't understand on some of line. For example the line below:
pos = ARRAY_LEN(usart_rx_dma_buffer) - LL_DMA_GetDataLength(DMA1, LL_DMA_CHANNEL_5);
Why does The new point on array equal array length subduct the getDataLength?
If we received 5 characters and buffers length is 8, that means pos=3.
Does anybody can help me to figure out what mistakes do I have.
Beta Was this translation helpful? Give feedback.
All reactions