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

Go to the source code of this file.

Data Structures

struct  adis16240_state
 

Macros

#define ADIS16240_STARTUP_DELAY   220 /* ms */
 
#define ADIS16240_READ_REG(a)   a
 
#define ADIS16240_WRITE_REG(a)   ((a) | 0x80)
 
#define ADIS16240_FLASH_CNT   0x00
 
#define ADIS16240_SUPPLY_OUT   0x02
 
#define ADIS16240_XACCL_OUT   0x04
 
#define ADIS16240_YACCL_OUT   0x06
 
#define ADIS16240_ZACCL_OUT   0x08
 
#define ADIS16240_AUX_ADC   0x0A
 
#define ADIS16240_TEMP_OUT   0x0C
 
#define ADIS16240_XPEAK_OUT   0x0E
 
#define ADIS16240_YPEAK_OUT   0x10
 
#define ADIS16240_ZPEAK_OUT   0x12
 
#define ADIS16240_XYZPEAK_OUT   0x14
 
#define ADIS16240_CAPT_BUF1   0x16
 
#define ADIS16240_CAPT_BUF2   0x18
 
#define ADIS16240_DIAG_STAT   0x1A
 
#define ADIS16240_EVNT_CNTR   0x1C
 
#define ADIS16240_CHK_SUM   0x1E
 
#define ADIS16240_XACCL_OFF   0x20
 
#define ADIS16240_YACCL_OFF   0x22
 
#define ADIS16240_ZACCL_OFF   0x24
 
#define ADIS16240_CLK_TIME   0x2E
 
#define ADIS16240_CLK_DATE   0x30
 
#define ADIS16240_CLK_YEAR   0x32
 
#define ADIS16240_WAKE_TIME   0x34
 
#define ADIS16240_WAKE_DATE   0x36
 
#define ADIS16240_ALM_MAG1   0x38
 
#define ADIS16240_ALM_MAG2   0x3A
 
#define ADIS16240_ALM_CTRL   0x3C
 
#define ADIS16240_XTRIG_CTRL   0x3E
 
#define ADIS16240_CAPT_PNTR   0x40
 
#define ADIS16240_CAPT_CTRL   0x42
 
#define ADIS16240_GPIO_CTRL   0x44
 
#define ADIS16240_MSC_CTRL   0x46
 
#define ADIS16240_SMPL_PRD   0x48
 
#define ADIS16240_GLOB_CMD   0x4A
 
#define ADIS16240_OUTPUTS   6
 
#define ADIS16240_MSC_CTRL_XYZPEAK_OUT_EN   (1 << 15)
 
#define ADIS16240_MSC_CTRL_X_Y_ZPEAK_OUT_EN   (1 << 14)
 
#define ADIS16240_MSC_CTRL_SELF_TEST_EN   (1 << 8)
 
#define ADIS16240_MSC_CTRL_DATA_RDY_EN   (1 << 2)
 
#define ADIS16240_MSC_CTRL_ACTIVE_HIGH   (1 << 1)
 
#define ADIS16240_MSC_CTRL_DATA_RDY_DIO2   (1 << 0)
 
#define ADIS16240_DIAG_STAT_ALARM2   (1<<9)
 
#define ADIS16240_DIAG_STAT_ALARM1   (1<<8)
 
#define ADIS16240_DIAG_STAT_CPT_BUF_FUL   (1<<7)
 
#define ADIS16240_DIAG_STAT_CHKSUM   (1<<6)
 
#define ADIS16240_DIAG_STAT_PWRON_FAIL   (1<<5)
 
#define ADIS16240_DIAG_STAT_PWRON_BUSY   (1<<4)
 
#define ADIS16240_DIAG_STAT_SPI_FAIL   (1<<3)
 
#define ADIS16240_DIAG_STAT_FLASH_UPT   (1<<2)
 
#define ADIS16240_DIAG_STAT_POWER_HIGH   (1<<1)
 
#define ADIS16240_DIAG_STAT_POWER_LOW   (1<<0)
 
#define ADIS16240_GLOB_CMD_RESUME   (1<<8)
 
#define ADIS16240_GLOB_CMD_SW_RESET   (1<<7)
 
