diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-12-12 16:39:46 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-12-12 16:39:46 +0000 |
| commit | 8fa52c48863865cc59f1eb3fa4778f6e77a1eb2d (patch) | |
| tree | 1d7976e1f34b2b4d578fd924ca418a0d8dd1ec82 /Projects/USBtoSerial | |
| parent | 7c558e2187ce027cb3378255c5786c5f6e164222 (diff) | |
Added new RingBuffer_Peek() function to the lightweight ring buffer headers.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1602 d5102386-fcda-11dd-9fdb-3debd5008f28
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 56da8398..cddf97f6 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 |
