{"id":13836127,"url":"https://github.com/AndersKaloer/Ring-Buffer","last_synced_at":"2025-07-10T13:31:44.723Z","repository":{"id":13828916,"uuid":"16525615","full_name":"AndersKaloer/Ring-Buffer","owner":"AndersKaloer","description":"A simple ring buffer (circular buffer) designed for embedded systems.","archived":false,"fork":false,"pushed_at":"2023-12-01T07:36:28.000Z","size":124,"stargazers_count":454,"open_issues_count":0,"forks_count":174,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-02-17T06:35:03.594Z","etag":null,"topics":["buffer","c","circular-buffer","circularbuffer","ring-buffer","ringbuffer"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndersKaloer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-02-04T21:06:34.000Z","updated_at":"2024-02-15T08:54:54.000Z","dependencies_parsed_at":"2024-01-13T16:45:15.572Z","dependency_job_id":"4318426e-ced2-45aa-9d8f-78c409bd58d0","html_url":"https://github.com/AndersKaloer/Ring-Buffer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndersKaloer%2FRing-Buffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndersKaloer%2FRing-Buffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndersKaloer%2FRing-Buffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndersKaloer%2FRing-Buffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndersKaloer","download_url":"https://codeload.github.com/AndersKaloer/Ring-Buffer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225638957,"owners_count":17500656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buffer","c","circular-buffer","circularbuffer","ring-buffer","ringbuffer"],"created_at":"2024-08-04T15:00:36.246Z","updated_at":"2025-07-10T13:31:44.702Z","avatar_url":"https://github.com/AndersKaloer.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"Ring-Buffer\n===========\n\nA simple ring buffer (circular buffer) designed for embedded systems.\n\nExamples are given in [examples/simple.c](examples/simple.c) and [examples/tail.c](examples/tail.c).\n\nThe size of the memory buffer must be a power-of-two, and the ring buffer can contain at most `buf_size-1` bytes.\n\nA new ring buffer is created using the ` ring_buffer_init(\u0026ring_buffer, buff, sizeof(buff))` function:\n```c\nchar buff[64];\nring_buffer_t ring_buffer;\nring_buffer_init(\u0026ring_buffer, buff, sizeof(buff));\n```\nIn this case, the buffer size is 64 bytes and the ring buffer can contain 63 bytes.\n\nThe module provides the following functions for accessing the ring buffer (documentation can be found in [ringbuffer.h](ringbuffer.h)):\n```c\nvoid ring_buffer_queue(ring_buffer_t *buffer, char data);\nvoid ring_buffer_queue_arr(ring_buffer_t *buffer, const char *data, ring_buffer_size_t size);\nuint8_t ring_buffer_dequeue(ring_buffer_t *buffer, char *data);\nring_buffer_size_t ring_buffer_dequeue_arr(ring_buffer_t *buffer, char *data, ring_buffer_size_t len);\nuint8_t ring_buffer_peek(ring_buffer_t *buffer, char *data, ring_buffer_size_t index);\nuint8_t ring_buffer_is_empty(ring_buffer_t *buffer);\nuint8_t ring_buffer_is_full(ring_buffer_t *buffer);\nring_buffer_size_t ring_buffer_num_items(ring_buffer_t *buffer);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAndersKaloer%2FRing-Buffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAndersKaloer%2FRing-Buffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAndersKaloer%2FRing-Buffer/lists"}