Added new RingBuffer_Peek() function to the lightweight ring buffer headers.
This commit is contained in:
parent
8a7351c760
commit
b67f9f3669
5 changed files with 35 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue