firmware
IEM Firmware Documentation
|
Creates a new stream batching buffer using dynamically allocated memory. See xStreamBatchingBufferCreateStatic() for a version that uses statically allocated memory (memory that is allocated at compile time).
configSUPPORT_DYNAMIC_ALLOCATION must be set to 1 or left undefined in FreeRTOSConfig.h for xStreamBatchingBufferCreate() to be available. configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for xStreamBatchingBufferCreate() to be available.
The difference between a stream buffer and a stream batching buffer is when a task performs read on a non-empty buffer:
xBufferSizeBytes | The total number of bytes the stream batching buffer will be able to hold at any one time. |
xTriggerLevelBytes | The number of bytes that must be in the stream batching buffer to unblock a task calling xStreamBufferReceive before the block time expires. |
pxSendCompletedCallback | Callback invoked when number of bytes at least equal to trigger level is sent to the stream batching buffer. If the parameter is NULL, it will use the default implementation provided by sbSEND_COMPLETED macro. To enable the callback, configUSE_SB_COMPLETED_CALLBACK must be set to 1 in FreeRTOSConfig.h. |
pxReceiveCompletedCallback | Callback invoked when more than zero bytes are read from a stream batching buffer. If the parameter is NULL, it will use the default implementation provided by sbRECEIVE_COMPLETED macro. To enable the callback, configUSE_SB_COMPLETED_CALLBACK must be set to 1 in FreeRTOSConfig.h. |
Example use: