Added ability to change task notification index for streambuffers (#939)
* Added possibility to change notification index for streambuffers * Uncrustify: triggered by comment. * Minor code review suggestions. Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
@ -911,6 +911,57 @@ BaseType_t xStreamBufferSendCompletedFromISR( StreamBufferHandle_t xStreamBuffer
|
||||
BaseType_t xStreamBufferReceiveCompletedFromISR( StreamBufferHandle_t xStreamBuffer,
|
||||
BaseType_t * pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* stream_buffer.h
|
||||
*
|
||||
* @code{c}
|
||||
* UBaseType_t uxStreamBufferGetStreamBufferNotificationIndex( StreamBufferHandle_t xStreamBuffer );
|
||||
* @endcode
|
||||
*
|
||||
* Get the task notification index used for the supplied stream buffer which can
|
||||
* be set using vStreamBufferSetStreamBufferNotificationIndex. If the task
|
||||
* notification index for the stream buffer is not changed using
|
||||
* vStreamBufferSetStreamBufferNotificationIndex, this function returns the
|
||||
* default value (tskDEFAULT_INDEX_TO_NOTIFY).
|
||||
*
|
||||
* @param xStreamBuffer The handle of the stream buffer for which the task
|
||||
* notification index is retrieved.
|
||||
*
|
||||
* @return The task notification index for the stream buffer.
|
||||
*
|
||||
* \defgroup uxStreamBufferGetStreamBufferNotificationIndex uxStreamBufferGetStreamBufferNotificationIndex
|
||||
* \ingroup StreamBufferManagement
|
||||
*/
|
||||
UBaseType_t uxStreamBufferGetStreamBufferNotificationIndex( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* stream_buffer.h
|
||||
*
|
||||
* @code{c}
|
||||
* void vStreamBufferSetStreamBufferNotificationIndex ( StreamBuffer_t xStreamBuffer, UBaseType_t uxNotificationIndex );
|
||||
* @endcode
|
||||
*
|
||||
* Set the task notification index used for the supplied stream buffer.
|
||||
* Successive calls to stream buffer APIs (like xStreamBufferSend or
|
||||
* xStreamBufferReceive) for this stream buffer will use this new index for
|
||||
* their task notifications.
|
||||
*
|
||||
* If this function is not called, the default index (tskDEFAULT_INDEX_TO_NOTIFY)
|
||||
* is used for task notifications. It is recommended to call this function
|
||||
* before attempting to send or receive data from the stream buffer to avoid
|
||||
* inconsistencies.
|
||||
*
|
||||
* @param xStreamBuffer The handle of the stream buffer for which the task
|
||||
* notification index is set.
|
||||
*
|
||||
* @param uxNotificationIndex The task notification index to set.
|
||||
*
|
||||
* \defgroup vStreamBufferSetStreamBufferNotificationIndex vStreamBufferSetStreamBufferNotificationIndex
|
||||
* \ingroup StreamBufferManagement
|
||||
*/
|
||||
void vStreamBufferSetStreamBufferNotificationIndex( StreamBufferHandle_t xStreamBuffer,
|
||||
UBaseType_t uxNotificationIndex ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/* Functions below here are not part of the public API. */
|
||||
StreamBufferHandle_t xStreamBufferGenericCreate( size_t xBufferSizeBytes,
|
||||
size_t xTriggerLevelBytes,
|
||||
|
Reference in New Issue
Block a user