Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
ad7793.h File Reference

Go to the source code of this file.

Data Structures

struct  ad7793_platform_data
 

Macros

#define AD7793_REG_COMM   0 /* Communications Register (WO, 8-bit) */
 
#define AD7793_REG_STAT   0 /* Status Register (RO, 8-bit) */
 
#define AD7793_REG_MODE   1 /* Mode Register (RW, 16-bit */
 
#define AD7793_REG_CONF   2 /* Configuration Register (RW, 16-bit) */
 
#define AD7793_REG_DATA   3 /* Data Register (RO, 16-/24-bit) */
 
#define AD7793_REG_ID   4 /* ID Register (RO, 8-bit) */
 
#define AD7793_REG_IO   5 /* IO Register (RO, 8-bit) */
 
#define AD7793_REG_OFFSET
 
#define AD7793_REG_FULLSALE
 
#define AD7793_COMM_WEN   (1 << 7) /* Write Enable */
 
#define AD7793_COMM_WRITE   (0 << 6) /* Write Operation */
 
#define AD7793_COMM_READ   (1 << 6) /* Read Operation */
 
#define AD7793_COMM_ADDR(x)   (((x) & 0x7) << 3) /* Register Address */
 
#define AD7793_COMM_CREAD   (1 << 2) /* Continuous Read of Data Register */
 
#define AD7793_STAT_RDY   (1 << 7) /* Ready */
 
#define AD7793_STAT_ERR   (1 << 6) /* Error (Overrange, Underrange) */
 
#define AD7793_STAT_CH3   (1 << 2) /* Channel 3 */
 
#define AD7793_STAT_CH2   (1 << 1) /* Channel 2 */
 
#define AD7793_STAT_CH1   (1 << 0) /* Channel 1 */
 
#define AD7793_MODE_SEL(x)   (((x) & 0x7) << 13) /* Operation Mode Select */
 
#define AD7793_MODE_SEL_MASK   (0x7 << 13) /* Operation Mode Select mask */
 
#define AD7793_MODE_CLKSRC(x)   (((x) & 0x3) << 6) /* ADC Clock Source Select */
 
#define AD7793_MODE_RATE(x)   ((x) & 0xF) /* Filter Update Rate Select */
 
#define AD7793_MODE_CONT   0 /* Continuous Conversion Mode */
 
#define AD7793_MODE_SINGLE   1 /* Single Conversion Mode */
 
#define AD7793_MODE_IDLE   2 /* Idle Mode */
 
#define AD7793_MODE_PWRDN   3 /* Power-Down Mode */
 
#define AD7793_MODE_CAL_INT_ZERO   4 /* Internal Zero-Scale Calibration */
 
#define AD7793_MODE_CAL_INT_FULL   5 /* Internal Full-Scale Calibration */
 
#define AD7793_MODE_CAL_SYS_ZERO   6 /* System Zero-Scale Calibration */
 
#define AD7793_MODE_CAL_SYS_FULL   7 /* System Full-Scale Calibration */
 
#define AD7793_CLK_INT
 
#define AD7793_CLK_INT_CO
 
#define AD7793_CLK_EXT   2 /* External 64 kHz Clock */
 
#define AD7793_CLK_EXT_DIV2   3 /* External Clock divided by 2 */
 
#define AD7793_CONF_VBIAS(x)
 
#define AD7793_CONF_BO_EN   (1 << 13) /* Burnout Current Enable */
 
#define AD7793_CONF_UNIPOLAR   (1 << 12) /* Unipolar/Bipolar Enable */
 
#define AD7793_CONF_BOOST   (1 << 11) /* Boost Enable */
 
#define AD7793_CONF_GAIN(x)   (((x) & 0x7) << 8) /* Gain Select */
 
#define AD7793_CONF_REFSEL   (1 << 7) /* INT/EXT Reference Select */
 
#define AD7793_CONF_BUF   (1 << 4) /* Buffered Mode Enable */
 
#define AD7793_CONF_CHAN(x)   ((x) & 0xf) /* Channel select */
 
#define AD7793_CONF_CHAN_MASK   0xf /* Channel select mask */
 
#define AD7793_CH_AIN1P_AIN1M   0 /* AIN1(+) - AIN1(-) */
 
#define AD7793_CH_AIN2P_AIN2M   1 /* AIN2(+) - AIN2(-) */
 
#define AD7793_CH_AIN3P_AIN3M   2 /* AIN3(+) - AIN3(-) */
 
#define AD7793_CH_AIN1M_AIN1M   3 /* AIN1(-) - AIN1(-) */
 
#define AD7793_CH_TEMP   6 /* Temp Sensor */
 
#define AD7793_CH_AVDD_MONITOR   7 /* AVDD Monitor */
 
#define AD7795_CH_AIN4P_AIN4M   4 /* AIN4(+) - AIN4(-) */
 
#define AD7795_CH_AIN5P_AIN5M   5 /* AIN5(+) - AIN5(-) */
 
#define AD7795_CH_AIN6P_AIN6M   6 /* AIN6(+) - AIN6(-) */
 
#define AD7795_CH_AIN1M_AIN1M   8 /* AIN1(-) - AIN1(-) */
 
