rusefi-1/firmware/util/containers/data_buffer.h

25 lines
539 B
C
Raw Normal View History

2015-07-10 06:01:56 -07:00
/*
* data_buffer.h
*
* @date Dec 8, 2012
2020-01-07 21:02:40 -08:00
* @author Andrey Belomutskiy, (c) 2012-2020
2015-07-10 06:01:56 -07:00
*/
2020-04-01 18:32:21 -07:00
#pragma once
2015-07-10 06:01:56 -07:00
#define DB_MAX_SIZE 1024
#define EF_PERIOD 100000000
typedef struct {
int elements[DB_MAX_SIZE];
int size;
} data_buffer_s;
int dbIsFull(data_buffer_s *db);
void dbClear(data_buffer_s *db);
void dbAdd(data_buffer_s *db, int value);
void dbCopy(data_buffer_s *source, data_buffer_s *target);
void dbPrint(data_buffer_s *db, char *message, int withDiff);
void dbPrintTable(data_buffer_s *table[], char *caption[], int columns);