diff options
Diffstat (limited to 'Projects/Benito/Lib/LightweightRingBuff.h')
-rw-r--r-- | Projects/Benito/Lib/LightweightRingBuff.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Projects/Benito/Lib/LightweightRingBuff.h b/Projects/Benito/Lib/LightweightRingBuff.h index 56da8398f..cddf97f6a 100644 --- a/Projects/Benito/Lib/LightweightRingBuff.h +++ b/Projects/Benito/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 |