[ringbuffer] 添加 ringbuffer 的接口注释

This commit is contained in:
Jackistang
2021-08-14 13:47:05 +08:00
parent 0b4603d581
commit 1b7468979f
4 changed files with 90 additions and 11 deletions
@@ -5,6 +5,7 @@
*
* Change Logs:
* Date Author Notes
* 2021-08-14 Jackistang add commets for function inferface.
*/
#ifndef RINGBUFFER_H__
#define RINGBUFFER_H__
@@ -80,6 +81,13 @@ struct rt_ringbuffer* rt_ringbuffer_create(rt_uint16_t length);
void rt_ringbuffer_destroy(struct rt_ringbuffer *rb);
#endif
/**
* @brief Get buffer size of the ringbuffer object.
*
* @param rb A pointer to the ringbuffer object.
*
* @return Buffer size.
*/
rt_inline rt_uint16_t rt_ringbuffer_get_size(struct rt_ringbuffer *rb)
{
RT_ASSERT(rb != RT_NULL);