https://github.com/retrodev256/static-circular-queue
A small and simple Circular queue for embedded systems - with error safe code and no dynamic allocation.
https://github.com/retrodev256/static-circular-queue
Last synced: about 1 year ago
JSON representation
A small and simple Circular queue for embedded systems - with error safe code and no dynamic allocation.
- Host: GitHub
- URL: https://github.com/retrodev256/static-circular-queue
- Owner: RetroDev256
- Created: 2020-12-02T14:01:41.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-12-03T17:41:37.000Z (over 5 years ago)
- Last Synced: 2025-01-11T05:17:01.030Z (over 1 year ago)
- Language: C++
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Static and Circular Queue
A small and simple Circular queue for embedded systems - with error safe code and no dynamic allocation.
A circular queue is just a neat use of the '%' (Modulo) operator to negate the use of memory reordering and moving.
I decided to make this for beginners and professionals alike - The queue is small, easy to understand, safe, and static.
It has helpful return values for it's functions that you can use to debug your program, and an easy interface as well.
This class is simple, easy to understand, and pretty much memory efficient, since you are only passing elements by value
when you are pulling them out of the queue, and once an element is inserted, it is not moved around any more. :)
Here ya are, if you want to use a queue, and cant bother to write it yourself, or dont want the overhead of the C++
header.