1
0
mirror of git://projects.qi-hardware.com/nn-usb-fpga.git synced 2025-04-21 12:27:27 +03:00

Adding diagrams to DOCS and fixing someting source code.

This commit is contained in:
Juan64Bits
2010-04-14 21:45:30 -05:00
parent bde2a0a3cb
commit 47c949c5d3
12 changed files with 12 additions and 11 deletions

View File

@@ -2,7 +2,7 @@
ADCw::ADCw()
{
BUFFER_OFFSET = 9;
BUFFER_OFFSET = 8; //Ignore first 16 samples
ADC_SPI_CLKDIV=ADC_SPI_CLKDIV_MAX; //Set clock to minimum speed
BUFFER_LEN=16;
MUX_CHANNELS =0;
@@ -65,7 +65,7 @@ JZ_REG* ADCw::takeSamplesADC(int CHANNEL)
void ADCw::adcConfig(uchar CMD)
{
ADCBuffer[0] = (((MUX_CHANNELS<<6) + CMD)<<24) + \
((BUFFER_LEN+(BUFFER_OFFSET-1)*2) << 8) + \
((BUFFER_LEN+BUFFER_OFFSET*2) << 8) + \
(ADC_SPI_CLKDIV);
while(adcCheckBufferFull()) usleep (10);
}