This commit is contained in:
hg
2014-02-19 22:36:17 +01:00
parent 1ba4553e29
commit 38f222788c
5 changed files with 54 additions and 42 deletions

3
.hgignore Normal file
View File

@ -0,0 +1,3 @@
syntax: regexp
^Release$

View File

@ -3,7 +3,7 @@
<configuration id="it.baeyens.arduino.core.toolChain.release.1766021206" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider class="it.baeyens.arduino.toolchain.ArduinoLanguageProvider" console="false" id="it.baeyens.arduino.languageSettingsProvider" keep-relative-paths="false" name="Arduino Compiler Settings" parameter="${COMMAND} -E -P -v -dD ${INPUTS}" prefer-non-shared="true">
<provider class="it.baeyens.arduino.toolchain.ArduinoLanguageProvider" console="false" env-hash="-2011256820" id="it.baeyens.arduino.languageSettingsProvider" keep-relative-paths="false" name="Arduino Compiler Settings" parameter="${COMMAND} -E -P -v -dD ${INPUTS}" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>

View File

@ -1,4 +1,7 @@
eclipse.preferences.version=1
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.ARCHITECTURE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.ARCHITECTURE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.ARCHITECTURE/value=avr
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.ARCHIVE_FILE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.ARCHIVE_FILE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.ARCHIVE_FILE/value=arduino.ar
@ -23,6 +26,9 @@ environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.BOOTL
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.BOOTLOADER.UNLOCK_BITS/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.BOOTLOADER.UNLOCK_BITS/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.BOOTLOADER.UNLOCK_BITS/value=0x3F
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.BUILD.ARCH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.BUILD.ARCH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.BUILD.ARCH/value=AVR
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.BUILD.CORE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.BUILD.CORE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.BUILD.CORE/value=arduino
@ -182,6 +188,9 @@ environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.RECIP
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.RECIPE.SIZE.REGEX/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.RECIPE.SIZE.REGEX/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.RECIPE.SIZE.REGEX/value=Total\\s+([0-9]+).*
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.RUNTIME.HARDWARE.PATH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.RUNTIME.HARDWARE.PATH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.RUNTIME.HARDWARE.PATH/value=/Applications/Arduino.app/Contents/Resources/Java/hardware
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.RUNTIME.IDE.PATH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.RUNTIME.IDE.PATH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.1766021206/A.RUNTIME.IDE.PATH/value=/Applications/Arduino.app/Contents/Resources/Java

View File

@ -334,19 +334,19 @@ unsigned long AD7190_SingleConversion(void)
unsigned long command = 0x0;
unsigned long regData = 0x0;
command = (((1L) & 0x7) << 21);
// command = (((1L) & 0x7) << 21);
// Serial.print("Command1: ");
// Serial.println(command, 16);
command |= (((2L) & 0x3) << 18);
// command |= (((2L) & 0x3) << 18);
// Serial.print("Command2: ");
// Serial.println(command, 16);
command |= ((0x060) & 0x3FF);
// command |= ((0x060) & 0x3FF);
// Serial.print("Command3: ");
// Serial.println(command, 16);
//command = AD7190_MODE_SEL(AD7190_MODE_SINGLE) |
// AD7190_MODE_CLKSRC(AD7190_CLK_INT_CO) |
// AD7190_MODE_RATE(0x060);
command = AD7190_MODE_SEL(AD7190_MODE_SINGLE) |
AD7190_MODE_CLKSRC(AD7190_CLK_INT_CO) |
AD7190_MODE_RATE(0x060);
//Serial.print("Command: ");
//Serial.println(command, 16);

View File

