123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #ifndef __AD7606_H
- #define __AD7606_H
- #include "interface.h"
- typedef enum
- {
- AD_OS_NO = 0,
- AD_OS_X2 = 1,
- AD_OS_X4 = 2,
- AD_OS_X8 = 3,
- AD_OS_X16 = 4,
- AD_OS_X32 = 5,
- AD_OS_X64 = 6
- } AD7606_OS_E;
- #define ADC_FIFO_SIZE (2 * 1024)
- typedef struct
- {
- uint8_t ucOS;
- uint8_t ucRange;
- int16_t sNowAdc[8];
- } AD7606_VAR_T;
- typedef struct
- {
-
- uint16_t usRead;
- uint16_t usWrite;
- uint16_t usCount;
- uint8_t ucFull;
- int16_t sBuf[ADC_FIFO_SIZE];
- } AD7606_FIFO_T;
- void ad7606_init(void);
- void AD7606_SetOS(uint8_t _ucOS);
- void AD7606_SetInputRange(uint8_t _ucRange);
- void AD7606_Reset(void);
- void AD7606_StartConvst(void);
- void AD7606_ReadNowAdc(void);
- void AD7606_EnterAutoMode(uint32_t _ulFreq);
- void AD7606_StartRecord(uint32_t _ulFreq);
- void AD7606_StopRecord(void);
- uint8_t AD7606_FifoNewData(void);
- uint8_t AD7606_ReadFifo(uint16_t *_usReadAdc);
- uint8_t AD7606_FifoFull(void);
- extern AD7606_VAR_T g_tAD7606;
- extern AD7606_FIFO_T g_tAdcFifo;
- #endif
|