LingYun Studio embeded system framwork software, such as thirdparty build shell and lingyun library
guowenxue
2024-08-19 4bbc5f0e0843fe9acdc15eaf24afaf423e27d08f
booster/ringbuf.c
@@ -1,15 +1,16 @@
/********************************************************************************
 *      Copyright:  (C) 2021 LingYun IoT System Studio
/*********************************************************************************
 *      Copyright:  (C) 2023 LingYun IoT System Studio.
 *                  All rights reserved.
 *
 *       Filename:  ringbuf.h
 *    Description:  This head file
 *       Filename:  ringbuf.c
 *    Description:  This file is common ring buffer API functions
 *
 *        Version:  1.0.0(2021年04月29日)
 *        Version:  1.0.0(11/08/23)
 *         Author:  Guo Wenxue <guowenxue@gmail.com>
 *      ChangeLog:  1, Release initial version on "2021年04月29日 12时18分32秒"
 *      ChangeLog:  1, Release initial version on "11/08/23 16:18:43"
 *
 ********************************************************************************/
#include <string.h>
#include <assert.h>
#include "ringbuf.h"
@@ -100,7 +101,7 @@
unsigned char rb_peek(struct ring_buffer* rb, int index)
{
   assert(index < rb_data_size(rb));
    assert(index < rb_data_size(rb));
   return rb->buffer[((rb->rd_pointer + index) % rb->size)];
    return rb->buffer[((rb->rd_pointer + index) % rb->size)];
}