Skip to content

About

C implementation of a Circular Buffer (Ring Buffer) for the ATmega328P to log sensor data in real-time.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A lightweight implementation of a Circular Buffer (Ring Buffer) written in C. This data structure provides a fixed-size, First-In-First-Out (FIFO) queue designed specifically for memory-constrained microcontrollers (like the ATmega328P or STM32). It eliminates the need for dynamic memory allocation (malloc), preventing memory fragmentation and ensuring deterministic runtime performance.

Key Features & Use Cases This implementation is optimized for UART Interrupt Service Routines (ISRs) and high-speed sensor data logging.

O(1) Complexity: Constant time execution for adding (push) and removing (pop) elements.

Interrupt Safe: Designed to safely handle data transfer between hardware interrupts and the main application loop.

Memory Efficient: Uses a static array to wrap data around automatically, enabling continuous data streaming with minimal RAM usage.

About

C implementation of a Circular Buffer (Ring Buffer) for the ATmega328P to log sensor data in real-time.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages