mirror of
git://projects.qi-hardware.com/nn-usb-fpga.git
synced 2025-04-21 12:27:27 +03:00
Adding dual channel to scope example, fixing logic and QT source code.
This commit is contained in:
30
Examples/ADC/Scope-QT-src/ADCw.h
Normal file
30
Examples/ADC/Scope-QT-src/ADCw.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#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;}
|
||||
|
||||
private:
|
||||
void adcConfig(uchar CMD);
|
||||
int adcCheckBufferFull();
|
||||
|
||||
JZ_REG * ADCBuffer;
|
||||
uchar ADC_SPI_CLKDIV;
|
||||
int BUFFER_LEN;
|
||||
int BUFFER_OFFSET;
|
||||
};
|
||||
|
||||
#endif // ADCW_H
|
||||
Reference in New Issue
Block a user