diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-12-12 16:39:46 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-12-12 16:39:46 +0000 |
commit | b67f9f366902ae62d55195f4a4be88d209fb64fe (patch) | |
tree | 1d7976e1f34b2b4d578fd924ca418a0d8dd1ec82 /Projects/USBtoSerial | |
parent | 8a7351c760b30077f562795500d88908e4da1932 (diff) | |
download | lufa-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/USBtoSerial')
-rw-r--r-- | Projects/USBtoSerial/Lib/LightweightRingBuff.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Projects/USBtoSerial/Lib/LightweightRingBuff.h b/Projects/USBtoSerial/Lib/LightweightRingBuff.h index 56da8398f..cddf97f6a 100644 --- a/Projects/USBtoSerial/Lib/LightweightRingBuff.h +++ b/Projects/USBtoSerial/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 |