EasyManua.ls Logo

Espressif ESP32-S2 - Page 970

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
Fig. 31: Sending items to byte buffers
Multiple items can be sent or acquired without calling SendComplete, and the items do not necessarily need to be
completed in the order they were acquired. However, the receiving of data items must occur in FIFO order, therefore
not calling SendComplete for the earliest acquired item will prevent the subsequent items from being received.
The following diagrams illustrate what will happen when SendAcquire and SendComplete dont happen in the
same order. At the beginning, there is already a data item of 16 bytes sent to the ring buffer. Then SendAcquire
is called to acquire space of 20, 8, 24 bytes on the ring buffer.
Fig. 32: SendAcquire/SendComplete items in No-Split ring buffers
After that, we fill (use) the buffers, and send them to the ring buffer by SendComplete in the order of 8, 24,
20. When 8 bytes and 24 bytes data are sent, the consumer still can only get the 16 bytes data item. Hence, if
SendComplete is not called for the 20 bytes, it will not be available, nor will the data items following the 20 bytes
item.
When the 20 bytes item is finally completed, all the 3 data items can be received now, in the order of 20, 8, 24 bytes,
right after the 16 bytes item existing in the buffer at the beginning.
Allow-Split buffers and byte buffers do not allow using SendAcquire or SendComplete since acquired buffers
are required to be complete (not wrapped).
Wrap around The following diagrams illustrate the differences between No-Split, Allow-Split, and byte buffers
when a sent item requires a wrap around. The diagrams assume a buffer of 128 bytes with 56 bytes of free space
that wraps around and a sent item of 28 bytes.
Fig. 33: Wrap around in No-Split buffers
Espressif Systems 959
Submit Document Feedback
Release v4.4

Table of Contents