Skip to content

siemtim-dev/embytes-buffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This libray contains a buffer implementation that is made for no_std environments.

The buffer is backed ba any bytes source that satisfies AsMut<[u8]> + AsRef<[u8]>.

the buffer implemnts embedded_io::Read, embedded_io::Write, std::io::Read and std::io::Write.

Example

// Create a new buffern with an array as byte source on the stack
let mut buffer = new_stack_buffer::<1024>();

// Write some bytes to buffer
buffer.write_all("hello world".as_bytes()).unwrap();

// read the bytes again
let mut buf = [0; 128];
let bytes_read = buffer.read(&mut buf).unwrap();

See examples directory for more examples

About

Byte Buffer wirtten in Rust for embedded devices

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages