auto-sync
This commit is contained in:
parent
5732ac2092
commit
fd95ec0008
|
@ -12,10 +12,15 @@
|
|||
#include "cyclic_buffer.h"
|
||||
#include <string.h>
|
||||
|
||||
cyclic_buffer::cyclic_buffer() : cyclic_buffer(CB_MAX_SIZE) {
|
||||
cyclic_buffer::cyclic_buffer() {
|
||||
baseC(CB_MAX_SIZE);
|
||||
}
|
||||
|
||||
cyclic_buffer::cyclic_buffer(int size) {
|
||||
baseC(size);
|
||||
}
|
||||
|
||||
void cyclic_buffer::baseC(int size) {
|
||||
currentIndex = 0;
|
||||
setSize(size);
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ class cyclic_buffer
|
|||
void clear();
|
||||
|
||||
private:
|
||||
void baseC(int size);
|
||||
volatile int elements[CB_MAX_SIZE];
|
||||
volatile int currentIndex;
|
||||
volatile int count;
|
||||
|
|
Loading…
Reference in New Issue