Clean up the ring buffer.

This commit is contained in:
Jonathan Naylor 2026-02-18 13:40:05 +00:00
parent 0308bfc6c7
commit 78216afbb7
4 changed files with 8 additions and 6 deletions

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
.pio
.vscode
*.o
obj/
bin/

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 by Jonathan Naylor G4KLX
* Copyright (C) 2020,2026 by Jonathan Naylor G4KLX
* Copyright (C) 2020 by Geoffrey Merck F4FXL - KC3FRA
*
* This program is free software; you can redistribute it and/or modify
@ -50,7 +50,7 @@ public:
uint16_t getData() const;
bool put(TDATATYPE item) volatile;
bool put(const TDATATYPE& item) volatile;
bool get(TDATATYPE& item) volatile;

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 by Jonathan Naylor G4KLX
* Copyright (C) 2020,2026 by Jonathan Naylor G4KLX
* Copyright (C) 2020 by Geoffrey Merck F4FXL - KC3FRA
*
* This program is free software; you can redistribute it and/or modify
@ -56,7 +56,7 @@ template <typename TDATATYPE> uint16_t CRingBuffer<TDATATYPE>::getData() const
return m_length - m_tail + m_head;
}
template <typename TDATATYPE> bool CRingBuffer<TDATATYPE>::put(TDATATYPE item) volatile
template <typename TDATATYPE> bool CRingBuffer<TDATATYPE>::put(const TDATATYPE& item) volatile
{
if (m_full) {
m_overflow = true;

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020,2021,2022,2023,2025 by Jonathan Naylor G4KLX
* Copyright (C) 2020,2021,2022,2023,2025,2026 by Jonathan Naylor G4KLX
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -19,6 +19,6 @@
#if !defined(VERSION_H)
#define VERSION_H
#define VERSION "20240113"
#define VERSION "20260218"
#endif