aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/XPLAINBridge
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-12-12 16:39:46 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-12-12 16:39:46 +0000
commitb67f9f366902ae62d55195f4a4be88d209fb64fe (patch)
tree1d7976e1f34b2b4d578fd924ca418a0d8dd1ec82 /Projects/XPLAINBridge
parent8a7351c760b30077f562795500d88908e4da1932 (diff)
downloadlufa-b67f9f366902ae62d55195f4a4be88d209fb64fe.tar.gz
lufa-b67f9f366902ae62d55195f4a4be88d209fb64fe.tar.bz2
lufa-b67f9f366902ae62d55195f4a4be88d209fb64fe.zip
Added new RingBuffer_Peek() function to the lightweight ring buffer headers.
Diffstat (limited to 'Projects/XPLAINBridge')
-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