#define AD7792_ID   0xA
 
#define AD7793_ID   0xB
 
#define AD7795_ID   0xF
 
#define AD7793_ID_MASK   0xF
 
#define AD7793_IO_IEXC1_IOUT1_IEXC2_IOUT2
 
#define AD7793_IO_IEXC1_IOUT2_IEXC2_IOUT1
 
#define AD7793_IO_IEXC1_IEXC2_IOUT1
 
#define AD7793_IO_IEXC1_IEXC2_IOUT2
 
#define AD7793_IO_IXCEN_10uA   (1 << 0) /* Excitation Current 10uA */
 
#define AD7793_IO_IXCEN_210uA   (2 << 0) /* Excitation Current 210uA */
 
#define AD7793_IO_IXCEN_1mA   (3 << 0) /* Excitation Current 1mA */
 

Macro Definition Documentation

#define AD7792_ID   0xA

Definition at line 84 of file ad7793.h.

#define AD7793_CH_AIN1M_AIN1M   3 /* AIN1(-) - AIN1(-) */

Definition at line 74 of file ad7793.h.

#define AD7793_CH_AIN1P_AIN1M   0 /* AIN1(+) - AIN1(-) */

Definition at line 71 of file ad7793.h.

#define AD7793_CH_AIN2P_AIN2M   1 /* AIN2(+) - AIN2(-) */

Definition at line 72 of file ad7793.h.

#define AD7793_CH_AIN3P_AIN3M   2 /* AIN3(+) - AIN3(-) */

Definition at line 73 of file ad7793.h.

#define AD7793_CH_AVDD_MONITOR   7 /* AVDD Monitor */

Definition at line 76 of file ad7793.h.

#define AD7793_CH_TEMP   6 /* Temp Sensor */

Definition at line 75 of file ad7793.h.

#define AD7793_CLK_EXT   2 /* External 64 kHz Clock */

Definition at line 57 of file ad7793.h.

#define AD7793_CLK_EXT_DIV2   3 /* External Clock divided by 2 */

Definition at line 58 of file ad7793.h.

#define AD7793_CLK_INT
Value:
0 /* Internal 64 kHz Clock not
* available at the CLK pin */

Definition at line 55 of file ad7793.h.

#define AD7793_CLK_INT_CO
Value:
1 /* Internal 64 kHz Clock available
* at the CLK pin */

Definition at line 56 of file ad7793.h.

#define AD7793_COMM_ADDR (   x)    (((x) & 0x7) << 3) /* Register Address */

Definition at line 30 of file ad7793.h.

#define AD7793_COMM_CREAD   (1 << 2) /* Continuous Read of Data Register */

Definition at line 31 of file ad7793.h.

#define AD7793_COMM_READ   (1 << 6) /* Read Operation */

Definition at line 29 of file ad7793.h.

#define AD7793_COMM_WEN   (1 << 7) /* Write Enable */

Definition at line 27 of file ad7793.h.

#define AD7793_COMM_WRITE   (0 << 6) /* Write Operation */

Definition at line 28 of file ad7793.h.

#define AD7793_CONF_BO_EN   (1 << 13) /* Burnout Current Enable */

Definition at line 62 of file ad7793.h.

#define AD7793_CONF_BOOST   (1 << 11) /* Boost Enable */

Definition at line 64 of file ad7793.h.

#define AD7793_CONF_BUF   (1 << 4) /* Buffered Mode Enable */

Definition at line 67 of file ad7793.h.

#define AD7793_CONF_CHAN (   x)    ((x) & 0xf) /* Channel select */

Definition at line 68 of file ad7793.h.

#define AD7793_CONF_CHAN_MASK   0xf /* Channel select mask */

Definition at line 69 of file ad7793.h.

#define AD7793_CONF_GAIN (   x)    (((x) & 0x7) << 8) /* Gain Select */

Definition at line 65 of file ad7793.h.

#define AD7793_CONF_REFSEL   (1 << 7) /* INT/EXT Reference Select */

Definition at line 66 of file ad7793.h.

#define AD7793_CONF_UNIPOLAR   (1 << 12) /* Unipolar/Bipolar Enable */

Definition at line 63 of file ad7793.h.

#define AD7793_CONF_VBIAS (   x)
Value:
(((x) & 0x3) << 14) /* Bias Voltage
* Generator Enable */

Definition at line 61 of file ad7793.h.

#define AD7793_ID   0xB

Definition at line 85 of file ad7793.h.

#define AD7793_ID_MASK   0xF

Definition at line 87 of file ad7793.h.

#define AD7793_IO_IEXC1_IEXC2_IOUT1
Value:
2 /* Both current sources
* IEXC1,2 connect to IOUT1 */

Definition at line 92 of file ad7793.h.

#define AD7793_IO_IEXC1_IEXC2_IOUT2
Value:
3 /* Both current sources
* IEXC1,2 connect to IOUT2 */

Definition at line 93 of file ad7793.h.

#define AD7793_IO_IEXC1_IOUT1_IEXC2_IOUT2
Value:
0 /* IEXC1 connect to IOUT1,
* IEXC2 connect to IOUT2 */

