약간의 수정
This commit is contained in:
23
ccs/state.h
Normal file → Executable file
23
ccs/state.h
Normal file → Executable file
@@ -20,3 +20,26 @@ int senbuf_push(SensorBuffer *sb, uint8_t value);
|
||||
int senbuf_pop(SensorBuffer *sb);
|
||||
|
||||
void senbuf_get(SensorBuffer *sb, uint8_t *out, int lookahead);
|
||||
|
||||
|
||||
|
||||
// History Buffer
|
||||
|
||||
#define HISTORY_SIZE 20000
|
||||
|
||||
typedef struct {
|
||||
uint8_t buffer[HISTORY_SIZE];
|
||||
int front;
|
||||
int rear;
|
||||
int size;
|
||||
} HistoryBuffer;
|
||||
|
||||
void hisbuf_init(HistoryBuffer *sb);
|
||||
|
||||
int hisbuf_is_full(HistoryBuffer *sb);
|
||||
|
||||
int hisbuf_push(HistoryBuffer *sb, uint8_t value);
|
||||
|
||||
int hisbuf_pop(HistoryBuffer *sb);
|
||||
|
||||
void hisbuf_get(HistoryBuffer *sb, uint8_t *out, int lookahead);
|
||||
|
||||
Reference in New Issue
Block a user