@@ -260,6 +260,37 @@ typedef void (* StreamBufferCallbackFunction_t)( StreamBufferHandle_t xStreamBuf
260
260
xStreamBufferGenericCreateStatic( ( xBufferSizeBytes ), ( xTriggerLevelBytes ), pdFALSE, ( pucStreamBufferStorageArea ), ( pxStaticStreamBuffer ), ( pxSendCompletedCallback ), ( pxReceiveCompletedCallback ) )
261
261
#endif
262
262
263
+ /**
264
+ * stream_buffer.h
265
+ *
266
+ * @code{c}
267
+ * BaseType_t xStreamBufferGetStaticBuffers( StreamBufferHandle_t xStreamBuffer,
268
+ * uint8_t ** ppucStreamBufferStorageArea,
269
+ * StaticStreamBuffer_t ** ppxStaticStreamBuffer );
270
+ * @endcode
271
+ *
272
+ * This function fetches the pointers to the memory buffers of a statically
273
+ * created stream buffer.
274
+ *
275
+ * @param xStreamBuffer The handle to the stream buffer
276
+ *
277
+ * @param ppucStreamBufferStorageArea Used to pass back a pointer to the stream
278
+ * buffer's storage area buffer.
279
+ *
280
+ * @param ppxStaticStreamBuffer Used to pass back a pointer to the stream
281
+ * buffer's data structure buffer.
282
+ *
283
+ * @return pdTRUE if buffers were fetched. pdFALSE if the stream buffer was not
284
+ * statically created.
285
+ *
286
+ * \defgroup xStreamBufferGetStaticBuffers xStreamBufferGetStaticBuffers
287
+ * \ingroup StreamBufferManagement
288
+ */
289
+ #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
290
+ #define xStreamBufferGetStaticBuffers ( xStreamBuffer , ppucStreamBufferStorageArea , ppxStaticStreamBuffer ) \
291
+ xStreamBufferGenericGetStaticBuffers( ( xStreamBuffer ), ( ppucStreamBufferStorageArea ), ( ppxStaticStreamBuffer ) )
292
+ #endif /* configSUPPORT_STATIC_ALLOCATION */
293
+
263
294
/**
264
295
* stream_buffer.h
265
296
*
@@ -895,6 +926,16 @@ StreamBufferHandle_t xStreamBufferGenericCreateStatic( size_t xBufferSizeBytes,
895
926
StreamBufferCallbackFunction_t pxSendCompletedCallback ,
896
927
StreamBufferCallbackFunction_t pxReceiveCompletedCallback ) PRIVILEGED_FUNCTION ;
897
928
929
+ /*
930
+ * Generic version of the function used to get the buffers of statically created
931
+ * stream or message buffer.
932
+ */
933
+ #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
934
+ BaseType_t xStreamBufferGenericGetStaticBuffers ( StreamBufferHandle_t xStreamBuffer ,
935
+ uint8_t * * ppucStreamBufferStorageArea ,
936
+ StaticStreamBuffer_t * * ppxStaticStreamBuffer ) PRIVILEGED_FUNCTION ;
937
+ #endif /* configSUPPORT_STATIC_ALLOCATION */
938
+
898
939
size_t xStreamBufferNextMessageLengthBytes ( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION ;
899
940
900
941
#if ( configUSE_TRACE_FACILITY == 1 )
0 commit comments