#ifndef __FILTER_H
#define __FILTER_H

#include <stdbool.h>


#define ADC_FILTER_LEN 20


typedef struct 
{
    uint8_t     head;
    uint8_t     count;
    uint8_t     len;
    uint32_t    sum;
    uint32_t    *data;
  
} average_int_t;


//    
void average_filter_init(void);

//
uint32_t average_int(average_int_t *fil, uint32_t value);

extern average_int_t average_filter[];



#endif  // __FILTER_H