#define ADIS16240_GLOB_CMD_STANDBY   (1<<2)
 
#define ADIS16240_ERROR_ACTIVE   (1<<14)
 
#define ADIS16240_MAX_TX   24
 
#define ADIS16240_MAX_RX   24
 
#define ADIS16240_SCAN_SUPPLY   0
 
#define ADIS16240_SCAN_ACC_X   1
 
#define ADIS16240_SCAN_ACC_Y   2
 
#define ADIS16240_SCAN_ACC_Z   3
 
#define ADIS16240_SCAN_AUX_ADC   4
 
#define ADIS16240_SCAN_TEMP   5
 

Functions

int adis16240_set_irq (struct iio_dev *indio_dev, bool enable)
 

Macro Definition Documentation

#define ADIS16240_ALM_CTRL   0x3C

Definition at line 62 of file adis16240.h.

#define ADIS16240_ALM_MAG1   0x38

Definition at line 58 of file adis16240.h.

#define ADIS16240_ALM_MAG2   0x3A

Definition at line 60 of file adis16240.h.

#define ADIS16240_AUX_ADC   0x0A

Definition at line 20 of file adis16240.h.

#define ADIS16240_CAPT_BUF1   0x16

Definition at line 32 of file adis16240.h.

#define ADIS16240_CAPT_BUF2   0x18

Definition at line 34 of file adis16240.h.

#define ADIS16240_CAPT_CTRL   0x42

Definition at line 68 of file adis16240.h.

#define ADIS16240_CAPT_PNTR   0x40

Definition at line 66 of file adis16240.h.

#define ADIS16240_CHK_SUM   0x1E

Definition at line 40 of file adis16240.h.

#define ADIS16240_CLK_DATE   0x30

Definition at line 50 of file adis16240.h.

#define ADIS16240_CLK_TIME   0x2E

Definition at line 48 of file adis16240.h.

#define ADIS16240_CLK_YEAR   0x32

Definition at line 52 of file adis16240.h.

#define ADIS16240_DIAG_STAT   0x1A

Definition at line 36 of file adis16240.h.

#define ADIS16240_DIAG_STAT_ALARM1   (1<<8)

Definition at line 98 of file adis16240.h.

#define ADIS16240_DIAG_STAT_ALARM2   (1<<9)

Definition at line 96 of file adis16240.h.

#define ADIS16240_DIAG_STAT_CHKSUM   (1<<6)

Definition at line 102 of file adis16240.h.

#define ADIS16240_DIAG_STAT_CPT_BUF_FUL   (1<<7)

Definition at line 100 of file adis16240.h.

#define ADIS16240_DIAG_STAT_FLASH_UPT   (1<<2)

Definition at line 110 of file adis16240.h.

#define ADIS16240_DIAG_STAT_POWER_HIGH   (1<<1)

Definition at line 112 of file adis16240.h.

#define ADIS16240_DIAG_STAT_POWER_LOW   (1<<0)

Definition at line 114 of file adis16240.h.

#define ADIS16240_DIAG_STAT_PWRON_BUSY   (1<<4)

Definition at line 106 of file adis16240.h.

#define ADIS16240_DIAG_STAT_PWRON_FAIL   (1<<5)

Definition at line 104 of file adis16240.h.

#define ADIS16240_DIAG_STAT_SPI_FAIL   (1<<3)

Definition at line 108 of file adis16240.h.

#define ADIS16240_ERROR_ACTIVE   (1<<14)

Definition at line 121 of file adis16240.h.

#define ADIS16240_EVNT_CNTR   0x1C

Definition at line 38 of file adis16240.h.

#define ADIS16240_FLASH_CNT   0x00

Definition at line 10 of file adis16240.h.

#define ADIS16240_GLOB_CMD   0x4A

Definition at line 76 of file adis16240.h.

#define ADIS16240_GLOB_CMD_RESUME   (1<<8)

Definition at line 117 of file adis16240.h.

#define ADIS16240_GLOB_CMD_STANDBY   (1<<2)

Definition at line 119 of file adis16240.h.

#define ADIS16240_GLOB_CMD_SW_RESET   (1<<7)

