File tree 1 file changed +28
-0
lines changed 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -785,6 +785,34 @@ typedef StreamBufferHandle_t MessageBufferHandle_t;
785
785
xStreamBufferReset( xMessageBuffer )
786
786
787
787
788
+ /**
789
+ * message_buffer.h
790
+ * @code{c}
791
+ * BaseType_t xMessageBufferResetFromISR( MessageBufferHandle_t xMessageBuffer );
792
+ * @endcode
793
+ *
794
+ * An interrupt safe version of the API function that reset the stream buffer.
795
+ * Resets a message buffer to its initial empty state, discarding any message it
796
+ * contained.
797
+ *
798
+ * A message buffer can only be reset if there are no tasks blocked on it.
799
+ *
800
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
801
+ * xMessageBufferResetFromISR() to be available.
802
+ *
803
+ * @param xMessageBuffer The handle of the message buffer being reset.
804
+ *
805
+ * @return If the message buffer was reset then pdPASS is returned. If the
806
+ * message buffer could not be reset because either there was a task blocked on
807
+ * the message queue to wait for space to become available, or to wait for a
808
+ * a message to be available, then pdFAIL is returned.
809
+ *
810
+ * \defgroup xMessageBufferResetFromISR xMessageBufferResetFromISR
811
+ * \ingroup MessageBufferManagement
812
+ */
813
+ #define xMessageBufferResetFromISR ( xMessageBuffer ) \
814
+ xStreamBufferResetFromISR( xMessageBuffer )
815
+
788
816
/**
789
817
* message_buffer.h
790
818
* @code{c}
You can’t perform that action at this time.
0 commit comments