You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
extr/buffer.h

17 lines
300 B
C

#ifndef _BUFFER_H_
#define _BUFFER_H_
#include <stdint.h>
#define BUFFER_SIZE 200
typedef struct {
uint16_t values[BUFFER_SIZE];
uint16_t position;
} buffer_t;
void insert_to_buffer(uint16_t val, volatile buffer_t* buf);
float get_buffer_mean(volatile buffer_t* buf);
#endif//_BUFFER_H_