Added new RingBuffer_Peek() function to the lightweight ring buffer headers.

pull/1469/head
Dean Camera 14 years ago
parent 8a7351c760
commit b67f9f3669

@ -13,6 +13,7 @@
* - Library Applications: * - Library Applications:
* - Added new incomplete MIDIToneGenerator project * - Added new incomplete MIDIToneGenerator project
* - Added ability to write protect Mass Storage disk write operations from the host OS * - Added ability to write protect Mass Storage disk write operations from the host OS
* - Added new RingBuffer_Peek() function to the lightweight ring buffer headers
* *
* <b>Changed:</b> * <b>Changed:</b>
* - Core: * - Core:

@ -34,6 +34,7 @@
* -# Finish StandaloneProgrammer project * -# Finish StandaloneProgrammer project
* -# Arduino Uno compatible USB-MIDI, USB-HID * -# Arduino Uno compatible USB-MIDI, USB-HID
* -# Make Webserver project work in RNDIS device mode * -# Make Webserver project work in RNDIS device mode
* -# Make rescue clock always active on U4, U6 and U7 targets in AVRISP-MKII Clone project
* - Ports * - Ports
* -# AVR32 UC3B series microcontrollers * -# AVR32 UC3B series microcontrollers
* -# Atmel ARM7 series microcontrollers * -# Atmel ARM7 series microcontrollers

@ -196,5 +196,16 @@
return Data; 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 #endif

@ -196,5 +196,16 @@
return Data; 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 #endif

@ -196,5 +196,16 @@
return Data; 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 #endif

Loading…
Cancel
Save