Definition at line 90 of file ad7793.h.

#define AD7793_IO_IEXC1_IOUT2_IEXC2_IOUT1
Value:
1 /* IEXC1 connect to IOUT2,
* IEXC2 connect to IOUT1 */

Definition at line 91 of file ad7793.h.

#define AD7793_IO_IXCEN_10uA   (1 << 0) /* Excitation Current 10uA */

Definition at line 95 of file ad7793.h.

#define AD7793_IO_IXCEN_1mA   (3 << 0) /* Excitation Current 1mA */

Definition at line 97 of file ad7793.h.

#define AD7793_IO_IXCEN_210uA   (2 << 0) /* Excitation Current 210uA */

Definition at line 96 of file ad7793.h.

#define AD7793_MODE_CAL_INT_FULL   5 /* Internal Full-Scale Calibration */

Definition at line 51 of file ad7793.h.

#define AD7793_MODE_CAL_INT_ZERO   4 /* Internal Zero-Scale Calibration */

Definition at line 50 of file ad7793.h.

#define AD7793_MODE_CAL_SYS_FULL   7 /* System Full-Scale Calibration */

Definition at line 53 of file ad7793.h.

#define AD7793_MODE_CAL_SYS_ZERO   6 /* System Zero-Scale Calibration */

Definition at line 52 of file ad7793.h.

#define AD7793_MODE_CLKSRC (   x)    (((x) & 0x3) << 6) /* ADC Clock Source Select */

Definition at line 43 of file ad7793.h.

#define AD7793_MODE_CONT   0 /* Continuous Conversion Mode */

Definition at line 46 of file ad7793.h.

#define AD7793_MODE_IDLE   2 /* Idle Mode */

Definition at line 48 of file ad7793.h.

#define AD7793_MODE_PWRDN   3 /* Power-Down Mode */

Definition at line 49 of file ad7793.h.

#define AD7793_MODE_RATE (   x)    ((x) & 0xF) /* Filter Update Rate Select */

Definition at line 44 of file ad7793.h.

#define AD7793_MODE_SEL (   x)    (((x) & 0x7) << 13) /* Operation Mode Select */

Definition at line 41 of file ad7793.h.

#define AD7793_MODE_SEL_MASK   (0x7 << 13) /* Operation Mode Select mask */

Definition at line 42 of file ad7793.h.

#define AD7793_MODE_SINGLE   1 /* Single Conversion Mode */

Definition at line 47 of file ad7793.h.

#define AD7793_REG_COMM   0 /* Communications Register (WO, 8-bit) */

Definition at line 16 of file ad7793.h.

#define AD7793_REG_CONF   2 /* Configuration Register (RW, 16-bit) */

Definition at line 19 of file ad7793.h.

#define AD7793_REG_DATA   3 /* Data Register (RO, 16-/24-bit) */

Definition at line 20 of file ad7793.h.

#define AD7793_REG_FULLSALE
Value:
7 /* Full-Scale Register
* (RW, 16-bit (AD7792)/24-bit (AD7793)) */

Definition at line 24 of file ad7793.h.

#define AD7793_REG_ID   4 /* ID Register (RO, 8-bit) */

Definition at line 21 of file ad7793.h.

#define AD7793_REG_IO   5 /* IO Register (RO, 8-bit) */

Definition at line 22 of file ad7793.h.

#define AD7793_REG_MODE   1 /* Mode Register (RW, 16-bit */

Definition at line 18 of file ad7793.h.

#define AD7793_REG_OFFSET
Value:
6 /* Offset Register (RW, 16-bit
* (AD7792)/24-bit (AD7793)) */

Definition at line 23 of file ad7793.h.

#define AD7793_REG_STAT   0 /* Status Register (RO, 8-bit) */

Definition at line 17 of file ad7793.h.

#define AD7793_STAT_CH1   (1 << 0) /* Channel 1 */

Definition at line 38 of file ad7793.h.

#define AD7793_STAT_CH2   (1 << 1) /* Channel 2 */

Definition at line 37 of file ad7793.h.

#define AD7793_STAT_CH3   (1 << 2) /* Channel 3 */

Definition at line 36 of file ad7793.h.

#define AD7793_STAT_ERR   (1 << 6) /* Error (Overrange, Underrange) */

Definition at line 35 of file ad7793.h.

#define AD7793_STAT_RDY   (1 << 7) /* Ready */

Definition at line 34 of file ad7793.h.

#define AD7795_CH_AIN1M_AIN1M   8 /* AIN1(-) - AIN1(-) */

Definition at line 81 of file ad7793.h.

#define AD7795_CH_AIN4P_AIN4M   4 /* AIN4(+) - AIN4(-) */

Definition at line 78 of file ad7793.h.

#define AD7795_CH_AIN5P_AIN5M   5 /* AIN5(+) - AIN5(-) */

Definition at line 79 of file ad7793.h.

#define AD7795_CH_AIN6P_AIN6M   6 /* AIN6(+) - AIN6(-) */

Definition at line 80 of file ad7793.h.

#define AD7795_ID   0xF

Definition at line 86 of file ad7793.h.