Added new RingBuffer_Peek() function to the lightweight ring buffer headers.
[pub/USBasp.git] / Projects / XPLAINBridge / Lib / LightweightRingBuff.h
index 2fbc164..b19291c 100644 (file)
@@ -3,7 +3,7 @@
      Copyright (C) Dean Camera, 2010.
 
   dean [at] fourwalledcubicle [dot] com
-      www.fourwalledcubicle.com
+           www.lufa-lib.org
 */
 
 /*
                        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