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

Fixing multi-channel mode.

This commit is contained in:
Juan64Bits
2010-04-12 21:26:26 -05:00
parent beca2e0bd3
commit 7a462423ed
11 changed files with 347 additions and 68 deletions

View File

@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define ADC_CMD_NONE 0x00 /* Nothing to do */
#define ADC_CMD_SET_SPI_CLKDIV 0x00 /* Set clock divider for ADC sclk */
#define ADC_CMD_SET_BUFFER_SIZE 0x00 /* Set clock divider for ADC sclk */
#define ADC_CMD_SET_CHANNEL0 0x30 /* Set channel 0 */
#define ADC_CMD_READ_CHANNEL0 0x20 /* Read channel 0 */
@@ -68,7 +69,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define ADC_SPI_CLKDIV_MIN 0x08 /* 50/(2*9) -> 2.78MHz (MAX=2.8MHz) */
#define ADC_SPI_CLKDIV_MAX 0xFF /* 50/(2*256) -> 97.65KHz */
#define ADC_MAX_BUFFER 0x3F0/* 1008 reads/commands */
#define ADC_MAX_BUFFER 0x3FE/* 1022 reads/commands */
#define CS2_PORT JZ_GPIO_PORT_B
#define CS2_PIN 26