Root/Examples/ADC/Test-QT-src/ADCw.h

Source at commit 9d578912b727722b22319832985451a79ec35747 created 13 years 27 days ago.
By Juan64Bits, Updating prototype of SIE code generator.
1#ifndef ADCW_H
2#define ADCW_H
3
4#include "jz_adc_peripheral.h"
5#include <stdio.h>
6#include <unistd.h>
7
8class ADCw
9{
10public:
11    ADCw();
12    ~ADCw(){}
13
14    void testADC();
15    void powerDownADC();
16    JZ_REG * takeSamplesADC(int CHANNEL);
17    void setClockDiv(uchar value){ ADC_SPI_CLKDIV = value;}
18    void setBufferLen(int value){ BUFFER_LEN = value;}
19    void setMuxChannels(uchar value){ MUX_CHANNELS = value;}
20private:
21    void adcConfig(uchar CMD);
22    int adcCheckBufferFull();
23
24    JZ_REG * ADCBuffer;
25    uchar ADC_SPI_CLKDIV;
26    int BUFFER_LEN;
27    int BUFFER_OFFSET;
28    uchar MUX_CHANNELS;
29};
30
31#endif // ADCW_H
32

Archive Download this file

Branches:
master



interactive