1
0
mirror of git://projects.qi-hardware.com/nn-usb-fpga.git synced 2025-01-10 23:50:16 +02:00
nn-usb-fpga/Examples/ADC/Scope-QT-src/ADCw.h

32 lines
579 B
C
Raw Normal View History

#ifndef ADCW_H
#define ADCW_H
#include "jz_adc_peripheral.h"
#include <stdio.h>
#include <unistd.h>
class ADCw
{
public:
ADCw();
~ADCw(){}
void testADC();
void powerDownADC();
JZ_REG * takeSamplesADC(int CHANNEL);
void setClockDiv(uchar value){ ADC_SPI_CLKDIV = value;}
void setBufferLen(int value){ BUFFER_LEN = value;}
2010-04-13 05:26:26 +03:00
void setMuxChannels(uchar value){ MUX_CHANNELS = value;}
private:
void adcConfig(uchar CMD);
int adcCheckBufferFull();
JZ_REG * ADCBuffer;
uchar ADC_SPI_CLKDIV;
int BUFFER_LEN;
int BUFFER_OFFSET;
2010-04-13 05:26:26 +03:00
uchar MUX_CHANNELS;
};
#endif // ADCW_H