aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/XPLAINBridge/Lib/LightweightRingBuff.h
diff options
context:
space:
mode:
Diffstat (limited to 'Projects/XPLAINBridge/Lib/LightweightRingBuff.h')
-rw-r--r--Projects/XPLAINBridge/Lib/LightweightRingBuff.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Projects/XPLAINBridge/Lib/LightweightRingBuff.h b/Projects/XPLAINBridge/Lib/LightweightRingBuff.h
index 0205fe467..b19291caf 100644
--- a/Projects/XPLAINBridge/Lib/LightweightRingBuff.h
+++ b/Projects/XPLAINBridge/Lib/LightweightRingBuff.h
@@ -196,5 +196,16 @@
return Data;
}
+ /** Returns the next element stored in the ring buffer, without removing it.
+ *
+ * \param[in,out] Buffer Pointer to a ring buffer structure to retrieve from
+ *
+ * \return Next data element stored in the buffer
+ */
+ static inline RingBuff_Data_t RingBuffer_Peek(RingBuff_t* const Buffer)
+ {
+ return *Buffer->Out;
+ }
+
#endif