TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139248 times)
  2. FAT32 Library (71743 times)
  3. Network Ethernet Library (57115 times)
  4. USB Device Library (47428 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28073 times)
  9. PID Library (26885 times)
  10. microSD click (26198 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Library

Circular buffer by LQd

Rating:

0

Author: Pavol alias LQd

Last Updated: 2016-02-25

Package Version: 1.0.0.0

Category: Storage

Downloaded: 673 times

Followed by: 1 user

License: MIT license  

Simple ready to use implementation of FirstIn-FrstOut type buffer for general use. Size can be easily adjusted as well as type of stored data. Current depth signalization available. Perfect for interrupt-driven receiving...
Written in mB for AVR but no AVR speciffics used, just pure basic.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Circular buffer by LQd" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Circular buffer by LQd" changes.

Do you want to report abuse regarding "Circular buffer by LQd".

  • Information
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Library Blog

This is, how it works: ( number is element, | | is empty slot)

   4 ->|   |   |   | 3 | 2 | 1 | 
         |   |   | 4 | 3 | 2 | 1 | 
         |   |   |    | 4 | 3 | 2 | ->1


Input accepts data, which can be then collected from output at the same sequence as inserted assuming that buffer can store defined maximum of elements (full buffer will reject elements, no overwriting). Algorithm cares about "recycling" buffer slots and no physical shifting of elements is used, so it is quite effective even for buffer consisting of thousands of elements (it does not matter), it is like a ring, it has no start and no end.


This lib is set for 251 byte buffer of bytes to keep it fast (no other variables than bytes used) but could be very easily changed to other data types and numbers of elements.

ALSO FROM THIS AUTHOR

Fast HD44780 8bit by LQd

0

Library for driving HD44780 in 8bit mode, purpose was to achieve maximal possible speed and library is optimized for this. May be you will need to tweak some waiting routines based on clock frequency of uP and used controller, some of them may not meet datasheet specification.

[Learn More]

Hex string to value

0

Converts HEX strings to value, from single chars through bytes to words and longwords. Written in mB for AVR but no AVR specifics used, so it should be fully multi platform usable.

[Learn More]

Digimesh XBee PRO API mode interfacing

0

This library presents a bridge for interfacing XBee PRO modules in powerful but somewhat complicated API mode. Written in mB for AVR, but contains almost no AVR specifics. I am ready to answer questions. Description in source code.

[Learn More]