Fixed ring_buffer's linking problems

This commit is contained in:
2026-06-02 17:48:52 +02:00
parent e7e436affa
commit eba2bb6f99
2 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
// 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];

View File

@@ -6,12 +6,12 @@
#include <ring_buffer.h>
#include <stdbool.h>
inline void ringBufferPush(ring_buffer_t *rb, uint32_t value) {
void ringBufferPush(ring_buffer_t *rb, uint32_t value) {
rb->buffer[rb->w_head] = value;
rb->w_head++;
return;
}
inline uint32_t ringBufferRead(ring_buffer_t *rb, uint8_t idx) {
uint32_t ringBufferRead(ring_buffer_t *rb, uint8_t idx) {
return rb->buffer[rb->w_head - 1 - idx];
}