diff options
| author | chenyingchun0312 <[email protected]> | 2021-08-23 18:54:03 +0800 |
|---|---|---|
| committer | chenyingchun0312 <[email protected]> | 2021-08-23 18:54:03 +0800 |
| commit | 39689ea5edfca9dc267cfa125b99d4d86a8a20bd (patch) | |
| tree | 446d9f9d2f7a374f62f06524b36e0cc7cfb7bc24 /components/drivers/include/ipc/ringbuffer.h | |
| parent | 5e02709c5533b5741b7ae8eae4945c8c43f86beb (diff) | |
| parent | f0c963bf53e03c19bce171c6d52c9a39440cf7c0 (diff) | |
Merge branch 'develop' of https://github.com/chenyingchun0312/rt-thread into develop
Diffstat (limited to 'components/drivers/include/ipc/ringbuffer.h')
| -rw-r--r-- | components/drivers/include/ipc/ringbuffer.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/components/drivers/include/ipc/ringbuffer.h b/components/drivers/include/ipc/ringbuffer.h index 71c4801253..7da50225b3 100644 --- a/components/drivers/include/ipc/ringbuffer.h +++ b/components/drivers/include/ipc/ringbuffer.h @@ -5,6 +5,7 @@ * * Change Logs: * Date Author Notes + * 2021-08-14 Jackistang add comments for function interface. */ #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 the buffer size of the ring buffer object. + * + * @param rb A pointer to the ring buffer object. + * + * @return Buffer size. + */ rt_inline rt_uint16_t rt_ringbuffer_get_size(struct rt_ringbuffer *rb) { RT_ASSERT(rb != RT_NULL); |
