GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.
GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.
RingBuffer 是一个基于C语言开发的环形缓冲区,适用于各嵌入式平台的串口收发等应用场景;在基本功能的基础上还提供了一个分段记录框架,方便数据管理;代码在AT32F403A平台上编译运行,经过简单的串口收发测试后暂未发现显性BUG;开始基础功能 RingBuffer Base 的使用方法//引用相关头文件 #include <stdint.h> #include ...
go语言版本的ringbuffer实现. Contribute to rhzx3519/ringbuffer development by creating an account on GitHub.
a thread-safe circular buffer (ring buffer) in Go, implemented io.ReaderWriter interface - ringbuffer/ring_buffer_test.go at master · smallnest/ringbuffer
A circular buffer (ring buffer) in Go, implemented io.ReaderWriter interface Usage package main import ( "fmt" "github.com/smallnest/ringbuffer" ) func main() { rb := ringbuffer.New(1024) // write rb.Write([]byte("abcd")) fmt.Println(rb.Length()) fmt.Println(rb.Free()) // read...
模仿kfifo 实现的环形缓冲区. Contribute to lining1111/RingBuffer development by creating an account on GitHub.
RingBuffer/src/test.c Go to file Copy path 50 lines (37 sloc)1.15 KB RawBlame #include<glib.h> #include"ringbuffer.h" intmain(intargc,constchar*argv[]) { t_ring_buffer *r =NULL; intelem1 =4; intelem2 =6; intelem3 =2;
// rbuf, pointer to buffer struct. // RETURN: // 0 on success, -1 on failure, errno is set. // NOTE: // Don't forget to deallocate buffer, if necessary. int rbuf_destroy(rbuf *buffer);// Returns number of bytes currently held by the buffer. ...
ring_buffer_bytes_translate: for cases where a raw->R and R->raw translation functions are provided ring_buffer_bytes_typed for cases where each element should correspond to a fixed-length vector of one of R's core numeric-ish types (logical, integer, numeric, complex)...