Skip to content
/ LwRB Public

ringbuffer(环形缓冲区)可以说是嵌入式应用非常常用的数据缓存设计了,LwRB 是国外开发者 MaJerle 维护实现的轻量级 ringbuffer,是一个为嵌入式系统特殊优化设计的 FIFO。1. 纯ANSI C99实现, 数据类型兼容于size_t 2. 与具体硬件平台无关 3. 类FIFO缓冲设计 4. 未使用动态内存分配,纯静态内存 5. 特殊优化过的memcpy实现 6. 当用作单写/单读的管道时是线程&中断安全的 7. 适用于DMA在缓冲区和应用程序内存之间进行零拷贝开销的DMA传输 8. 支持数据查看、读跳过、写进 9. 实现对事件通知的支持

License

Notifications You must be signed in to change notification settings

wuzhl2018/LwRB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

159 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generic ring buffer manager

Library provides generic FIFO ring buffer implementation.

Read first: Documentation

Features

  • Written in ANSI C99, compatible with size_t for size data types
  • Platform independent, no architecture specific code
  • FIFO (First In First Out) buffer implementation
  • No dynamic memory allocation, data is static array
  • Uses optimized memory copy instead of loops to read/write data from/to memory
  • Thread safe when used as pipe with single write and single read entries
  • Interrupt safe when used as pipe with single write and single read entries
  • Suitable for DMA transfers from and to memory with zero-copy overhead between buffer and application memory
  • Supports data peek, skip for read and advance for write
  • Implements support for event notifications
  • User friendly MIT license

Contribute

Fresh contributions are always welcome. Simple instructions to proceed::

  1. Fork Github repository
  2. Respect C style & coding rules used by the library
  3. Create a pull request to develop branch with new features or bug fixes

Alternatively you may:

  1. Report a bug
  2. Ask for a feature request

About

ringbuffer(环形缓冲区)可以说是嵌入式应用非常常用的数据缓存设计了,LwRB 是国外开发者 MaJerle 维护实现的轻量级 ringbuffer,是一个为嵌入式系统特殊优化设计的 FIFO。1. 纯ANSI C99实现, 数据类型兼容于size_t 2. 与具体硬件平台无关 3. 类FIFO缓冲设计 4. 未使用动态内存分配,纯静态内存 5. 特殊优化过的memcpy实现 6. 当用作单写/单读的管道时是线程&中断安全的 7. 适用于DMA在缓冲区和应用程序内存之间进行零拷贝开销的DMA传输 8. 支持数据查看、读跳过、写进 9. 实现对事件通知的支持

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages