// Copyright (C) 2026 Hector van der Aa <hector@h3cx.dev>
// Copyright (C) 2026 Association Exergie <association.exergie@gmail.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <stdint.h>
typedef struct ring_buffer_t {
  uint32_t buffer[256];
  uint8_t w_head;
} ring_buffer_t;

inline void ringBufferPush(volatile ring_buffer_t *rb, uint32_t value);

inline uint32_t ringBufferRead(volatile ring_buffer_t *rb, uint8_t neg_idx);

inline void ringBufferRevert(volatile ring_buffer_t *rb, uint8_t val);