@ -76,30 +76,30 @@
#define AD7190_REG_FULLSCALE 7 // Full-Scale Register (RW, 24-bit)
/* Communications Register Bit Designations (AD7190_REG_COMM) */
#define AD7190_COMM_WEN (1 << 7) // Write Enable.
#define AD7190_COMM_WRITE (0 << 6) // Write Operation.
#define AD7190_COMM_READ (1 << 6) // Read Operation.
#define AD7190_COMM_ADDR(x) (((x) & 0x7) << 3) // Register Address.
#define AD7190_COMM_CREAD (1 << 2) // Continuous Read of Data Register.
#define AD7190_COMM_WEN (1L << 7) // Write Enable.
#define AD7190_COMM_WRITE (0L << 6) // Write Operation.
#define AD7190_COMM_READ (1L << 6) // Read Operation.
#define AD7190_COMM_ADDR(x) ((((unsigned long)x) & 0x7) << 3) // Register Address.
#define AD7190_COMM_CREAD (1L << 2) // Continuous Read of Data Register.
/* Status Register Bit Designations (AD7190_REG_STAT) */
#define AD7190_STAT_RDY (1 << 7) // Ready.
#define AD7190_STAT_ERR (1 << 6) // ADC error bit.
#define AD7190_STAT_NOREF (1 << 5) // Error no external reference.
#define AD7190_STAT_PARITY (1 << 4) // Parity check of the data register.
#define AD7190_STAT_CH2 (1 << 2) // Channel 2.
#define AD7190_STAT_CH1 (1 << 1) // Channel 1.
#define AD7190_STAT_CH0 (1 << 0) // Channel 0.
#define AD7190_STAT_RDY (1L << 7) // Ready.
#define AD7190_STAT_ERR (1L << 6) // ADC error bit.
#define AD7190_STAT_NOREF (1L << 5) // Error no external reference.
#define AD7190_STAT_PARITY (1L << 4) // Parity check of the data register.
#define AD7190_STAT_CH2 (1L << 2) // Channel 2.
#define AD7190_STAT_CH1 (1L << 1) // Channel 1.
#define AD7190_STAT_CH0 (1L << 0) // Channel 0.
/* Mode Register Bit Designations (AD7190_REG_MODE) */
#define AD7190_MODE_SEL(x) (((x) & 0x7) << 21) // Operation Mode Select.
#define AD7190_MODE_DAT_STA (1 << 20) // Status Register transmission.
#define AD7190_MODE_CLKSRC(x) (((x) & 0x3) << 18) // Clock Source Select.
#define AD7190_MODE_SINC3 (1 << 15) // SINC3 Filter Select.
#define AD7190_MODE_ENPAR (1 << 13) // Parity Enable.
#define AD7190_MODE_SCYCLE (1 << 11) // Single cycle conversion.
#define AD7190_MODE_REJ60 (1 << 10) // 50/60Hz notch filter.
#define AD7190_MODE_RATE(x) ((x) & 0x3FF) // Filter Update Rate Select.
#define AD7190_MODE_SEL(x) ((((unsigned long)x) & 0x7) << 21) // Operation Mode Select.
#define AD7190_MODE_DAT_STA (1L << 20) // Status Register transmission.
#define AD7190_MODE_CLKSRC(x) ((((unsigned long)x) & 0x3) << 18) // Clock Source Select.
#define AD7190_MODE_SINC3 (1L << 15) // SINC3 Filter Select.
#define AD7190_MODE_ENPAR (1L << 13) // Parity Enable.
#define AD7190_MODE_SCYCLE (1L << 11) // Single cycle conversion.
#define AD7190_MODE_REJ60 (1L << 10) // 50/60Hz notch filter.
#define AD7190_MODE_RATE(x) (((unsigned long)x) & 0x3FF) // Filter Update Rate Select.
/* Mode Register: AD7190_MODE_SEL(x) options */
#define AD7190_MODE_CONT 0 // Continuous Conversion Mode.
@ -121,14 +121,14 @@
// clock is available on MCLK2.
/* Configuration Register Bit Designations (AD7190_REG_CONF) */
#define AD7190_CONF_CHOP (1 << 23) // CHOP enable.
#define AD7190_CONF_REFSEL (1 << 20) // REFIN1/REFIN2 Reference Select.
#define AD7190_CONF_CHAN(x) (((x) & 0xFF) << 8) // Channel select.
#define AD7190_CONF_BURN (1 << 7) // Burnout current enable.
#define AD7190_CONF_REFDET (1 << 6) // Reference detect enable.
#define AD7190_CONF_BUF (1 << 4) // Buffered Mode Enable.
#define AD7190_CONF_UNIPOLAR (1 << 3) // Unipolar/Bipolar Enable.
#define AD7190_CONF_GAIN(x) ((x) & 0x7) // Gain Select.
#define AD7190_CONF_CHOP (1L << 23) // CHOP enable.
#define AD7190_CONF_REFSEL (1L << 20) // REFIN1/REFIN2 Reference Select.
#define AD7190_CONF_CHAN(x) ((((unsigned long)x) & 0xFF) << 8) // Channel select.
#define AD7190_CONF_BURN (1L << 7) // Burnout current enable.
#define AD7190_CONF_REFDET (1L << 6) // Reference detect enable.
#define AD7190_CONF_BUF (1L << 4) // Buffered Mode Enable.
#define AD7190_CONF_UNIPOLAR (1L << 3) // Unipolar/Bipolar Enable.
#define AD7190_CONF_GAIN(x) (((unsigned long)x) & 0x7) // Gain Select.
/* Configuration Register: AD7190_CONF_CHAN(x) options */
#define AD7190_CH_AIN1P_AIN2M 0 // AIN1(+) - AIN2(-)
@ -154,13 +154,13 @@
#define AD7190_ID_MASK 0x0F
/* GPOCON Register Bit Designations (AD7190_REG_GPOCON) */
#define AD7190_GPOCON_BPDSW (1 << 6) // Bridge power-down switch enable
#define AD7190_GPOCON_GP32EN (1 << 5) // Digital Output P3 and P2 enable
#define AD7190_GPOCON_GP10EN (1 << 4) // Digital Output P1 and P0 enable
#define AD7190_GPOCON_P3DAT (1 << 3) // P3 state
#define AD7190_GPOCON_P2DAT (1 << 2) // P2 state
#define AD7190_GPOCON_P1DAT (1 << 1) // P1 state
#define AD7190_GPOCON_P0DAT (1 << 0) // P0 state
#define AD7190_GPOCON_BPDSW (1L << 6) // Bridge power-down switch enable
#define AD7190_GPOCON_GP32EN (1L << 5) // Digital Output P3 and P2 enable
#define AD7190_GPOCON_GP10EN (1L << 4) // Digital Output P1 and P0 enable
#define AD7190_GPOCON_P3DAT (1L << 3) // P3 state
#define AD7190_GPOCON_P2DAT (1L << 2) // P2 state
#define AD7190_GPOCON_P1DAT (1L << 1) // P1 state
#define AD7190_GPOCON_P0DAT (1L << 0) // P0 state
/******************************************************************************/