mbed library sources. Supersedes mbed-src.
Fork of mbed-dev by
Diff: platform/CircularBuffer.h
- Revision:
- 167:e84263d55307
- Parent:
- 160:d5399cc887bb
- Child:
- 178:79309dc6340a
--- a/platform/CircularBuffer.h Thu Jun 08 15:02:37 2017 +0100 +++ b/platform/CircularBuffer.h Wed Jun 21 17:46:44 2017 +0100 @@ -20,11 +20,11 @@ namespace mbed { /** \addtogroup platform */ -/** @{*/ /** Templated Circular buffer class * - * @Note Synchronization level: Interrupt safe + * @note Synchronization level: Interrupt safe + * @ingroup platform */ template<typename T, uint32_t BufferSize, typename CounterType = uint32_t> class CircularBuffer { @@ -76,7 +76,7 @@ * * @return True if the buffer is empty, false if not */ - bool empty() { + bool empty() const { core_util_critical_section_enter(); bool is_empty = (_head == _tail) && !_full; core_util_critical_section_exit(); @@ -87,7 +87,7 @@ * * @return True if the buffer is full, false if not */ - bool full() { + bool full() const { core_util_critical_section_enter(); bool full = _full; core_util_critical_section_exit(); @@ -116,4 +116,3 @@ #endif -/** @}*/