初始提交
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#ifndef ADS8321_H
|
||||
#define ADS8321_H
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define ADC_CHANNEL_NUM 2
|
||||
#define ADC_QUEUE_LEN 6000
|
||||
#define PACKET_DATA_UNIT_NUM 6000
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct __adcDataUnitDef {
|
||||
uint16_t aulData[ADC_CHANNEL_NUM];
|
||||
} adcDataUnitDef;
|
||||
|
||||
typedef struct __adcDataQueueDef {
|
||||
uint32_t ulReadPos;
|
||||
uint32_t ulWritePos;
|
||||
adcDataUnitDef atQueue[ADC_QUEUE_LEN];
|
||||
} adcDataQueueDef;
|
||||
#pragma pack()
|
||||
|
||||
extern volatile adcDataQueueDef gtAdcDataQueue;
|
||||
|
||||
uint16_t adcDataQueueLen(void);
|
||||
void adcSampleStart(void);
|
||||
void adcSampleStop(void);
|
||||
|
||||
#endif // ADS8321_H
|
||||
Reference in New Issue
Block a user