Definition at line 118 of file adis16240.h.

#define ADIS16240_GPIO_CTRL   0x44

Definition at line 70 of file adis16240.h.

#define ADIS16240_MAX_RX   24

Definition at line 124 of file adis16240.h.

#define ADIS16240_MAX_TX   24

Definition at line 123 of file adis16240.h.

#define ADIS16240_MSC_CTRL   0x46

Definition at line 72 of file adis16240.h.

#define ADIS16240_MSC_CTRL_ACTIVE_HIGH   (1 << 1)

Definition at line 90 of file adis16240.h.

#define ADIS16240_MSC_CTRL_DATA_RDY_DIO2   (1 << 0)

Definition at line 92 of file adis16240.h.

#define ADIS16240_MSC_CTRL_DATA_RDY_EN   (1 << 2)

Definition at line 88 of file adis16240.h.

#define ADIS16240_MSC_CTRL_SELF_TEST_EN   (1 << 8)

Definition at line 86 of file adis16240.h.

#define ADIS16240_MSC_CTRL_X_Y_ZPEAK_OUT_EN   (1 << 14)

Definition at line 84 of file adis16240.h.

#define ADIS16240_MSC_CTRL_XYZPEAK_OUT_EN   (1 << 15)

Definition at line 82 of file adis16240.h.

#define ADIS16240_OUTPUTS   6

Definition at line 78 of file adis16240.h.

#define ADIS16240_READ_REG (   a)    a

Definition at line 6 of file adis16240.h.

#define ADIS16240_SCAN_ACC_X   1

Definition at line 149 of file adis16240.h.

#define ADIS16240_SCAN_ACC_Y   2

Definition at line 150 of file adis16240.h.

#define ADIS16240_SCAN_ACC_Z   3

Definition at line 151 of file adis16240.h.

#define ADIS16240_SCAN_AUX_ADC   4

Definition at line 152 of file adis16240.h.

#define ADIS16240_SCAN_SUPPLY   0

Definition at line 148 of file adis16240.h.

#define ADIS16240_SCAN_TEMP   5

Definition at line 153 of file adis16240.h.

#define ADIS16240_SMPL_PRD   0x48

Definition at line 74 of file adis16240.h.

#define ADIS16240_STARTUP_DELAY   220 /* ms */

Definition at line 4 of file adis16240.h.

#define ADIS16240_SUPPLY_OUT   0x02

Definition at line 12 of file adis16240.h.

#define ADIS16240_TEMP_OUT   0x0C

Definition at line 22 of file adis16240.h.

#define ADIS16240_WAKE_DATE   0x36

Definition at line 56 of file adis16240.h.

#define ADIS16240_WAKE_TIME   0x34

Definition at line 54 of file adis16240.h.

#define ADIS16240_WRITE_REG (   a)    ((a) | 0x80)

Definition at line 7 of file adis16240.h.

#define ADIS16240_XACCL_OFF   0x20

Definition at line 42 of file adis16240.h.

#define ADIS16240_XACCL_OUT   0x04

Definition at line 14 of file adis16240.h.

#define ADIS16240_XPEAK_OUT   0x0E

Definition at line 24 of file adis16240.h.

#define ADIS16240_XTRIG_CTRL   0x3E

Definition at line 64 of file adis16240.h.

#define ADIS16240_XYZPEAK_OUT   0x14

Definition at line 30 of file adis16240.h.

#define ADIS16240_YACCL_OFF   0x22

Definition at line 44 of file adis16240.h.

#define ADIS16240_YACCL_OUT   0x06

Definition at line 16 of file adis16240.h.

#define ADIS16240_YPEAK_OUT   0x10

Definition at line 26 of file adis16240.h.

#define ADIS16240_ZACCL_OFF   0x24

Definition at line 46 of file adis16240.h.

#define ADIS16240_ZACCL_OUT   0x08

Definition at line 18 of file adis16240.h.

#define ADIS16240_ZPEAK_OUT   0x12

Definition at line 28 of file adis16240.h.

Function Documentation

int adis16240_set_irq ( struct iio_dev indio_dev,
bool  enable 
)

Definition at line 202 of file adis16240_core.c.