Compare commits

...

4 Commits

Author SHA1 Message Date
Jonathan Naylor 78216afbb7 Clean up the ring buffer. 2026-02-18 13:40:05 +00:00
Jonathan Naylor 0308bfc6c7 Merge branch 'master' into mqtt 2026-02-18 13:36:22 +00:00
Jonathan Naylor 278c69152a
Merge pull request #356 from F4FXL/C++11-Flags 2026-01-20 20:31:18 +00:00
Geoffrey Merck 8e144e81d0
Add C++11 standard flag to compiler flags
Debian Trixie ships with arm-none-eabi-g++ v14.2.1 which defaults to c++17, this forces compilation with c++11
2026-01-20 20:29:04 +01:00
5 changed files with 10 additions and 8 deletions

2
.gitignore vendored
View File

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

View File

@ -149,9 +149,9 @@ DEFS_EDA_446=-DUSE_STDPERIPH_DRIVER -DSTM32F4XX -DSTM32F446xx -DSTM32F4_EDA_446
# Build compiler flags
CFLAGS_F4=-c $(MCFLAGS_F4) $(INCLUDES_F4)
CXXFLAGS_F4=-c $(MCFLAGS_F4) $(INCLUDES_F4)
CXXFLAGS_F4=-c $(MCFLAGS_F4) $(INCLUDES_F4) -std=c++11
CFLAGS_F7=-c $(MCFLAGS_F7) $(INCLUDES_F7)
CXXFLAGS_F7=-c $(MCFLAGS_F7) $(INCLUDES_F7)
CXXFLAGS_F7=-c $(MCFLAGS_F7) $(INCLUDES_F7) -std=c++11
# Linker flags
LDFLAGS_F4 =-T stm32f4xx_link.ld $(MCFLAGS_F4) --specs=nosys.specs $(INCLUDES_LIBS_F4)

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