29 lines
410 B
C
29 lines
410 B
C
/*
|
|
* main.h
|
|
*
|
|
* Created on: 2023年7月8日
|
|
* Author: User
|
|
*/
|
|
|
|
#ifndef _RING_H_
|
|
#define _RING_H_
|
|
|
|
#include "config.h"
|
|
|
|
#define ADC_BUF_LENGTH 16 // 应该小于64
|
|
|
|
typedef struct {
|
|
u16 buf[ADC_BUF_LENGTH];
|
|
u8 index;
|
|
// u16 max;
|
|
// u16 min;
|
|
u8 full;
|
|
} S_ADC_RING;
|
|
|
|
void InitRing(S_ADC_RING *ring);
|
|
void SaveRing(S_ADC_RING *ring, u16 val);
|
|
|
|
extern S_ADC_RING xdata adcRing;
|
|
|
|
#endif
|