Skip to content

zxa1095696200/RingBuffer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RingBuffer

模仿kfifo实现的环形缓冲区。程序中涉及到环形缓冲区的概念,详细介绍见维基百科Circular buffer

开发环境

  • 操作系统:Windows 10 专业版
  • IDE:Visual Studio 2017 专业版

API

  • RingBuffer *RingBuffer_Malloc(uint32_t size)
  • void RingBuffer_Free(RingBuffer *fifo)
  • uint32_t RingBuffer_In(RingBuffer *fifo, const void *in, uint32_t len)
  • uint32_t RingBuffer_Out(RingBuffer *fifo, void *out, uint32_t len)
  • void RingBuffer_Reset(RingBuffer *fifo)
  • uint32_t RingBuffer_Size(RingBuffer *fifo)
  • uint32_t RingBuffer_Len(RingBuffer *fifo)
  • uint32_t RingBuffer_Avail(RingBuffer *fifo)
  • bool RingBuffer_IsEmpty(RingBuffer *fifo)
  • bool RingBuffer_IsFull(RingBuffer *fifo)

运行效果

About

模仿 kfifo 实现的环形缓冲区

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%